Subject: Re: [ppsp] Firefox ppsp URL support

From: Arno Bakker <[email-masked]>
Date: Wed, 2 Apr 2014 17:08:44 +0200

On 25/03/2014 09:34, Dave Cottlehuber wrote:
> On 25. März 2014 at 09:09:55, Arno Bakker ([email-masked]) wrote:
>> On 25/03/2014 04:37, Jeff Thompson wrote:
>>> I assume that a preliminary implementation would be a Firefox
>>> extension. If the C++ code is current, it should be easy to compile an
>>> extension for a few platforms (Linux/OS X).
>>  
>> Hi all
>>  
>> quick response: such a Firefox extension already exists under the name
>> SwarmPlayer 3000, which was demoed at one of the IETF meetings. The last
>> version supports VOD, and worked for Ogg containers.
> 
> Sounds great! Yes, I’d love to see this (and any other similar bits) published.
> 

Hi

I just uploaded a SwarmPlayer 3000 version to the "devel" branch on

    https://github.com/libswift/libswift/tree/devel

see the firefox/ directory.

You can build the Firefox extention by running first:

     scons

in the top level directory. SCons is a build system like Ant, so
install that first. This builds swift.exe. Then call

     xpimakedist.bat

to build the extension. Porting to *nix left as an exercise to the
reader, sorry, my time is limited. This script requires XULRunner
1.9.1.* (one dot nine, not to be confused with the latest release which
is 19.0.2 (nineteen dot zero two). This dependency should be fixed, but
I lack the time and some expertise. Once you have the .xpi open it with
Firefox to install.

I included a demo. So change directory to firefox/demo/ and then call

  seeder-download.bat

which downloads the Sintel movie trailer (CC-license). Next, run

  seeder-run.bat

which starts swift/PPSP engine as a video-on-demand seeder process.

Finally, open the firefox/demo/index.html with Firefox with the .xpi
installed and you should see a <video> element using PPSP as the data
source. On Windows, this will currently launch a swift.exe in a Command
Prompt shown progress info. To run this hidden, set DEBUG to False in
SConstruct and rerun scons and xpimakedist.bat

The current code has been refactored [1], but that gives XUL problems
when used, so I uploaded the simple version.

Have fun!
     Arno

[1] =
http://svn.tribler.org/abc/branches/release-m48-swarmplayer/Tribler/Transport/components/TribeChannel.js

---

From: Arno Bakker <[email-masked]>
Date: Wed, 2 Apr 2014 17:21:08 +0200

On 02/04/2014 17:08, Arno Bakker wrote:
> Porting to *nix left as an exercise to the
> reader, sorry, my time is limited. 

Note the extension code works on Windows, Linux and Mac. It is just the
build scripts that need porting. See

http://svn.tribler.org/abc/branches/release-m48-swarmplayer/swift-lucid-xpicreate.sh

http://svn.tribler.org/abc/branches/release-m48-swarmplayer/swift-xpimakedistmac.sh

for examples.

CU,
    Arno

---

From: David Jonsson <[email-masked]>
Date: Mon, 7 Apr 2014 21:25:40 +0200

I had to do the following to build on MacOS 10.9.2 with Xcode 5.1.

Setting an environment variable
export
ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future

change line 1087 in swift.cpp to
   sprintf(numstr2,"%" PRIu64 "", *(long long)* specsize+strlen(numstr));

I could make a pull request if I just knew where to put the ARCHFLAGS
settings.

I find no file named xpimakedist.bat.

David

On Wed, Apr 2, 2014 at 5:08 PM, Arno Bakker <[email-masked]> wrote:

> _______________________________________________
> ppsp mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/ppsp
>

---

From: Arno Bakker <[email-masked]>
Date: Tue, 8 Apr 2014 09:50:53 +0200

Hi

>    sprintf(numstr2,"%" PRIu64 "", *(long long)* specsize+strlen(numstr));

Rather than casting to long long, it would be better to change the
PRIu64 to PRId32.

> I could make a pull request if I just knew where to put the ARCHFLAGS

In SConstruct (official) or Makefile.mac (less well maintained)

> I find no file named xpimakedist.bat.

You should checkout the "devel" branch.

CU,
     Arno

---

From: Jeff Thompson <[email-masked]>
Date: Sat, 12 Apr 2014 12:06:34 -0700

On 2014-03-31 0:01, Arno Bakker wrote:
> On 27/03/2014 17:14, Jeff Thompson wrote:
>> SwarmPlayer seems hard-wired to display video. For a Firefox extension
>> to use a ppsp link to fetch and display any content (images, HTML), it
>> needs a way to report the MIME content type for Firefox. What do you
>> think of the solution in RFC 6920 <http://tools.ietf.org/html/rfc6920>
>> "Naming Things with Hashes" to include a ct parameter?  The URI would
>> look like:
>> ppsp://5e2fe5f1462e5b7ac4d70fa081e0169160b2d3f1?ct=image/jpeg
>>
> Hi Jeff et al
>
> that looks like a nice standardized proposal. SwarmPlayer currently
> needs some additional metdata parameters, e.g. Content Integrity
> Protection method

Hi Arno,

If by "Content Integrity Protection method" you mean which hash 
algorithm, an RFC 6920 URI also specifies that. (It also gives the hash 
in bash 64, not hex). The full RFC 6920 URI would be:

ppsp:///sha-1;f4OxZX1x3FO5LcGBSKHWXfwtSxj?ct=image/jpeg

- Jeff T

---

From: Jeff Thompson <[email-masked]>
Date: Sat, 19 Apr 2014 19:05:58 -0700

On 2014-04-02 8:08, Arno Bakker wrote:
> is 19.0.2 (nineteen dot zero two).

Hi Arno,

I did the "exercise" and ported xpimakedist.bat to *nix. The attached 
script works on Ubuntu 13.10 and Mac OS X 10.8.  It's really neat to see 
the video playing in Firefox.

Cheers,
- Jeff