[gstreamer-bugs] [Bug 550634] [mpeg ts demuxer] Doesn't support seeking and duration reporting
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Thu Jul 15 07:45:41 PDT 2010
https://bugzilla.gnome.org/show_bug.cgi?id=550634
GStreamer | gst-plugins-bad | git
--- Comment #14 from Vitaly "_Vi" Shukela <vi0oss at gmail.com> 2010-07-15 14:45:39 UTC ---
(From update of attachment 165964)
>From da27049537a5aa5e18f8919515e31cc714707eab Mon Sep 17 00:00:00 2001
>From: Vitaly _Vi Shukela <public_vi at tut.by>
>Date: Mon, 12 Jul 2010 22:21:28 +0300
>Subject: [PATCH] mpegdemux: Hack for seeking from RTSP streams.
>
>It makes the newsegment to start not from 0, but from seek time, also fixing the stop time.
>---
> gst/mpegdemux/gstmpegtsdemux.c | 21 +++++++++++++++------
> 1 files changed, 15 insertions(+), 6 deletions(-)
>
>diff --git a/gst/mpegdemux/gstmpegtsdemux.c b/gst/mpegdemux/gstmpegtsdemux.c
>index 507cfdd..79aaa0f 100644
>--- a/gst/mpegdemux/gstmpegtsdemux.c
>+++ b/gst/mpegdemux/gstmpegtsdemux.c
>@@ -2685,7 +2685,6 @@ gst_mpegts_demux_sink_event (GstPad * pad, GstEvent * event)
> gst_event_parse_new_segment (event, &update, &rate, &format,
> &start, &stop, &time);
>
>- gst_event_unref (event);
> GST_INFO_OBJECT (demux, "received new segment: rate %g "
> "format %d, start: %" G_GINT64_FORMAT ", stop: %" G_GINT64_FORMAT
> ", time: %" G_GINT64_FORMAT, rate, format, start, stop, time);
>@@ -2699,14 +2698,24 @@ gst_mpegts_demux_sink_event (GstPad * pad, GstEvent * event)
> tstop += BYTES_TO_GSTTIME (stop);
> pos = BYTES_TO_GSTTIME (time);
>
>+ gst_event_unref (event);
>+ tstart = pos;
>+ tstop += tstart;
> event = gst_event_new_new_segment (update, rate,
> GST_FORMAT_TIME, tstart, tstop, pos);
> GST_DEBUG_OBJECT (demux, "pushing time newsegment from %"
> GST_TIME_FORMAT " to %" GST_TIME_FORMAT " pos %" GST_TIME_FORMAT,
> GST_TIME_ARGS (tstart), GST_TIME_ARGS (tstop), GST_TIME_ARGS (pos));
>
>- res = gst_mpegts_demux_send_event (demux, event);
>+ } else {
>+ gst_event_unref (event);
>+ start = time;
>+ stop += start;
>+ event = gst_event_new_new_segment (update, rate,
>+ GST_FORMAT_TIME, start, stop, time);
>+
> }
>+ res = gst_mpegts_demux_send_event (demux, event);
> break;
> }
> default:
>--
>1.7.1
>
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the Gstreamer-bugs
mailing list