GNOME Bugzilla – Bug 702725
first-class miniobjects/API for mpeg-ts related SI (Service Information)
Last modified: 2013-06-20 09:52:48 UTC
Several issues arise right now in regards to handling mpeg-ts/DVB SI. 1) performance In order for the various SI to be usable by applications, we currently parse and store them in GstStructures using generic GValue (uint, string, arrays, lists, ...). This represents over 95% of the cost of parsing those SI ! And the parsing is equally as expensive. 2) Using glib deprecated items. GValueArray is deprecated in glib (sigh) and is ill-suited for the kind of arrays/collection we want to expose/use. 3) Usability If we want to later allow apps to "inject" SI into mpegtsmux, they need to know exactly the topology of the structure to inject. Instead of that, there should be a clear API with structures to fill in. In addition, apps need to know what field they should extract, what the type should be, .... ====== To this end, I think we should switch to a public API for the various mpeg-ts SI along with registered mini-objects. Ideally this should be supported by g-i also (which should work if we register boxed GType for each of them). The "hierarchy" could look something like this: GstMiniObject +-- MpegTSSection +-- MpegTSPAT +-- MpegTSNIT +-- MpegTSEIT ..... MpegTSSection { GstMiniObject parent; gint16 pid; guint8 table_id; guint16 subtable_extension; guint8 version_number; guint8 current_next_indicator; guint8 section_number; guint8 last_section_number; guint32 crc; } MpegTSPAT { MpegTSSection parent; guint16 transport_stream_id; guint16 nb_programs; .... } In addition, we could expose descriptors in a cleaner way (avoiding string copies also) GstMpegTSDescriptors { const guint8 *backing_string; guint nb_descriptors; GstMpegTSDescriptor descriptors[]; /* Null-terminated array */ } GstMpegTSDescriptor { guint8 descriptor_tag; guint8 descriptor_length; const guint8* descriptor_content; /* pointer to descriptors->backing_string */ } and expose the various macros to parse them.
*** This bug has been marked as a duplicate of bug 702724 ***