Video Element Progress
I thought it might be time for an update on the progress of the <video> element support for Firefox.
Unfortunately on Christmas Eve my Macbook hard drive crashed losing everything on it. Fortunately I push my repository to a remote server regularly. Until I get a new drive and the Macbook set up again I'm using another laptop dual booting Linux and Windows. This has given me the chance to work on getting the Linux version of <video> support a lot better.
The main problem with the Linux version was with the sound implementation. The Linux backend of sydney audio uses OSS and has problems with locking /dev/dsp, is unable to return information I need for a/v sync, and didn't have any volume control support. There is a partial implementation of ALSA support for sydney audio included with liboggplay but it was nowhere near complete, and used an older API interface.
I've implemented a new ALSA backend for the library and now have sound playing much better on Linux. Volume control works and sound playback is generally better. I'm adding support for returning the information required for a/v sync now. Once this is done Linux playback should be as good as that on the Mac and Windows builds.
After that I'll be updating the Windows audio backend so volume control and a/v sync information works with that as well.
I'm still using an older libtheora library. During my work on the theora playback a new version of the library was released. This has many improvements but does not have optimized assembler routines for the Microsoft Visual C++ compiler, which is what we use to build Firefox on Windows. Nils Pipenbrinck has submitted a patch to theora which adds MSVC compatible optimized assembler routines. Once that hits the main codebase I'll be moving to the new version and see how it goes.
I'll have a patch pushed to the git repository with the recent Linux changes as soon as I confirm it still builds and runs on the other platforms.
Categories: firefox, ogg
Unfortunately on Christmas Eve my Macbook hard drive crashed losing everything on it. Fortunately I push my repository to a remote server regularly. Until I get a new drive and the Macbook set up again I'm using another laptop dual booting Linux and Windows. This has given me the chance to work on getting the Linux version of <video> support a lot better.
The main problem with the Linux version was with the sound implementation. The Linux backend of sydney audio uses OSS and has problems with locking /dev/dsp, is unable to return information I need for a/v sync, and didn't have any volume control support. There is a partial implementation of ALSA support for sydney audio included with liboggplay but it was nowhere near complete, and used an older API interface.
I've implemented a new ALSA backend for the library and now have sound playing much better on Linux. Volume control works and sound playback is generally better. I'm adding support for returning the information required for a/v sync now. Once this is done Linux playback should be as good as that on the Mac and Windows builds.
After that I'll be updating the Windows audio backend so volume control and a/v sync information works with that as well.
I'm still using an older libtheora library. During my work on the theora playback a new version of the library was released. This has many improvements but does not have optimized assembler routines for the Microsoft Visual C++ compiler, which is what we use to build Firefox on Windows. Nils Pipenbrinck has submitted a patch to theora which adds MSVC compatible optimized assembler routines. Once that hits the main codebase I'll be moving to the new version and see how it goes.
I'll have a patch pushed to the git repository with the recent Linux changes as soon as I confirm it still builds and runs on the other platforms.
Categories: firefox, ogg
Labels: mozilla

6 Comments:
Wouldn't it make a lot more sense to use gstreamer on Linux platforms at least?
Also note that all big distros already have or are in the process of switching to PulseAudio. Using gstreamer will give you this for free. (Including the oh so very important plug-in system for e.g. encumbered codecs.)
(Also remember the fiasco with Adobe's flash plugin and what caused crack as what is today libflashsupport. That happened because their flash implementation used ALSA in a crackful way)
Wouldn't it be much easier to use GStreamer on all the platforms?
GStreamer works on Windows and MacOS X, as Songbird proves, and GStreamer recently got plugins to load the native codecs on those platforms.
OSS? Party like it's 1999 Mozilla dudes!
(You'll get a nasty shock when WebKit is the default rendering engine on a Linux box)
Wait, are you using OSS/Free or OSS 4.0? OSS/Free is a fork of the last OSS 3.x series and is known not to be able to share the audio device with other applications.
Don't rely on the anonymous post: OSS is far more superior _and_ easier to program to than ALSA.
Relying in OSS 4.0 may seem like a problem because most distros are ALSA-only in the moment. A bunch of volunteers whom know ALSA hurts Linux are trying to make a push for OSS 4.0, so it may take time, but it will get there.
Finally, if nothing else works, you may want to look into Pulseaudio.
pulse audio is very nice, it seems to be comparable to jack sound server in that its really low latency.
i am curious as to any other progress you have made on this, is there going to be support for other OS codecs? for e.g. dirac?
I have a gstreamer backend partially working. I'll be uploading a patch to bug 422540 when it's a bit more stable. It does work with the fluendo h.264 plugin so encumbered codecs can work.
Post a Comment
<< Home