Inlined one-line utility funciton that was called only once
authorDavid Corvoysier <david.corvoysier@orange.com>
Tue, 16 Oct 2012 09:23:26 +0000 (11:23 +0200)
committerThiago Santos <thiago.sousa.santos@collabora.com>
Wed, 8 May 2013 21:13:56 +0000 (18:13 -0300)
ext/dash/gstdashdemux.c

index 61fa8fd620e45b0f0280c724570498a7446c43ed..ce6341d027c7113dfa601fe791a863237350358d 100644 (file)
@@ -204,7 +204,6 @@ static void gst_dash_demux_stop (GstDashDemux * demux);
 static void gst_dash_demux_pause_stream_task (GstDashDemux * demux);
 static void gst_dash_demux_resume_stream_task (GstDashDemux * demux);
 static void gst_dash_demux_resume_download_task (GstDashDemux * demux);
-static gboolean gst_dash_demux_schedule (GstDashDemux * demux);
 static gboolean gst_dash_demux_select_representations (GstDashDemux * demux,
     guint64 current_bitrate);
 static gboolean gst_dash_demux_get_next_fragment_set (GstDashDemux * demux);
@@ -985,8 +984,13 @@ gst_dash_demux_stream_loop (GstDashDemux * demux)
       goto error_pushing;
   }
   if (GST_STATE (demux) == GST_STATE_PLAYING) {
-    /* Schedule the next push */
-    gst_dash_demux_schedule (demux);
+    /* Wait for the duration of a fragment before resuming this task */
+    g_get_current_time (&demux->next_stream);
+    g_time_val_add (&demux->next_stream,
+        gst_mpd_client_get_target_duration (demux->client)
+        / GST_SECOND * G_USEC_PER_SEC);
+    GST_DEBUG_OBJECT (demux, "Next push scheduled at %s",
+        g_time_val_to_iso8601 (&demux->next_stream));
   } else {
     /* The pipeline is now set up, wait until playback begins */
     goto pause_task;
@@ -1194,20 +1198,6 @@ gst_dash_demux_resume_download_task (GstDashDemux * demux)
   gst_task_start (demux->download_task);
 }
 
-static gboolean
-gst_dash_demux_schedule (GstDashDemux * demux)
-{
-  /* schedule the next push */
-  g_get_current_time (&demux->next_stream);
-  g_time_val_add (&demux->next_stream,
-      gst_mpd_client_get_target_duration (demux->client)
-      / GST_SECOND * G_USEC_PER_SEC);
-  GST_INFO_OBJECT (demux, "Next push scheduled at %s",
-      g_time_val_to_iso8601 (&demux->next_stream));
-
-  return TRUE;
-}
-
 /* gst_dash_demux_select_representations:
  *
  * Select the most appropriate media representations based on a target