camerabin: no need to set clock/basetime again
authorThiago Santos <thiago.sousa.santos@collabora.com>
Thu, 30 Aug 2012 01:05:56 +0000 (22:05 -0300)
committerThiago Santos <thiago.sousa.santos@collabora.com>
Thu, 30 Aug 2012 01:05:56 +0000 (22:05 -0300)
The base and clock aren't lost anymore on state changes
in 1.0

gst/camerabin2/gstcamerabin2.c

index 13a19015edc2f811a25707e39c60a47b9fbb0987..08a8b259d3243b37cdcce6d52184d012529dd690 100644 (file)
@@ -390,20 +390,7 @@ gst_camera_bin_start_capture (GstCameraBin2 * camerabin)
   if (camerabin->location)
     location = g_strdup_printf (camerabin->location, capture_index);
 
-  if (camerabin->mode == MODE_VIDEO) {
-    if (camerabin->audio_src) {
-      GstClock *clock = gst_pipeline_get_clock (GST_PIPELINE_CAST (camerabin));
-
-      gst_element_set_state (camerabin->audio_src, GST_STATE_PAUSED);
-
-      gst_element_set_base_time (camerabin->audio_src,
-          gst_element_get_base_time (GST_ELEMENT_CAST (camerabin)));
-      if (clock) {
-        gst_element_set_clock (camerabin->audio_src, clock);
-        gst_object_unref (clock);
-      }
-    }
-  } else {
+  if (camerabin->mode == MODE_IMAGE) {
     /* store the next capture buffer filename */
     g_mutex_lock (&camerabin->image_capture_mutex);
     camerabin->image_location_list =