diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2010-01-25 12:31:24 +0100 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2010-01-25 12:31:24 +0100 |
commit | 62f8c3c6725925bd6db4a7c903c4a8adf4961c92 (patch) | |
tree | dd047468e255212a70860379037ae75fb02dd9a7 | |
parent | a37426c41c80fd21e5017fea01a786c05bcd9661 (diff) |
oggdemux: rename a variable
Rename the 'seekable' variable to 'pullmode'. We might be able to seek in push
mode too eventually.
-rw-r--r-- | ext/ogg/gstoggdemux.c | 30 | ||||
-rw-r--r-- | ext/ogg/gstoggdemux.h | 2 |
2 files changed, 16 insertions, 16 deletions
diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c index f6a58c5b..cfb8361a 100644 --- a/ext/ogg/gstoggdemux.c +++ b/ext/ogg/gstoggdemux.c @@ -244,11 +244,11 @@ gst_ogg_pad_src_query (GstPad * pad, GstQuery * query) if (format != GST_FORMAT_TIME) goto wrong_format; - if (ogg->seekable) { - /* we must return the total seekable length */ + if (ogg->pullmode) { + /* we must return the total length */ total_time = ogg->total_time; } else { - /* in non-seek mode we can answer the query and we must return -1 */ + /* in push mode we can answer the query and we must return -1 */ total_time = -1; } @@ -261,7 +261,7 @@ gst_ogg_pad_src_query (GstPad * pad, GstQuery * query) gst_query_parse_seeking (query, &format, NULL, NULL, NULL); if (format == GST_FORMAT_TIME) { - gst_query_set_seeking (query, GST_FORMAT_TIME, ogg->seekable, + gst_query_set_seeking (query, GST_FORMAT_TIME, ogg->pullmode, 0, ogg->total_time); } else { res = FALSE; @@ -297,11 +297,11 @@ gst_ogg_demux_receive_event (GstElement * element, GstEvent * event) switch (GST_EVENT_TYPE (event)) { case GST_EVENT_SEEK: - /* can't seek if we are not seekable, FIXME could pass the + /* can't seek if we are not pullmode, FIXME could pass the * seek query upstream after converting it to bytes using * the average bitrate of the stream. */ - if (!ogg->seekable) { - GST_DEBUG_OBJECT (ogg, "seek on non seekable stream"); + if (!ogg->pullmode) { + GST_DEBUG_OBJECT (ogg, "seek on pull mode stream not implemented yet"); goto error; } @@ -335,11 +335,11 @@ gst_ogg_pad_event (GstPad * pad, GstEvent * event) switch (GST_EVENT_TYPE (event)) { case GST_EVENT_SEEK: - /* can't seek if we are not seekable, FIXME could pass the + /* can't seek if we are not pullmode, FIXME could pass the * seek query upstream after converting it to bytes using * the average bitrate of the stream. */ - if (!ogg->seekable) { - GST_DEBUG_OBJECT (ogg, "seek on non seekable stream"); + if (!ogg->pullmode) { + GST_DEBUG_OBJECT (ogg, "seek on pull mode stream not implemented yet"); goto error; } @@ -1583,7 +1583,7 @@ gst_ogg_demux_deactivate_current_chain (GstOggDemux * ogg) } /* if we cannot seek back to the chain, we can destroy the chain * completely */ - if (!ogg->seekable) { + if (!ogg->pullmode) { gst_ogg_chain_free (chain); } ogg->current_chain = NULL; @@ -2789,8 +2789,8 @@ gst_ogg_demux_handle_page (GstOggDemux * ogg, ogg_page * page) GstOggChain *current_chain; gint64 current_time; - /* this can only happen in non-seekabe mode */ - if (ogg->seekable) + /* this can only happen in push mode */ + if (ogg->pullmode) goto unknown_chain; current_chain = ogg->current_chain; @@ -3212,7 +3212,7 @@ gst_ogg_demux_sink_activate_push (GstPad * sinkpad, gboolean active) ogg = GST_OGG_DEMUX (GST_OBJECT_PARENT (sinkpad)); - ogg->seekable = FALSE; + ogg->pullmode = FALSE; return TRUE; } @@ -3229,7 +3229,7 @@ gst_ogg_demux_sink_activate_pull (GstPad * sinkpad, gboolean active) if (active) { ogg->need_chains = TRUE; - ogg->seekable = TRUE; + ogg->pullmode = TRUE; return gst_pad_start_task (sinkpad, (GstTaskFunction) gst_ogg_demux_loop, sinkpad); diff --git a/ext/ogg/gstoggdemux.h b/ext/ogg/gstoggdemux.h index 0cd11cb2..a47642b3 100644 --- a/ext/ogg/gstoggdemux.h +++ b/ext/ogg/gstoggdemux.h @@ -135,7 +135,7 @@ struct _GstOggDemux gint64 read_offset; gint64 offset; - gboolean seekable; + gboolean pullmode; gboolean running; gboolean need_chains; |