diff options
author | Edward Hervey <edward.hervey@collabora.co.uk> | 2012-06-28 18:04:10 +0200 |
---|---|---|
committer | Edward Hervey <edward.hervey@collabora.co.uk> | 2012-06-28 18:04:10 +0200 |
commit | 65a58130baef6c8b68f777aea137023562940c09 (patch) | |
tree | 8399faaf8a5ebbe992ee7c8fa6fb88ef12fdc1c1 | |
parent | 8ef6696d1c9788fa8fd425b0996bc017d95ed792 (diff) |
mpegtsbase: Move known PSI PIDs to where they belong
This avoids tsdemux parsing data is doesn't really care about
-rw-r--r-- | gst/mpegtsdemux/mpegtsbase.c | 21 | ||||
-rw-r--r-- | gst/mpegtsdemux/mpegtsparse.c | 31 |
2 files changed, 32 insertions, 20 deletions
diff --git a/gst/mpegtsdemux/mpegtsbase.c b/gst/mpegtsdemux/mpegtsbase.c index d920b6d9d..68d5a936e 100644 --- a/gst/mpegtsdemux/mpegtsbase.c +++ b/gst/mpegtsdemux/mpegtsbase.c @@ -204,33 +204,14 @@ mpegts_base_reset (MpegTSBase * base) memset (base->is_pes, 0, 1024); memset (base->known_psi, 0, 1024); - /* Known PIDs : PAT, CAT, TSDT, IPMP CIT */ + /* Known PIDs : PAT, TSDT, IPMP CIT */ MPEGTS_BIT_SET (base->known_psi, 0); - MPEGTS_BIT_SET (base->known_psi, 1); MPEGTS_BIT_SET (base->known_psi, 2); MPEGTS_BIT_SET (base->known_psi, 3); - /* 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); /* TDT, TOT, ST */ MPEGTS_BIT_SET (base->known_psi, 0x14); /* network synchronization */ MPEGTS_BIT_SET (base->known_psi, 0x15); - /* 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); /* FIXME : Commenting the Following lines is to be in sync with the following * commit diff --git a/gst/mpegtsdemux/mpegtsparse.c b/gst/mpegtsdemux/mpegtsparse.c index 1c01ddcb3..601556ecb 100644 --- a/gst/mpegtsdemux/mpegtsparse.c +++ b/gst/mpegtsdemux/mpegtsparse.c @@ -105,6 +105,8 @@ static void mpegts_parse_release_pad (GstElement * element, GstPad * pad); static gboolean mpegts_parse_src_pad_query (GstPad * pad, GstQuery * query); static gboolean push_event (MpegTSBase * base, GstEvent * event); +static void mpegts_parse_reset (MpegTSBase * base); + GST_BOILERPLATE (MpegTSParse2, mpegts_parse, MpegTSBase, GST_TYPE_MPEGTS_BASE); static void @@ -138,6 +140,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 @@ -149,6 +152,34 @@ mpegts_parse_init (MpegTSParse2 * parse, MpegTSParse2Class * klass) 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) { |