From b8eb0d5dbbd292a32e0726249d8b3e9aea91ca3e Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Thu, 4 Jun 2009 16:11:16 +0100 Subject: mpegtsdemux: Avoid passing the custom GST_FLOW_NEED_MORE_DATA upstream Don't return GST_FLOW_NEED_MORE_DATA from the chain function at the end of files. --- gst/mpegdemux/gstmpegtsdemux.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'gst/mpegdemux') diff --git a/gst/mpegdemux/gstmpegtsdemux.c b/gst/mpegdemux/gstmpegtsdemux.c index b75bfc6d..81f263ee 100644 --- a/gst/mpegdemux/gstmpegtsdemux.c +++ b/gst/mpegdemux/gstmpegtsdemux.c @@ -923,8 +923,8 @@ gst_mpegts_demux_data_cb (GstPESFilter * filter, gboolean first, * to drop. */ if (stream->PMT_pid <= MPEGTS_MAX_PID && demux->streams[stream->PMT_pid] && demux->streams[demux->streams[stream->PMT_pid]->PMT.PCR_PID] - && demux->streams[demux->streams[stream->PMT_pid]->PMT. - PCR_PID]->discont_PCR) { + && demux->streams[demux->streams[stream->PMT_pid]->PMT.PCR_PID]-> + discont_PCR) { GST_WARNING_OBJECT (demux, "middle of discont, dropping"); goto bad_timestamp; } @@ -946,8 +946,8 @@ gst_mpegts_demux_data_cb (GstPESFilter * filter, gboolean first, */ if (stream->PMT_pid <= MPEGTS_MAX_PID && demux->streams[stream->PMT_pid] && demux->streams[demux->streams[stream->PMT_pid]->PMT.PCR_PID] - && demux->streams[demux->streams[stream->PMT_pid]->PMT. - PCR_PID]->last_PCR > 0) { + && demux->streams[demux->streams[stream->PMT_pid]->PMT.PCR_PID]-> + last_PCR > 0) { GST_DEBUG_OBJECT (demux, "timestamps wrapped before noticed in PCR"); time = MPEGTIME_TO_GSTTIME (pts) + stream->base_time + MPEGTIME_TO_GSTTIME ((guint64) (1) << 33); @@ -2884,7 +2884,8 @@ gst_mpegts_demux_chain (GstPad * pad, GstBuffer * buffer) /* process all packets */ for (i = 0; i < sync_count; i++) { ret = gst_mpegts_demux_parse_transport_packet (demux, demux->sync_lut[i]); - if (G_UNLIKELY (ret == GST_FLOW_LOST_SYNC)) { + if (G_UNLIKELY (ret == GST_FLOW_LOST_SYNC + || ret == GST_FLOW_NEED_MORE_DATA)) { ret = GST_FLOW_OK; continue; } -- cgit v1.2.1 From 8eac0482fdebf7bd8874daa18d9ca0bd4e6a6901 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Thu, 4 Jun 2009 16:29:31 +0100 Subject: mpegdemux: Add a GST_MEMDUMP line in the descriptor parsing Make it possible to see descriptor contents in the debug output (GST_DEBUG=mpegtsdesc:9), and remove a stray semi-colon. --- gst/mpegdemux/gstmpegdesc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gst/mpegdemux') diff --git a/gst/mpegdemux/gstmpegdesc.c b/gst/mpegdemux/gstmpegdesc.c index 4c88e1fd..0a985897 100644 --- a/gst/mpegdemux/gstmpegdesc.c +++ b/gst/mpegdemux/gstmpegdesc.c @@ -65,7 +65,9 @@ gst_mpeg_descriptor_parse_1 (guint8 * data, guint size) if (length > size) return 0; - return length + 2;; + GST_MEMDUMP ("tag contents:", data, length); + + return length + 2; } GstMPEGDescriptor * -- cgit v1.2.1 From 22496517e0f8a25202c42659c2720a5924275ab5 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Fri, 5 Jun 2009 10:48:52 +0200 Subject: mpegtsdemux: Fix HDV private stream definition/caps. --- gst/mpegdemux/gstmpegdefs.h | 9 +++++++-- gst/mpegdemux/gstmpegtsdemux.c | 8 ++++---- 2 files changed, 11 insertions(+), 6 deletions(-) (limited to 'gst/mpegdemux') diff --git a/gst/mpegdemux/gstmpegdefs.h b/gst/mpegdemux/gstmpegdefs.h index 7ad1e25c..375f1dc0 100644 --- a/gst/mpegdemux/gstmpegdefs.h +++ b/gst/mpegdemux/gstmpegdefs.h @@ -170,12 +170,17 @@ #define ST_PS_AUDIO_AC3 0x81 #define ST_PS_AUDIO_DTS 0x8a #define ST_PS_AUDIO_LPCM 0x8b -#define ST_HDV_PRIVATE_A0 0xa0 -#define ST_HDV_PRIVATE_A1 0xa1 #define ST_PS_DVD_SUBPICTURE 0xff /* Blu-ray PGS subpictures */ #define ST_BD_PGS_SUBPICTURE 0x90 +/* HDV AUX stream mapping + * 0xA0 ISO/IEC 61834-11 + * 0xA1 ISO/IEC 61834-11 + */ +#define ST_HDV_AUX_A 0xa0 +#define ST_HDV_AUX_V 0xa1 + /* Un-official time-code stream */ #define ST_PS_TIMECODE 0xd2 diff --git a/gst/mpegdemux/gstmpegtsdemux.c b/gst/mpegdemux/gstmpegtsdemux.c index 81f263ee..cb082a2b 100644 --- a/gst/mpegdemux/gstmpegtsdemux.c +++ b/gst/mpegdemux/gstmpegtsdemux.c @@ -634,15 +634,15 @@ gst_mpegts_demux_fill_stream (GstMpegTSStream * stream, guint8 id, caps = gst_caps_new_simple ("private/teletext", NULL); } break; - case ST_HDV_PRIVATE_A0: + case ST_HDV_AUX_V: template = klass->private_template; name = g_strdup_printf ("private_%04x", stream->PID); - caps = gst_caps_new_simple ("private/hdv-a0", NULL); + caps = gst_caps_new_simple ("hdv/aux-v", NULL); break; - case ST_HDV_PRIVATE_A1: + case ST_HDV_AUX_A: template = klass->private_template; name = g_strdup_printf ("private_%04x", stream->PID); - caps = gst_caps_new_simple ("private/hdv-a1", NULL); + caps = gst_caps_new_simple ("hdv/aux-a", NULL); break; case ST_PRIVATE_SECTIONS: case ST_MHEG: -- cgit v1.2.1