After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 702725 - first-class miniobjects/API for mpeg-ts related SI (Service Information)
first-class miniobjects/API for mpeg-ts related SI (Service Information)
Status: RESOLVED DUPLICATE of bug 702724
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-06-20 09:48 UTC by Edward Hervey
Modified: 2013-06-20 09:52 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Edward Hervey 2013-06-20 09:48: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.
Comment 1 Edward Hervey 2013-06-20 09:52:48 UTC

*** This bug has been marked as a duplicate of bug 702724 ***