audiolatency: Use live mode audiotestsrc
authorSeungha Yang <seungha@centricular.com>
Thu, 20 May 2021 06:28:13 +0000 (15:28 +0900)
committerSeungha Yang <seungha@centricular.com>
Thu, 20 May 2021 06:41:50 +0000 (15:41 +0900)
Expected use case of audiolatency element is that mimic audio capture
device which is most likely live source. So audiolatency element
should use live mode as well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2265>

gst/audiolatency/gstaudiolatency.c

index 4ae5bfa..80d0026 100644 (file)
@@ -190,7 +190,8 @@ gst_audiolatency_init (GstAudioLatency * self)
 
   /* Setup srcpad */
   self->audiosrc = gst_element_factory_make ("audiotestsrc", NULL);
-  g_object_set (self->audiosrc, "wave", 8, "samplesperbuffer", 240, NULL);
+  g_object_set (self->audiosrc, "wave", 8, "samplesperbuffer", 240,
+      "is-live", TRUE, NULL);
   gst_bin_add (GST_BIN (self), self->audiosrc);
 
   templ = gst_static_pad_template_get (&src_template);