oggdemux: rename a variable
authorWim Taymans <wim.taymans@collabora.co.uk>
Mon, 25 Jan 2010 11:31:24 +0000 (12:31 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Mon, 25 Jan 2010 11:31:24 +0000 (12:31 +0100)
Rename the 'seekable' variable to 'pullmode'. We might be able to seek in push
mode too eventually.

ext/ogg/gstoggdemux.c
ext/ogg/gstoggdemux.h

index f6a58c5..cfb8361 100644 (file)
@@ -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);
index 0cd11cb..a47642b 100644 (file)
@@ -135,7 +135,7 @@ struct _GstOggDemux
   gint64 read_offset;
   gint64 offset;
 
-  gboolean seekable;
+  gboolean pullmode;
   gboolean running;
 
   gboolean need_chains;