From 7390985262efef9c51d3f68dc132291e823f1f47 Mon Sep 17 00:00:00 2001 From: Sebastian Dröge Date: Tue, 10 Jun 2008 08:22:17 +0000 Subject: Add documentation to the pulseaudio plugin and run make update in docs/plugins. Original commit message from CVS: * docs/plugins/Makefile.am: * docs/plugins/gst-plugins-good-plugins-docs.sgml: * docs/plugins/gst-plugins-good-plugins-sections.txt: * docs/plugins/gst-plugins-good-plugins.args: * docs/plugins/gst-plugins-good-plugins.hierarchy: * docs/plugins/gst-plugins-good-plugins.interfaces: * docs/plugins/gst-plugins-good-plugins.prerequisites: * docs/plugins/inspect/plugin-aasink.xml: * docs/plugins/inspect/plugin-alaw.xml: * docs/plugins/inspect/plugin-alpha.xml: * docs/plugins/inspect/plugin-alphacolor.xml: * docs/plugins/inspect/plugin-annodex.xml: * docs/plugins/inspect/plugin-apetag.xml: * docs/plugins/inspect/plugin-audiofx.xml: * docs/plugins/inspect/plugin-auparse.xml: * docs/plugins/inspect/plugin-autodetect.xml: * docs/plugins/inspect/plugin-avi.xml: * docs/plugins/inspect/plugin-cacasink.xml: * docs/plugins/inspect/plugin-cairo.xml: * docs/plugins/inspect/plugin-cdio.xml: * docs/plugins/inspect/plugin-cutter.xml: * docs/plugins/inspect/plugin-debug.xml: * docs/plugins/inspect/plugin-dv.xml: * docs/plugins/inspect/plugin-efence.xml: * docs/plugins/inspect/plugin-effectv.xml: * docs/plugins/inspect/plugin-equalizer.xml: * docs/plugins/inspect/plugin-esdsink.xml: * docs/plugins/inspect/plugin-flac.xml: * docs/plugins/inspect/plugin-flxdec.xml: * docs/plugins/inspect/plugin-gamma.xml: * docs/plugins/inspect/plugin-gconfelements.xml: * docs/plugins/inspect/plugin-gdkpixbuf.xml: * docs/plugins/inspect/plugin-goom.xml: * docs/plugins/inspect/plugin-goom2k1.xml: * docs/plugins/inspect/plugin-halelements.xml: * docs/plugins/inspect/plugin-icydemux.xml: * docs/plugins/inspect/plugin-id3demux.xml: * docs/plugins/inspect/plugin-jpeg.xml: * docs/plugins/inspect/plugin-level.xml: * docs/plugins/inspect/plugin-matroska.xml: * docs/plugins/inspect/plugin-monoscope.xml: * docs/plugins/inspect/plugin-mulaw.xml: * docs/plugins/inspect/plugin-multifile.xml: * docs/plugins/inspect/plugin-multipart.xml: * docs/plugins/inspect/plugin-navigationtest.xml: * docs/plugins/inspect/plugin-ossaudio.xml: * docs/plugins/inspect/plugin-png.xml: * docs/plugins/inspect/plugin-pulseaudio.xml: * docs/plugins/inspect/plugin-quicktime.xml: * docs/plugins/inspect/plugin-rtp.xml: * docs/plugins/inspect/plugin-rtsp.xml: * docs/plugins/inspect/plugin-smpte.xml: * docs/plugins/inspect/plugin-soup.xml: * docs/plugins/inspect/plugin-spectrum.xml: * docs/plugins/inspect/plugin-speex.xml: * docs/plugins/inspect/plugin-taglib.xml: * docs/plugins/inspect/plugin-udp.xml: * docs/plugins/inspect/plugin-video4linux2.xml: * docs/plugins/inspect/plugin-videobalance.xml: * docs/plugins/inspect/plugin-videobox.xml: * docs/plugins/inspect/plugin-videocrop.xml: * docs/plugins/inspect/plugin-videoflip.xml: * docs/plugins/inspect/plugin-videomixer.xml: * docs/plugins/inspect/plugin-wavenc.xml: * docs/plugins/inspect/plugin-wavpack.xml: * docs/plugins/inspect/plugin-wavparse.xml: * docs/plugins/inspect/plugin-ximagesrc.xml: * ext/pulse/plugin.c: * ext/pulse/pulsemixer.c: * ext/pulse/pulsesink.c: * ext/pulse/pulsesrc.c: Add documentation to the pulseaudio plugin and run make update in docs/plugins. --- ext/pulse/plugin.c | 2 +- ext/pulse/pulsemixer.c | 19 +++++++++++++++++++ ext/pulse/pulsesink.c | 36 ++++++++++++++++++++++++++++++++---- ext/pulse/pulsesrc.c | 24 ++++++++++++++++++++++-- 4 files changed, 74 insertions(+), 7 deletions(-) (limited to 'ext/pulse') 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 + * + * + * + * 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. + * + * Example pipelines + * + * pulsemixer can't be used in a sensible way in gst-launch. + * + * + */ + #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 + * + * + * + * This element outputs audio to a PulseAudio sound server. + * + * Example pipelines + * + * + * gst-launch -v filesrc location=sine.ogg ! oggdemux ! vorbisdec ! audioconvert ! audioresample ! pulsesink + * + * Play an Ogg/Vorbis file. + * + * + * + * gst-launch -v audiotestsrc ! audioconvert ! volume volume=0.4 ! pulsesink + * + * Play a 440Hz sine wave. + * + * + * + */ + #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 + * + * + * + * This element captures audio from a PulseAudio sound server. + * + * Example pipelines + * + * + * gst-launch -v pulsesrc ! audioconvert ! vorbisenc ! oggmux ! filesink location=alsasrc.ogg + * + * Record from a sound card using ALSA and encode to Ogg/Vorbis. + * + * + */ + #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; } -- cgit