From 6335307b9739beb568f986bfc8a4c1e1fb2b8e31 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Thu, 29 Jan 2009 10:10:08 +0200 Subject: [PATCH] Update and add documentation for platform specific plugins (sys). Link to properties. Correct titles for examples. Fix examples. --- sys/directdraw/gstdirectdrawsink.c | 16 ++++++---------- sys/directsound/gstdirectsoundsink.c | 23 +++++++---------------- sys/oss/gstossmixerelement.c | 10 ++++------ sys/oss/gstosssink.c | 24 ++++++++---------------- sys/oss/gstosssrc.c | 14 +++++--------- sys/osxaudio/gstosxaudio.c | 20 -------------------- sys/osxaudio/gstosxaudiosink.c | 16 +++++++++------- sys/osxaudio/gstosxaudiosrc.c | 12 ++++++------ sys/osxvideo/osxvideosink.m | 24 ++++++++++-------------- sys/sunaudio/gstsunaudiomixer.c | 4 ---- sys/sunaudio/gstsunaudiosink.c | 13 +++++-------- sys/sunaudio/gstsunaudiosrc.c | 14 +++++--------- sys/v4l2/gstv4l2src.c | 18 +++++++----------- sys/waveform/gstwaveformsink.c | 28 +++++++++------------------- sys/ximage/gstximagesrc.c | 25 +++++++++++-------------- 15 files changed, 92 insertions(+), 169 deletions(-) diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index caa2800..26babd9 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -25,21 +25,17 @@ /** * SECTION:element-directdrawsink * - * - * * DirectdrawSink renders video RGB frames to any win32 window. This element - * can receive a window ID from the application through the XOverlay interface + * can receive a window ID from the application through the #XOverlay interface * and will then render video frames in this window. * If no Window ID was provided by the application, the element will create its * own internal window and render into it. - * - * Examples - * - * Here is a simple pipeline to test the sink : - * + * + * + * Example pipelines + * |[ * gst-launch-0.10 -v videotestsrc ! directdrawsink - * - * + * ]| a simple pipeline to test the sink * */ diff --git a/sys/directsound/gstdirectsoundsink.c b/sys/directsound/gstdirectsoundsink.c index bb9d38c..037a72a 100644 --- a/sys/directsound/gstdirectsoundsink.c +++ b/sys/directsound/gstdirectsoundsink.c @@ -27,32 +27,23 @@ /** * SECTION:element-directsoundsink - * @short_description: output sound using Directsound API * - * - * * This element lets you output sound using the DirectSound API. - * - * + * * Note that you should almost always use generic audio conversion elements * like audioconvert and audioresample in front of an audiosink to make sure * your pipeline works under all circumstances (those conversion elements will * act in passthrough-mode if no conversion is necessary). - * + * + * * Example pipelines - * - * + * |[ * gst-launch-0.10 -v audiotestsrc ! audioconvert ! volume volume=0.1 ! directsoundsink - * - * will output a sine wave (continuous beep sound) to your sound card (with + * ]| will output a sine wave (continuous beep sound) to your sound card (with * a very low volume as precaution). - * - * - * + * |[ * gst-launch-0.10 -v filesrc location=music.ogg ! decodebin ! audioconvert ! audioresample ! directsoundsink - * - * will play an Ogg/Vorbis audio file and output it. - * + * ]| will play an Ogg/Vorbis audio file and output it. * */ diff --git a/sys/oss/gstossmixerelement.c b/sys/oss/gstossmixerelement.c index 3ca3abb..0988e36 100644 --- a/sys/oss/gstossmixerelement.c +++ b/sys/oss/gstossmixerelement.c @@ -19,15 +19,13 @@ /** * SECTION:element-ossmixer - * @short_description: element to control sound input and output levels with OSS * - * - * * This element lets you adjust sound input and output levels with the - * Open Sound System (OSS). It supports the GstMixer interface, which can be + * Open Sound System (OSS). 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. - * + * READY state before using the #GstMixer interface on it. + * + * * Example pipelines * * ossmixer can't be used in a sensible way in gst-launch. diff --git a/sys/oss/gstosssink.c b/sys/oss/gstosssink.c index 43fc167..c508140 100644 --- a/sys/oss/gstosssink.c +++ b/sys/oss/gstosssink.c @@ -22,32 +22,23 @@ /** * SECTION:element-osssink - * @short_description: output sound using OSS * - * - * * This element lets you output sound using the Open Sound System (OSS). - * - * + * * Note that you should almost always use generic audio conversion elements * like audioconvert and audioresample in front of an audiosink to make sure * your pipeline works under all circumstances (those conversion elements will * act in passthrough-mode if no conversion is necessary). - * + * + * * Example pipelines - * - * + * |[ * gst-launch -v audiotestsrc ! audioconvert ! volume volume=0.1 ! osssink - * - * will output a sine wave (continuous beep sound) to your sound card (with + * ]| will output a sine wave (continuous beep sound) to your sound card (with * a very low volume as precaution). - * - * - * + * |[ * gst-launch -v filesrc location=music.ogg ! decodebin ! audioconvert ! audioresample ! osssink - * - * will play an Ogg/Vorbis audio file and output it using the Open Sound System. - * + * ]| will play an Ogg/Vorbis audio file and output it using the Open Sound System. * */ @@ -197,6 +188,7 @@ gst_oss_sink_base_init (gpointer g_class) gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&osssink_sink_factory)); } + static void gst_oss_sink_class_init (GstOssSinkClass * klass) { diff --git a/sys/oss/gstosssrc.c b/sys/oss/gstosssrc.c index 64b3736..026ba2a 100644 --- a/sys/oss/gstosssrc.c +++ b/sys/oss/gstosssrc.c @@ -22,21 +22,16 @@ /** * SECTION:element-osssrc - * @short_description: record sound from your sound card using OSS * - * - * * This element lets you record sound using the Open Sound System (OSS). - * + * + * * Example pipelines - * - * + * |[ * gst-launch -v osssrc ! audioconvert ! vorbisenc ! oggmux ! filesink location=mymusic.ogg - * - * will record sound from your sound card using OSS and encode it to an + * ]| will record sound from your sound card using OSS and encode it to an * Ogg/Vorbis file (this will only work if your mixer settings are right * and the right inputs enabled etc.) - * * */ @@ -147,6 +142,7 @@ gst_oss_src_base_init (gpointer g_class) gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&osssrc_src_factory)); } + static void gst_oss_src_class_init (GstOssSrcClass * klass) { diff --git a/sys/osxaudio/gstosxaudio.c b/sys/osxaudio/gstosxaudio.c index 262c7d9..1ddfce4 100644 --- a/sys/osxaudio/gstosxaudio.c +++ b/sys/osxaudio/gstosxaudio.c @@ -23,26 +23,6 @@ * */ -/** - * SECTION:element-osxaudiosink - * @short_description: play audio to an CoreAudio device - * - * - * - * This element renders raw audio samples using the CoreAudio api. - * - * Example pipelines - * - * Play an Ogg/Vorbis file. - * - * - * gst-launch -v filesrc location=sine.ogg ! oggdemux ! vorbisdec ! audioconvert ! audioresample ! osxaudiosink - * - * - * - * Last reviewed on 2006-03-01 (0.10.4) - */ - #ifdef HAVE_CONFIG_H #include "config.h" #endif diff --git a/sys/osxaudio/gstosxaudiosink.c b/sys/osxaudio/gstosxaudiosink.c index aec8874..9447e65 100644 --- a/sys/osxaudio/gstosxaudiosink.c +++ b/sys/osxaudio/gstosxaudiosink.c @@ -47,16 +47,18 @@ */ /** - * SECTION:element-plugin + * SECTION:element-osxaudiosink + * + * This element renders raw audio samples using the CoreAudio api. * * - * Example launch line - * - * - * gst-launch -v -m audiotestsrc ! audioconvert ! osxaudiosink - * - * + * Example pipelines + * |[ + * gst-launch filesrc location=sine.ogg ! oggdemux ! vorbisdec ! audioconvert ! audioresample ! osxaudiosink + * ]| Play an Ogg/Vorbis file. * + * + * Last reviewed on 2006-03-01 (0.10.4) */ #ifdef HAVE_CONFIG_H diff --git a/sys/osxaudio/gstosxaudiosrc.c b/sys/osxaudio/gstosxaudiosrc.c index 1d99e8d..9acf440 100644 --- a/sys/osxaudio/gstosxaudiosrc.c +++ b/sys/osxaudio/gstosxaudiosrc.c @@ -43,15 +43,15 @@ */ /** - * SECTION:element-plugin + * SECTION:element-osxaudiosrc + * + * This element captures raw audio samples using the CoreAudio api. * * * Example launch line - * - * - * gst-launch -v -m osxaudiosrc ! fakesink - * - * + * |[ + * gst-launch osxaudiosrc ! wavenc ! filesink location=audio.wav + * ]| * */ diff --git a/sys/osxvideo/osxvideosink.m b/sys/osxvideo/osxvideosink.m index a72171e..3022197 100644 --- a/sys/osxvideo/osxvideosink.m +++ b/sys/osxvideo/osxvideosink.m @@ -26,23 +26,19 @@ /** * SECTION:element-osxvideosink * - * - * * The OSXVideoSink renders video frames to a MacOSX window. The video output * can be directed to a window embedded in an existing NSApp. This can be done - * by setting the "embed" property to #TRUE. When the NSView to be embedded is - * created an element #GstMessage with a name of 'have-ns-view' will be created - * and posted on the bus. The pointer to the NSView to embed will be in the - * 'nsview' field of that message. If no embedding is requested, the plugin will - * create a standalone window. - * + * by setting the #GstOSXVideoSink:embed property to %TRUE. When the NSView to + * be embedded is created an element #GstMessage with a name of 'have-ns-view' + * will be created and posted on the bus. The pointer to the NSView to embed + * will be in the 'nsview' field of that message. If no embedding is requested, + * the plugin will create a standalone window. + * + * * Examples - * - * Simple timeline to test the sink : - * - * gst-launch-0.10 -v videotestsrc ! osxvideosink - * - * + * |[ + * gst-launch-0.10 videotestsrc ! osxvideosink + * ]| test the sink * */ diff --git a/sys/sunaudio/gstsunaudiomixer.c b/sys/sunaudio/gstsunaudiomixer.c index 4789550..f7dd0d9 100644 --- a/sys/sunaudio/gstsunaudiomixer.c +++ b/sys/sunaudio/gstsunaudiomixer.c @@ -22,12 +22,8 @@ /** * SECTION:element-sunaudiomixer * - * - * * sunaudiomixer is an mixer that controls the sound input and output * levels with the Sun Audio interface available in Solaris. - * - * */ #ifdef HAVE_CONFIG_H diff --git a/sys/sunaudio/gstsunaudiosink.c b/sys/sunaudio/gstsunaudiosink.c index 6718f70..8bf129e 100644 --- a/sys/sunaudio/gstsunaudiosink.c +++ b/sys/sunaudio/gstsunaudiosink.c @@ -24,17 +24,14 @@ /** * SECTION:element-sunaudiosink * - * - * * sunaudiosink is an audio sink designed to work with the Sun Audio * interface available in Solaris. - * + * + * * Example launch line - * - * - * gst-launch -v sinesrc ! sunaudiosink - * - * + * |[ + * gst-launch audiotestsrc volume=0.5 ! sunaudiosink + * ]| * */ diff --git a/sys/sunaudio/gstsunaudiosrc.c b/sys/sunaudio/gstsunaudiosrc.c index 470c981..9f8ecc4 100644 --- a/sys/sunaudio/gstsunaudiosrc.c +++ b/sys/sunaudio/gstsunaudiosrc.c @@ -24,18 +24,14 @@ /** * SECTION:element-sunaudiosrc * - * - * * sunaudiosrc is an audio source designed to work with the Sun Audio * interface available in Solaris. - * + * + * * Example launch line - * - * - * - * gst-launch sunaudiosrc ! filesink location=outfile - * - * + * |[ + * gst-launch sunaudiosrc ! wavenc ! filesink location=audio.wav + * ]| * */ diff --git a/sys/v4l2/gstv4l2src.c b/sys/v4l2/gstv4l2src.c index 4520f97..6983d69 100644 --- a/sys/v4l2/gstv4l2src.c +++ b/sys/v4l2/gstv4l2src.c @@ -24,23 +24,19 @@ /** * SECTION:element-v4l2src * + * v4l2src can be used to capture video from v4l2 devices, like webcams and tv + * cards. + * * - * v4l2src can be used to capture video from v4l2 devices, like webcams and tv cards. * Example launch lines - * - * + * |[ * gst-launch v4l2src ! xvimagesink - * - * This pipeline shows the video captured from /dev/video0 tv card and for + * ]| This pipeline shows the video captured from /dev/video0 tv card and for * webcams. - * - * - * + * |[ * gst-launch-0.10 v4l2src ! jpegdec ! xvimagesink - * - * This pipeline shows the video captured from a webcam that delivers jpeg + * ]| This pipeline shows the video captured from a webcam that delivers jpeg * images. - * * */ diff --git a/sys/waveform/gstwaveformsink.c b/sys/waveform/gstwaveformsink.c index e709d64..a561416 100644 --- a/sys/waveform/gstwaveformsink.c +++ b/sys/waveform/gstwaveformsink.c @@ -21,32 +21,23 @@ /** * SECTION:element-waveformsink - * @short_description: output sound using WaveForm API * - * - * - * This element lets you output sound using the WaveForm API. - * - * + * This element lets you output sound using the Windows WaveForm API. + * * Note that you should almost always use generic audio conversion elements * like audioconvert and audioresample in front of an audiosink to make sure * your pipeline works under all circumstances (those conversion elements will * act in passthrough-mode if no conversion is necessary). - * + * + * * Example pipelines - * - * + * |[ * gst-launch-0.10 -v audiotestsrc ! audioconvert ! volume volume=0.1 ! waveformsink - * - * will output a sine wave (continuous beep sound) to your sound card (with + * ]| will output a sine wave (continuous beep sound) to your sound card (with * a very low volume as precaution). - * - * - * + * |[ * gst-launch-0.10 -v filesrc location=music.ogg ! decodebin ! audioconvert ! audioresample ! waveformsink - * - * will play an Ogg/Vorbis audio file and output it. - * + * ]| will play an Ogg/Vorbis audio file and output it. * */ @@ -435,8 +426,7 @@ gst_waveform_sink_unprepare (GstAudioSink * asink) for (index = 0; index < wfsink->buffer_count; index++) { if (wfsink->wave_buffers[index].dwFlags & WHDR_PREPARED) { - MMRESULT mmresult = - waveOutUnprepareHeader (wfsink->hwaveout, + MMRESULT mmresult = waveOutUnprepareHeader (wfsink->hwaveout, &wfsink->wave_buffers[index], sizeof (WAVEHDR)); if (mmresult != MMSYSERR_NOERROR) { waveOutGetErrorText (mmresult, wfsink->error_string, diff --git a/sys/ximage/gstximagesrc.c b/sys/ximage/gstximagesrc.c index 5f02b95..1528812 100644 --- a/sys/ximage/gstximagesrc.c +++ b/sys/ximage/gstximagesrc.c @@ -20,23 +20,18 @@ /** * SECTION:element-ximagesrc - * @short_description: a source that captures your X Display * - * - * * This element captures your X Display and creates raw RGB video. It uses * the XDamage extension if available to only capture areas of the screen that * have changed since the last frame. It uses the XFixes extension if * available to also capture your mouse pointer. By default it will fixate to * 25 frames per second. - * + * + * * Example pipelines - * - * - * gst-launch -v ximagesrc ! video/x-raw-rgb,framerate=5/1 ! ffmpegcolorspace ! theoraenc ! oggmux ! filesink location=desktop.ogg - * - * Encodes your X display to an Ogg theora video at 5 frames per second. - * + * |[ + * gst-launch ximagesrc ! video/x-raw-rgb,framerate=5/1 ! ffmpegcolorspace ! theoraenc ! oggmux ! filesink location=desktop.ogg + * ]| Encodes your X display to an Ogg theora video at 5 frames per second. * */ @@ -941,12 +936,14 @@ gst_ximage_src_get_caps (GstBaseSrc * bs) gint x, y, width, height; if ((!s->xcontext) && (!gst_ximage_src_open_display (s, s->display_name))) - return gst_caps_copy (gst_pad_get_pad_template_caps (GST_BASE_SRC (s)-> - srcpad)); + return + gst_caps_copy (gst_pad_get_pad_template_caps (GST_BASE_SRC + (s)->srcpad)); if (!gst_ximage_src_recalc (s)) - return gst_caps_copy (gst_pad_get_pad_template_caps (GST_BASE_SRC (s)-> - srcpad)); + return + gst_caps_copy (gst_pad_get_pad_template_caps (GST_BASE_SRC + (s)->srcpad)); xcontext = s->xcontext; -- 2.7.4