diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-10-27 18:07:18 +0100 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-10-27 18:07:18 +0100 |
commit | 0c12f585e3b4d8ecb1f52bfcb5dca2b57c71cf44 (patch) | |
tree | 3478f5e409d1f79110c8d77472c2f37aa5ff47fc | |
parent | 0cbe0d6e983e74312443874a6fe917ee77e8e946 (diff) |
avidemux: use segment_full when we can
Use segment_full so that we can pass the applied rate to the segment values. We
will change the applied rate when we implement skip mode.
-rw-r--r-- | gst/avi/gstavidemux.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/gst/avi/gstavidemux.c b/gst/avi/gstavidemux.c index 00a58ed26..286a121dc 100644 --- a/gst/avi/gstavidemux.c +++ b/gst/avi/gstavidemux.c @@ -3009,8 +3009,8 @@ skipping_done: if (avi->seek_event) gst_event_unref (avi->seek_event); - avi->seek_event = gst_event_new_new_segment - (FALSE, avi->segment.rate, GST_FORMAT_TIME, + avi->seek_event = gst_event_new_new_segment_full + (FALSE, avi->segment.rate, avi->segment.applied_rate, GST_FORMAT_TIME, avi->segment.start, stop, avi->segment.time); gst_avi_demux_check_seekability (avi); @@ -3323,11 +3323,12 @@ skipping_done: /* do initial seek to the default segment values */ gst_avi_demux_do_seek (avi, &avi->segment); + /* prepare initial segment */ if (avi->seek_event) gst_event_unref (avi->seek_event); - avi->seek_event = gst_event_new_new_segment - (FALSE, avi->segment.rate, GST_FORMAT_TIME, + avi->seek_event = gst_event_new_new_segment_full + (FALSE, avi->segment.rate, avi->segment.applied_rate, GST_FORMAT_TIME, avi->segment.start, stop, avi->segment.time); stamp = gst_util_get_timestamp () - stamp; @@ -3620,8 +3621,8 @@ gst_avi_demux_handle_seek (GstAviDemux * avi, GstPad * pad, GstEvent * event) * close the segment first based on the last_stop. */ GST_DEBUG_OBJECT (avi, "closing running segment %" G_GINT64_FORMAT " to %" G_GINT64_FORMAT, avi->segment.start, avi->segment.last_stop); - seg = gst_event_new_new_segment (TRUE, - avi->segment.rate, avi->segment.format, + seg = gst_event_new_new_segment_full (TRUE, + avi->segment.rate, avi->segment.applied_rate, avi->segment.format, avi->segment.start, avi->segment.last_stop, avi->segment.time); gst_avi_demux_push_event (avi, seg); } @@ -3645,13 +3646,13 @@ gst_avi_demux_handle_seek (GstAviDemux * avi, GstPad * pad, GstEvent * event) gst_event_unref (avi->seek_event); if (avi->segment.rate > 0.0) { /* forwards goes from last_stop to stop */ - avi->seek_event = gst_event_new_new_segment (FALSE, - avi->segment.rate, avi->segment.format, + avi->seek_event = gst_event_new_new_segment_full (FALSE, + avi->segment.rate, avi->segment.applied_rate, avi->segment.format, avi->segment.last_stop, stop, avi->segment.time); } else { /* reverse goes from start to last_stop */ - avi->seek_event = gst_event_new_new_segment (FALSE, - avi->segment.rate, avi->segment.format, + avi->seek_event = gst_event_new_new_segment_full (FALSE, + avi->segment.rate, avi->segment.applied_rate, avi->segment.format, avi->segment.start, avi->segment.last_stop, avi->segment.time); } |