diff options
author | Edward Hervey <edward.hervey@collabora.co.uk> | 2012-06-28 18:04:10 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2012-06-29 10:02:30 +0200 |
commit | d3271381ee81451f89a647dd71d00231856009ca (patch) | |
tree | 574c79a064b2ba9751d46ac80b496ab3968a2368 /gst/mpegtsdemux/mpegtsparse.c | |
parent | ada99900920a02bf52f6240fcb273b386e395f21 (diff) | |
download | gstreamer-plugins-bad-d3271381ee81451f89a647dd71d00231856009ca.tar.gz |
mpegtsbase: Move known PSI PIDs to where they belong
This avoids tsdemux parsing data is doesn't really care about
Conflicts:
gst/mpegtsdemux/mpegtsparse.c
Diffstat (limited to 'gst/mpegtsdemux/mpegtsparse.c')
-rw-r--r-- | gst/mpegtsdemux/mpegtsparse.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gst/mpegtsdemux/mpegtsparse.c b/gst/mpegtsdemux/mpegtsparse.c index 045635d52..6341d0eb5 100644 --- a/gst/mpegtsdemux/mpegtsparse.c +++ b/gst/mpegtsdemux/mpegtsparse.c @@ -108,6 +108,7 @@ static gboolean push_event (MpegTSBase * base, GstEvent * event); #define mpegts_parse_parent_class parent_class G_DEFINE_TYPE (MpegTSParse2, mpegts_parse, GST_TYPE_MPEGTS_BASE); +static void mpegts_parse_reset (MpegTSBase * base); static void mpegts_parse_class_init (MpegTSParse2Class * klass) @@ -136,6 +137,7 @@ mpegts_parse_class_init (MpegTSParse2Class * klass) ts_class->push_event = GST_DEBUG_FUNCPTR (push_event); ts_class->program_started = GST_DEBUG_FUNCPTR (mpegts_parse_program_started); ts_class->program_stopped = GST_DEBUG_FUNCPTR (mpegts_parse_program_stopped); + ts_class->reset = GST_DEBUG_FUNCPTR (mpegts_parse_reset); } static void @@ -147,6 +149,34 @@ mpegts_parse_init (MpegTSParse2 * parse) gst_element_add_pad (GST_ELEMENT (parse), parse->srcpad); } +static void +mpegts_parse_reset (MpegTSBase * base) +{ + /* Set the various know PIDs we are interested in */ + + /* CAT */ + MPEGTS_BIT_SET (base->known_psi, 1); + /* NIT, ST */ + MPEGTS_BIT_SET (base->known_psi, 0x10); + /* SDT, BAT, ST */ + MPEGTS_BIT_SET (base->known_psi, 0x11); + /* EIT, ST, CIT (TS 102 323) */ + MPEGTS_BIT_SET (base->known_psi, 0x12); + /* RST, ST */ + MPEGTS_BIT_SET (base->known_psi, 0x13); + /* RNT (TS 102 323) */ + MPEGTS_BIT_SET (base->known_psi, 0x16); + /* inband signalling */ + MPEGTS_BIT_SET (base->known_psi, 0x1c); + /* measurement */ + MPEGTS_BIT_SET (base->known_psi, 0x1d); + /* DIT */ + MPEGTS_BIT_SET (base->known_psi, 0x1e); + /* SIT */ + MPEGTS_BIT_SET (base->known_psi, 0x1f); + +} + static gboolean push_event (MpegTSBase * base, GstEvent * event) { |