GNOME Bugzilla – Bug 594729
theora: Convert to libtheora 1.0 API
Last modified: 2009-10-15 18:22:43 UTC
The following patchset converts the theoradec and theoraenc API to the libtheora 1.0 API and simplifies the code with all the benefits this API brings. Some notes for reviewers of the patches: - I tried to make the theoraenc properties behave like they did with the old API. (Most didn't do anything) - The theoradec patch had been previously applied, I just reused it. - I converted the buffer conversion code to use gstvideo for simplification. - The encoder port gets rid of the buffer conversion code. This can be done because libtheora guarantees it won't read outside the pic area. See comment in theora_enc_init_buffer()
Created attachment 142865 [details] [review] theora: Ignore the center property, always set video to top left This is not a necessary property, the output will be identical no matter what.
Created attachment 142866 [details] [review] theora: Ignore border property Always make the video use black as padding color. The output will be identical to previous versions.
Created attachment 142867 [details] [review] theora: remove support for outdated granulepos hack This is in preparation to switching to switching to the new Theora API
Created attachment 142868 [details] [review] theora: Get rid of "quick" property The proeprty is not used by libtheora at all
Created attachment 142869 [details] [review] theora: Disable keyframe_threshold property It's ignored by the current theora encoder
Created attachment 142870 [details] [review] theora: Disable keyframe-mindistance property It's ignored by the current Theora library
Created attachment 142871 [details] [review] theora: Disable noise-sensitivity property It is ignored by libtheora
Created attachment 142872 [details] [review] theora: Disable sharpness property It's ignored by libtheora
Created attachment 142873 [details] [review] theora: Port encoder to new Theora API Includes ripping out the old buffer copy code to fill up to frame size. This is not necesary with the new encoder.
Created attachment 142874 [details] [review] theora: Convert theoradec to libtheora 1.0 API
Created attachment 142875 [details] [review] theora: Don't check for theora.pc anymore THe new APIs from theoradec and theoraenc are used now.
Created attachment 142876 [details] [review] theora: Don't always round to even width/height Previously, the code always rounded to even sizes. Now it only ensures that pic_x and pic_y are multiples of 2 if the output format requires it. Also inlcudes fixes to take pic_x/y into account properly when copying the buffer.
Created attachment 142877 [details] [review] theora: Make theoradec use gstvideo for image conversion Vastly simplifies code.
I stopped working on this because libtheora in current stable Debian and Ubuntu doesn't install the 1.0 libraries/headers correctly, so code compiled against it fails.
> I stopped working on this because libtheora in current stable Debian and Ubuntu > doesn't install the 1.0 libraries/headers correctly, so code compiled against > it fails. I think we should move to the 'new' theora API once the next -base release is out. I'm not so bothered about the issue in Debian stable, as I don't really consider Debian stable an important or particularly popular platform for GStreamer lib/app development (same for RHEL or Ubuntu LTS releases), and Debian stable's GLib will be too old anyway when we bump the GLib requirement after the next core/base release. The most current Ubuntu release is a pretty popular development platform though (just like e.g. the latest Fedora), so I think we should try to avoid breaking the gstreamer build on those systems, esp. if the benefits from moving to the new API are rather small. But even if we decided not to care about all that, we're freezing for core/base releases any second now, so pushing this stuff in now so shortly before a release would seem unwise in any case. However, by the time releases are out it will be end of September / beginning of October and there'll be a beta release of the next Ubuntu and we can just ask people to upgrade or tell them to manually remove the broken .la files.
Can I push this now or are there still reasons to wait?
IMHO can be pushed now
rebased and pushed to master.