Commit 62f8c3c6 authored by Wim Taymans's avatar Wim Taymans
Browse files

oggdemux: rename a variable

Rename the 'seekable' variable to 'pullmode'. We might be able to seek in push
mode too eventually.
parent a37426c4
...@@ -244,11 +244,11 @@ gst_ogg_pad_src_query (GstPad * pad, GstQuery * query) ...@@ -244,11 +244,11 @@ gst_ogg_pad_src_query (GstPad * pad, GstQuery * query)
if (format != GST_FORMAT_TIME) if (format != GST_FORMAT_TIME)
goto wrong_format; goto wrong_format;
if (ogg->seekable) { if (ogg->pullmode) {
/* we must return the total seekable length */ /* we must return the total length */
total_time = ogg->total_time; total_time = ogg->total_time;
} else { } 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; total_time = -1;
} }
...@@ -261,7 +261,7 @@ gst_ogg_pad_src_query (GstPad * pad, GstQuery * query) ...@@ -261,7 +261,7 @@ gst_ogg_pad_src_query (GstPad * pad, GstQuery * query)
gst_query_parse_seeking (query, &format, NULL, NULL, NULL); gst_query_parse_seeking (query, &format, NULL, NULL, NULL);
if (format == GST_FORMAT_TIME) { 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); 0, ogg->total_time);
} else { } else {
res = FALSE; res = FALSE;
...@@ -297,11 +297,11 @@ gst_ogg_demux_receive_event (GstElement * element, GstEvent * event) ...@@ -297,11 +297,11 @@ gst_ogg_demux_receive_event (GstElement * element, GstEvent * event)
switch (GST_EVENT_TYPE (event)) { switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_SEEK: 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 * seek query upstream after converting it to bytes using
* the average bitrate of the stream. */ * the average bitrate of the stream. */
if (!ogg->seekable) { if (!ogg->pullmode) {
GST_DEBUG_OBJECT (ogg, "seek on non seekable stream"); GST_DEBUG_OBJECT (ogg, "seek on pull mode stream not implemented yet");
goto error; goto error;
} }
...@@ -335,11 +335,11 @@ gst_ogg_pad_event (GstPad * pad, GstEvent * event) ...@@ -335,11 +335,11 @@ gst_ogg_pad_event (GstPad * pad, GstEvent * event)
switch (GST_EVENT_TYPE (event)) { switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_SEEK: 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 * seek query upstream after converting it to bytes using
* the average bitrate of the stream. */ * the average bitrate of the stream. */
if (!ogg->seekable) { if (!ogg->pullmode) {
GST_DEBUG_OBJECT (ogg, "seek on non seekable stream"); GST_DEBUG_OBJECT (ogg, "seek on pull mode stream not implemented yet");
goto error; goto error;
} }
...@@ -1583,7 +1583,7 @@ gst_ogg_demux_deactivate_current_chain (GstOggDemux * ogg) ...@@ -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 /* if we cannot seek back to the chain, we can destroy the chain
* completely */ * completely */
if (!ogg->seekable) { if (!ogg->pullmode) {
gst_ogg_chain_free (chain); gst_ogg_chain_free (chain);
} }
ogg->current_chain = NULL; ogg->current_chain = NULL;
...@@ -2789,8 +2789,8 @@ gst_ogg_demux_handle_page (GstOggDemux * ogg, ogg_page * page) ...@@ -2789,8 +2789,8 @@ gst_ogg_demux_handle_page (GstOggDemux * ogg, ogg_page * page)
GstOggChain *current_chain; GstOggChain *current_chain;
gint64 current_time; gint64 current_time;
/* this can only happen in non-seekabe mode */ /* this can only happen in push mode */
if (ogg->seekable) if (ogg->pullmode)
goto unknown_chain; goto unknown_chain;
current_chain = ogg->current_chain; current_chain = ogg->current_chain;
...@@ -3212,7 +3212,7 @@ gst_ogg_demux_sink_activate_push (GstPad * sinkpad, gboolean active) ...@@ -3212,7 +3212,7 @@ gst_ogg_demux_sink_activate_push (GstPad * sinkpad, gboolean active)
ogg = GST_OGG_DEMUX (GST_OBJECT_PARENT (sinkpad)); ogg = GST_OGG_DEMUX (GST_OBJECT_PARENT (sinkpad));
ogg->seekable = FALSE; ogg->pullmode = FALSE;
return TRUE; return TRUE;
} }
...@@ -3229,7 +3229,7 @@ gst_ogg_demux_sink_activate_pull (GstPad * sinkpad, gboolean active) ...@@ -3229,7 +3229,7 @@ gst_ogg_demux_sink_activate_pull (GstPad * sinkpad, gboolean active)
if (active) { if (active) {
ogg->need_chains = TRUE; ogg->need_chains = TRUE;
ogg->seekable = TRUE; ogg->pullmode = TRUE;
return gst_pad_start_task (sinkpad, (GstTaskFunction) gst_ogg_demux_loop, return gst_pad_start_task (sinkpad, (GstTaskFunction) gst_ogg_demux_loop,
sinkpad); sinkpad);
......
...@@ -135,7 +135,7 @@ struct _GstOggDemux ...@@ -135,7 +135,7 @@ struct _GstOggDemux
gint64 read_offset; gint64 read_offset;
gint64 offset; gint64 offset;
gboolean seekable; gboolean pullmode;
gboolean running; gboolean running;
gboolean need_chains; gboolean need_chains;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment