Building the Firefox video element backends
The git repository has multiple branches which means a little more git usage is needed to get at the Ogg (and soon, GStreamer) backends.
When you clone or pull from the repository you'll automatically pick up the commits for the new branches. You can see these branches with 'git branch -r':
Categories: firefox, ogg, gstreamer
When you clone or pull from the repository you'll automatically pick up the commits for the new branches. You can see these branches with 'git branch -r':
$ git clone git://double.co.nz/git/video.gitBy default the 'master' branch has a checked out working tree. Building this produces <video> element support without any decoder. One approach to building the Ogg backend is to create a local branch with the commits from the remote branch origin/ogg and build that:
$ cd video
$ git branch -r
origin/HEAD
origin/master
origin/ogg
$ git checkout -b ogg origin/oggWhen the gstreamer branch is added you can do similar:
Switched to a new branch "ogg"
$ cd mozilla
$ cat >.mozconfig << "EOF"
. $topsrcdir/browser/config/mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-@CONFIG_GUESS@
mk_add_options MOZ_CO_PROJECT=browser
ac_add_options --enable-video
ac_add_options --enable-ogg
EOF
$ autoconf2.13
$ make -f client.mk build
$ git checkout -b gstreamer origin/gstreamerYou can do a build which contains both backends by merging. You'll need to fix any merge conflicts and change the ordering of the codec instantiation so that one is preferred over the other when they can both handle the same codec. A merge looks like this:
Switched to a new branch "gstreamer"
$ cd mozilla
$ cat >.mozconfig << "EOF"
. $topsrcdir/browser/config/mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-@CONFIG_GUESS@
mk_add_options MOZ_CO_PROJECT=browser
ac_add_options --enable-video
ac_add_options --enable-gstreamer
EOF
$ autoconf2.13
$ make -f client.mk
$ git checkout -b gst_and_ogg origin/masterTo update your branches with the latest code from the repository, fetch and merge:
$ git merge origin/ogg
$ git merge origin/gstreamer
$ cd mozilla
$ cat >.mozconfig << "EOF"
. $topsrcdir/browser/config/mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-@CONFIG_GUESS@
mk_add_options MOZ_CO_PROJECT=browser
ac_add_options --enable-video
ac_add_options --enable-ogg
ac_add_options --enable-gstreamer
EOF
$ autoconf2.13
$ make -f client.mk
$ git fetch originOnce you've done a successful build you can run it from the obj-dir, or make an installer:
$ git checkout ogg
$ git merge origin/ogg
$ git checkout gstreamer
$ git merge origin/gstreamer
$ git checkout gst_and_ogg
$ git merge origin/ogg
$ git merge origin/gstreamer
$ cd mozillaWhen the installer is built there will be a file in the 'dist' subdirectory of the object directory that contains the build. It will be a .tar.gz, .zip or .dmg, depending on the platform. The environment variables set in the above example enable logging of the video debug output and running Firefox even if an existing copy is already running.
$ make -f client.mk build
$ export NSPR_LOG_MODULE=nsVideoDecoder:5
$ export MOZ_NO_REMOTE=1
$ ./obj-i686-pc-linux-gnu/dist/bin/firefox -ProfileManager
$ make -C browser/installer
Categories: firefox, ogg, gstreamer
Labels: mozilla

6 Comments:
"...You'll need to fix any merge conflicts and change the ordering of the codec instantiation so that one is preferred over the other when they can both handle the same codec...."
How to change the ordering of codec instantiation ??
Have a look at the current patch on the gstreamer backend bug. That patch applies cleanly to trunk. It changes things in nsHTMLMediaElement::PickMediaResource to instantiate the GStreamer backend unless it's a source element of type application/ogg.
This post has been removed by the author.
Hi, how can I crosscompile this for openembedded?
Hi,
Can you tell me the status of this effort and when it will become available as a standard part of Firefox.
Regards,
-Stefan
Video support is now in the nightly builds. It has been in the Firefox 3.1 betas. It will be in Firefox 3.1.
Post a Comment
<< Home