summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2018-02-26 16:08:28 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2018-02-26 16:23:11 +0530
commit05a37d3791aeb85d1d86e70f4576fbb6e3b21306 (patch)
treec74bd74ca35c80138a8802966014c8af7c6ffae6
parent995059dc87eca5c42b960b475979613ba6d9b4a2 (diff)
downloadgstreamer-plugins-bad-05a37d3791aeb85d1d86e70f4576fbb6e3b21306.tar.gz
wasapi: Clarify usage of low-latency property, add myself as author
The low-latency property is *always* safe to enable, so applications that do realtime communication should set it, and the elements will automatically configure WASAPI to use the lowest possible device period, and the audioringbuffer in audiobasesink will also be configured accordingly. Applications can also use exclusive mode during capture and playback for the lowest possible latency if they know that the device will not be used by any other application. In this mode, the latency-time and buffer-time properties will be completely ignored.
-rw-r--r--sys/wasapi/gstwasapisink.c7
-rw-r--r--sys/wasapi/gstwasapisrc.c7
2 files changed, 12 insertions, 2 deletions
diff --git a/sys/wasapi/gstwasapisink.c b/sys/wasapi/gstwasapisink.c
index e6a0e826a..c0f775a0e 100644
--- a/sys/wasapi/gstwasapisink.c
+++ b/sys/wasapi/gstwasapisink.c
@@ -33,6 +33,10 @@
* gst-launch-1.0 -v audiotestsrc samplesperbuffer=160 ! wasapisink
* ]| Generate 20 ms buffers and render to the default audio device.
*
+ * |[
+ * gst-launch-1.0 -v audiotestsrc samplesperbuffer=160 ! wasapisink low-latency=true
+ * ]| Same as above, but with the minimum possible latency
+ *
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
@@ -131,7 +135,7 @@ gst_wasapi_sink_class_init (GstWasapiSinkClass * klass)
g_object_class_install_property (gobject_class,
PROP_LOW_LATENCY,
g_param_spec_boolean ("low-latency", "Low latency",
- "Optimize all settings for lowest latency",
+ "Optimize all settings for lowest latency. Always safe to enable.",
DEFAULT_LOW_LATENCY, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class,
@@ -144,6 +148,7 @@ gst_wasapi_sink_class_init (GstWasapiSinkClass * klass)
gst_element_class_set_static_metadata (gstelement_class, "WasapiSrc",
"Sink/Audio",
"Stream audio to an audio capture device through WASAPI",
+ "Nirbheek Chauhan <nirbheek@centricular.com>, "
"Ole André Vadla Ravnås <ole.andre.ravnas@tandberg.com>");
gstbasesink_class->get_caps = GST_DEBUG_FUNCPTR (gst_wasapi_sink_get_caps);
diff --git a/sys/wasapi/gstwasapisrc.c b/sys/wasapi/gstwasapisrc.c
index f1fd6415d..7060e7820 100644
--- a/sys/wasapi/gstwasapisrc.c
+++ b/sys/wasapi/gstwasapisrc.c
@@ -31,6 +31,10 @@
* gst-launch-1.0 -v wasapisrc ! fakesink
* ]| Capture from the default audio device and render to fakesink.
*
+ * |[
+ * gst-launch-1.0 -v wasapisrc low-latency=true ! fakesink
+ * ]| Capture from the default audio device with the minimum possible latency and render to fakesink.
+ *
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
@@ -123,7 +127,7 @@ gst_wasapi_src_class_init (GstWasapiSrcClass * klass)
g_object_class_install_property (gobject_class,
PROP_LOW_LATENCY,
g_param_spec_boolean ("low-latency", "Low latency",
- "Optimize all settings for lowest latency",
+ "Optimize all settings for lowest latency. Always safe to enable.",
DEFAULT_LOW_LATENCY, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class,
@@ -136,6 +140,7 @@ gst_wasapi_src_class_init (GstWasapiSrcClass * klass)
gst_element_class_set_static_metadata (gstelement_class, "WasapiSrc",
"Source/Audio",
"Stream audio from an audio capture device through WASAPI",
+ "Nirbheek Chauhan <nirbheek@centricular.com>, "
"Ole André Vadla Ravnås <ole.andre.ravnas@tandberg.com>");
gstbasesrc_class->get_caps = GST_DEBUG_FUNCPTR (gst_wasapi_src_get_caps);