diff options
Diffstat (limited to 'ext/resindvd/gstmpegdemux.c')
-rw-r--r-- | ext/resindvd/gstmpegdemux.c | 42 |
1 files changed, 28 insertions, 14 deletions
diff --git a/ext/resindvd/gstmpegdemux.c b/ext/resindvd/gstmpegdemux.c index 267c9f792..29da73d0a 100644 --- a/ext/resindvd/gstmpegdemux.c +++ b/ext/resindvd/gstmpegdemux.c @@ -460,7 +460,6 @@ gst_flups_demux_send_data (GstFluPSDemux * demux, GstFluPSStream * stream, { GstFlowReturn result; GstClockTime pts = GST_CLOCK_TIME_NONE, dts = GST_CLOCK_TIME_NONE; - guint size; if (stream == NULL) goto no_stream; @@ -497,16 +496,15 @@ gst_flups_demux_send_data (GstFluPSDemux * demux, GstFluPSStream * stream, stream->discont = FALSE; } - size = gst_buffer_get_size (buf); demux->next_pts = G_MAXUINT64; demux->next_dts = G_MAXUINT64; result = gst_pad_push (stream->pad, buf); GST_DEBUG_OBJECT (demux, "pushed stream id 0x%02x type 0x%02x, pts time: %" - GST_TIME_FORMAT ", size %d. result: %s", + GST_TIME_FORMAT ", size %" G_GSIZE_FORMAT ". result: %s", stream->id, stream->type, GST_TIME_ARGS (pts), - size, gst_flow_get_name (result)); + gst_buffer_get_size (buf), gst_flow_get_name (result)); return result; @@ -1525,7 +1523,9 @@ gst_flups_demux_parse_sys_head (GstFluPSDemux * demux) { guint16 length; const guint8 *data; +#ifndef GST_DISABLE_GST_DEBUG gboolean csps; +#endif if (gst_adapter_available (demux->adapter) < 6) goto need_more_data; @@ -1572,6 +1572,7 @@ gst_flups_demux_parse_sys_head (GstFluPSDemux * demux) /* audio_bound:6==1 ! fixed:1 | constrained:1 */ { +#ifndef GST_DISABLE_GST_DEBUG guint8 audio_bound; gboolean fixed; @@ -1584,36 +1585,40 @@ gst_flups_demux_parse_sys_head (GstFluPSDemux * demux) GST_DEBUG_OBJECT (demux, "audio_bound %d, fixed %d, constrained %d", audio_bound, fixed, csps); +#endif data += 1; } /* audio_lock:1 | video_lock:1 | marker:1==1 | video_bound:5 */ { +#ifndef GST_DISABLE_GST_DEBUG gboolean audio_lock; gboolean video_lock; guint8 video_bound; audio_lock = (data[0] & 0x80) == 0x80; video_lock = (data[0] & 0x40) == 0x40; - +#endif if ((data[0] & 0x20) != 0x20) goto marker_expected; - +#ifndef GST_DISABLE_GST_DEBUG /* max number of simultaneous video streams active */ video_bound = (data[0] & 0x1f); GST_DEBUG_OBJECT (demux, "audio_lock %d, video_lock %d, video_bound %d", audio_lock, video_lock, video_bound); +#endif data += 1; } /* packet_rate_restriction:1 | reserved:7==0x7F */ { +#ifndef GST_DISABLE_GST_DEBUG gboolean packet_rate_restriction; - +#endif if ((data[0] & 0x7f) != 0x7f) goto marker_expected; - +#ifndef GST_DISABLE_GST_DEBUG /* only valid if csps is set */ if (csps) { packet_rate_restriction = (data[0] & 0x80) == 0x80; @@ -1621,6 +1626,7 @@ gst_flups_demux_parse_sys_head (GstFluPSDemux * demux) GST_DEBUG_OBJECT (demux, "packet_rate_restriction %d", packet_rate_restriction); } +#endif } data += 1; @@ -1632,10 +1638,11 @@ gst_flups_demux_parse_sys_head (GstFluPSDemux * demux) for (i = 0; i < stream_count; i++) { guint8 stream_id; +#ifndef GST_DISABLE_GST_DEBUG gboolean STD_buffer_bound_scale; guint16 STD_buffer_size_bound; guint32 buf_byte_size_bound; - +#endif stream_id = *data++; if (!(stream_id & 0x80)) goto sys_len_error; @@ -1643,7 +1650,7 @@ gst_flups_demux_parse_sys_head (GstFluPSDemux * demux) /* check marker bits */ if ((*data & 0xC0) != 0xC0) goto no_placeholder_bits; - +#ifndef GST_DISABLE_GST_DEBUG STD_buffer_bound_scale = *data & 0x20; STD_buffer_size_bound = ((guint16) (*data++ & 0x1F)) << 8; STD_buffer_size_bound |= *data++; @@ -1653,7 +1660,7 @@ gst_flups_demux_parse_sys_head (GstFluPSDemux * demux) } else { buf_byte_size_bound = STD_buffer_size_bound * 1024; } - +#endif GST_DEBUG_OBJECT (demux, "STD_buffer_bound_scale %d", STD_buffer_bound_scale); GST_DEBUG_OBJECT (demux, "STD_buffer_size_bound %d or %d bytes", @@ -1700,7 +1707,9 @@ gst_flups_demux_parse_psm (GstFluPSDemux * demux) guint16 length = 0, info_length = 0, es_map_length = 0; guint8 psm_version = 0; const guint8 *data, *es_map_base; +#ifndef GST_DISABLE_GST_DEBUG gboolean applicable; +#endif if (gst_adapter_available (demux->adapter) < 6) goto need_more_data; @@ -1731,7 +1740,9 @@ gst_flups_demux_parse_psm (GstFluPSDemux * demux) /* Read PSM applicable bit together with version */ psm_version = GST_READ_UINT8 (data); +#ifndef GST_DISABLE_GST_DEBUG applicable = (psm_version & 0x80) >> 7; +#endif psm_version &= 0x1F; GST_DEBUG_OBJECT (demux, "PSM version %u (applicable now %u)", psm_version, applicable); @@ -1835,8 +1846,6 @@ gst_flups_demux_data_cb (GstPESFilter * filter, gboolean first, if (stream_type == -1) { /* no stream type, if PS1, get the new id */ if (start_code == ID_PRIVATE_STREAM_1 && datalen >= 2) { - guint8 nframes; - /* VDR writes A52 streams without any header bytes * (see ftp://ftp.mplayerhq.hu/MPlayer/samples/MPEG-VOB/vdr-AC3) */ if (datalen >= 4) { @@ -1861,8 +1870,13 @@ gst_flups_demux_data_cb (GstPESFilter * filter, gboolean first, * take the first byte too, since it's the frame count in audio * streams and our backwards compat convention is to strip it off */ if (stream_type != ST_PS_DVD_SUBPICTURE) { +#ifndef GST_DISABLE_GST_DEBUG + guint8 nframes; + /* Number of audio frames in this packet */ - nframes = map.data[offset++]; + nframes = map.data[offset]; +#endif + offset++; datalen--; GST_DEBUG_OBJECT (demux, "private type 0x%02x, %d frames", id, nframes); |