diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/pulse/plugin.c | 2 | ||||
-rw-r--r-- | ext/pulse/pulsemixer.c | 19 | ||||
-rw-r--r-- | ext/pulse/pulsesink.c | 36 | ||||
-rw-r--r-- | ext/pulse/pulsesrc.c | 24 |
4 files changed, 74 insertions, 7 deletions
diff --git a/ext/pulse/plugin.c b/ext/pulse/plugin.c index 9cfb4699..22c768a5 100644 --- a/ext/pulse/plugin.c +++ b/ext/pulse/plugin.c @@ -52,5 +52,5 @@ plugin_init (GstPlugin * plugin) GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, "pulseaudio", - "PulseAudio Elements Plugin", + "PulseAudio plugin library", plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN) diff --git a/ext/pulse/pulsemixer.c b/ext/pulse/pulsemixer.c index e2957aa6..25e8631e 100644 --- a/ext/pulse/pulsemixer.c +++ b/ext/pulse/pulsemixer.c @@ -19,6 +19,25 @@ * USA. */ +/** + * SECTION:element-pulsemixer + * @short_description: Element to control sound input and output levels for the PulseAudio sound server + * @see_also: pulsesrc, pulsesink + * + * <refsect2> + * <para> + * This element lets you adjust sound input and output levels for the + * PulseAudio sound server. It supports the GstMixer interface, which can be + * used to obtain a list of available mixer tracks. Set the mixer element to + * READY state before using the GstMixer interface on it. + * </para> + * <title>Example pipelines</title> + * <para> + * pulsemixer can't be used in a sensible way in gst-launch. + * </para> + * </refsect2> + */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif diff --git a/ext/pulse/pulsesink.c b/ext/pulse/pulsesink.c index 0d24d39a..1b7ab69d 100644 --- a/ext/pulse/pulsesink.c +++ b/ext/pulse/pulsesink.c @@ -19,6 +19,32 @@ * USA. */ +/** + * SECTION:element-pulsesink + * @short_description: Output audio to a PulseAudio sound server + * @see_also: pulsesrc, pulsemixer + * + * <refsect2> + * <para> + * This element outputs audio to a PulseAudio sound server. + * </para> + * <title>Example pipelines</title> + * <para> + * <programlisting> + * gst-launch -v filesrc location=sine.ogg ! oggdemux ! vorbisdec ! audioconvert ! audioresample ! pulsesink + * </programlisting> + * Play an Ogg/Vorbis file. + * </para> + * <para> + * <programlisting> + * gst-launch -v audiotestsrc ! audioconvert ! volume volume=0.4 ! pulsesink + * </programlisting> + * Play a 440Hz sine wave. + * </para> + * </refsect2> + * + */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -414,14 +440,16 @@ gst_pulsesink_prepare (GstAudioSink * asink, GstRingBufferSpec * spec) if (!pulsesink->context || pa_context_get_state (pulsesink->context) != PA_CONTEXT_READY) { GST_ELEMENT_ERROR (pulsesink, RESOURCE, FAILED, ("Bad context state: %s", - pulsesink->context ? pa_strerror (pa_context_errno (pulsesink-> - context)) : NULL), (NULL)); + pulsesink-> + context ? pa_strerror (pa_context_errno (pulsesink->context)) : + NULL), (NULL)); goto unlock_and_fail; } if (!(pulsesink->stream = pa_stream_new (pulsesink->context, - pulsesink->stream_name ? pulsesink-> - stream_name : "Playback Stream", &pulsesink->sample_spec, + pulsesink-> + stream_name ? pulsesink->stream_name : "Playback Stream", + &pulsesink->sample_spec, gst_pulse_gst_to_channel_map (&channel_map, spec)))) { GST_ELEMENT_ERROR (pulsesink, RESOURCE, FAILED, ("Failed to create stream: %s", diff --git a/ext/pulse/pulsesrc.c b/ext/pulse/pulsesrc.c index e69c5edd..f4ba128b 100644 --- a/ext/pulse/pulsesrc.c +++ b/ext/pulse/pulsesrc.c @@ -19,6 +19,25 @@ * USA. */ +/** + * SECTION:element-pulsesrc + * @short_description: Capture audio from a PulseAudio sound server + * @see_also: pulsesink, pulsemixer + * + * <refsect2> + * <para> + * This element captures audio from a PulseAudio sound server. + * </para> + * <title>Example pipelines</title> + * <para> + * <programlisting> + * gst-launch -v pulsesrc ! audioconvert ! vorbisenc ! oggmux ! filesink location=alsasrc.ogg + * </programlisting> + * Record from a sound card using ALSA and encode to Ogg/Vorbis. + * </para> + * </refsect2> + */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -452,8 +471,9 @@ gst_pulsesrc_prepare (GstAudioSrc * asrc, GstRingBufferSpec * spec) if (!pulsesrc->context || pa_context_get_state (pulsesrc->context) != PA_CONTEXT_READY) { GST_ELEMENT_ERROR (pulsesrc, RESOURCE, FAILED, ("Bad context state: %s", - pulsesrc->context ? pa_strerror (pa_context_errno (pulsesrc-> - context)) : NULL), (NULL)); + pulsesrc-> + context ? pa_strerror (pa_context_errno (pulsesrc->context)) : + NULL), (NULL)); goto unlock_and_fail; } |