GNOME Bugzilla – Bug 583045
[API] new video base classes need review
Last modified: 2009-07-13 13:56:45 UTC
Subject says it all.
The decoder should probably be a subclass of bug #582569. Something same should probably done for the encoder too, we can't change it later without breaking ABI and having a media independent base class is probably a good idea.
BaseVideoDecoder shares about 90% of its code with BaseVideoEncoder, vs. about 10% of code with an audio decoder. The choice to merge the Video classes into BaseVideoCodec, as opposed to a media agnostic one, was obvious.
Bunch of non-API issues/nitpicks: - headers and source files need cleaning up (header indenting, #if 0, //commented out stuff etc.) - structures in header need padding - private structure members should be moved into an instance private struct - there seems to be hardly any documentation at all yet
Why an instance private struct? No other class does this.
> Why an instance private struct? No other class does this. Just seems like a good idea to me for new code, esp. given how many variables we keep track of here. I think we've regretted putting private stuff into public structs already in a few places. Was just a suggestion...
(In reply to comment #4) > Why an instance private struct? No other class does this. Our most successful base classes all keep an instance private structure - BaseTransform, BaseSink and BaseSrc all do, implemented using GObject g_type_class_add_private/G_TYPE_INSTANCE_GET_PRIVATE. It's proven useful for making them 'future proof' without having to worry so hard about how much padding to add and how close it is to being consumed.
David: are you planning on fixing up any of these things? (docs, headers, etc.)
Moved to -bad, can be closed