diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2011-05-16 13:48:11 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2011-05-16 13:48:11 +0200 |
commit | 94dfe80f71d5b376171062905a2b0b6b7681e683 (patch) | |
tree | dc283a6b65102aab2d0292e1e2446849de173922 /ext/gio | |
parent | c81b1b8019f4eed7a12d71786c5088cfecc7ac59 (diff) | |
download | gstreamer-plugins-base-94dfe80f71d5b376171062905a2b0b6b7681e683.tar.gz |
-base: port to new SEGMENT API
Diffstat (limited to 'ext/gio')
-rw-r--r-- | ext/gio/gstgiobasesink.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/ext/gio/gstgiobasesink.c b/ext/gio/gstgiobasesink.c index 4818e4edf..7ef5fca95 100644 --- a/ext/gio/gstgiobasesink.c +++ b/ext/gio/gstgiobasesink.c @@ -208,25 +208,23 @@ gst_gio_base_sink_event (GstBaseSink * base_sink, GstEvent * event) return TRUE; switch (GST_EVENT_TYPE (event)) { - case GST_EVENT_NEWSEGMENT: + case GST_EVENT_SEGMENT: if (G_IS_OUTPUT_STREAM (sink->stream)) { - GstFormat format; - gint64 offset; + GstSegment segment; - gst_event_parse_new_segment (event, NULL, NULL, NULL, &format, &offset, - NULL, NULL); + gst_event_parse_segment (event, &segment); - if (format != GST_FORMAT_BYTES) { - GST_WARNING_OBJECT (sink, "ignored NEWSEGMENT event in %s format", - gst_format_get_name (format)); + if (segment.format != GST_FORMAT_BYTES) { + GST_WARNING_OBJECT (sink, "ignored SEGMENT event in %s format", + gst_format_get_name (segment.format)); break; } if (GST_GIO_STREAM_IS_SEEKABLE (sink->stream)) { - ret = gst_gio_seek (sink, G_SEEKABLE (sink->stream), offset, + ret = gst_gio_seek (sink, G_SEEKABLE (sink->stream), segment.start, sink->cancel); if (ret == GST_FLOW_OK) - sink->position = offset; + sink->position = segment.start; } else { ret = GST_FLOW_NOT_SUPPORTED; } |