diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2012-03-29 17:41:53 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2012-03-29 17:41:53 +0200 |
commit | 860ccd414dbb313fabf065b92838f0f39037584b (patch) | |
tree | 0d5c0d3510db3ca3d7e6487420e8d09f74ae1961 /gst/inter/gstinteraudiosink.c | |
parent | a9ec4d62a89dd53aa295af02c7d5f57ef936359b (diff) | |
parent | d84d98943af42ce645ee022207bcf04e747d2d4a (diff) | |
download | gstreamer-plugins-bad-860ccd414dbb313fabf065b92838f0f39037584b.tar.gz |
Merge remote-tracking branch 'origin/0.10'
Conflicts:
NEWS
RELEASE
common
configure.ac
docs/libs/gst-plugins-bad-libs-sections.txt
docs/plugins/gst-plugins-bad-plugins.args
docs/plugins/gst-plugins-bad-plugins.hierarchy
docs/plugins/gst-plugins-bad-plugins.interfaces
docs/plugins/inspect/plugin-adpcmdec.xml
docs/plugins/inspect/plugin-adpcmenc.xml
docs/plugins/inspect/plugin-assrender.xml
docs/plugins/inspect/plugin-audiovisualizers.xml
docs/plugins/inspect/plugin-autoconvert.xml
docs/plugins/inspect/plugin-bayer.xml
docs/plugins/inspect/plugin-bz2.xml
docs/plugins/inspect/plugin-camerabin2.xml
docs/plugins/inspect/plugin-celt.xml
docs/plugins/inspect/plugin-dataurisrc.xml
docs/plugins/inspect/plugin-debugutilsbad.xml
docs/plugins/inspect/plugin-dtmf.xml
docs/plugins/inspect/plugin-dtsdec.xml
docs/plugins/inspect/plugin-dvbsuboverlay.xml
docs/plugins/inspect/plugin-dvdspu.xml
docs/plugins/inspect/plugin-faac.xml
docs/plugins/inspect/plugin-faad.xml
docs/plugins/inspect/plugin-gsm.xml
docs/plugins/inspect/plugin-h264parse.xml
docs/plugins/inspect/plugin-mms.xml
docs/plugins/inspect/plugin-modplug.xml
docs/plugins/inspect/plugin-mpeg2enc.xml
docs/plugins/inspect/plugin-mpegdemux2.xml
docs/plugins/inspect/plugin-mpegtsdemux.xml
docs/plugins/inspect/plugin-mpegvideoparse.xml
docs/plugins/inspect/plugin-mplex.xml
docs/plugins/inspect/plugin-pcapparse.xml
docs/plugins/inspect/plugin-rawparse.xml
docs/plugins/inspect/plugin-rtpmux.xml
docs/plugins/inspect/plugin-rtpvp8.xml
docs/plugins/inspect/plugin-scaletempo.xml
docs/plugins/inspect/plugin-schro.xml
docs/plugins/inspect/plugin-sdp.xml
docs/plugins/inspect/plugin-segmentclip.xml
docs/plugins/inspect/plugin-shm.xml
docs/plugins/inspect/plugin-videomaxrate.xml
docs/plugins/inspect/plugin-videoparsersbad.xml
docs/plugins/inspect/plugin-vp8.xml
docs/plugins/inspect/plugin-y4mdec.xml
ext/celt/gstceltdec.c
ext/dts/gstdtsdec.c
ext/modplug/gstmodplug.cc
ext/opus/gstopusenc.c
gst-libs/gst/video/gstbasevideocodec.c
gst-libs/gst/video/gstbasevideocodec.h
gst-libs/gst/video/gstbasevideodecoder.c
gst-libs/gst/video/gstbasevideodecoder.h
gst-libs/gst/video/gstbasevideoencoder.c
gst-libs/gst/video/gstbasevideoencoder.h
gst/adpcmdec/Makefile.am
gst/audiovisualizers/gstbaseaudiovisualizer.c
gst/h264parse/gsth264parse.c
gst/mpegdemux/mpegtsparse.c
gst/mpegtsdemux/mpegtsbase.c
gst/mpegtsdemux/mpegtspacketizer.c
gst/mpegtsdemux/mpegtsparse.c
gst/mpegtsdemux/tsdemux.c
gst/mpegtsdemux/tsdemux.h
gst/mxf/mxfdemux.c
gst/rawparse/gstaudioparse.c
gst/videoparsers/gsth263parse.c
gst/videoparsers/gsth264parse.c
sys/d3dvideosink/d3dvideosink.c
sys/decklink/gstdecklinksink.cpp
sys/dvb/gstdvbsrc.c
sys/shm/gstshmsrc.c
sys/vdpau/h264/gstvdph264dec.c
sys/vdpau/mpeg/gstvdpmpegdec.c
tests/examples/opencv/gst_element_print_properties.c
win32/common/config.h
Diffstat (limited to 'gst/inter/gstinteraudiosink.c')
-rw-r--r-- | gst/inter/gstinteraudiosink.c | 46 |
1 files changed, 36 insertions, 10 deletions
diff --git a/gst/inter/gstinteraudiosink.c b/gst/inter/gstinteraudiosink.c index e5ba92687..fd5987e35 100644 --- a/gst/inter/gstinteraudiosink.c +++ b/gst/inter/gstinteraudiosink.c @@ -19,14 +19,21 @@ /** * SECTION:element-gstinteraudiosink * - * The interaudiosink element does FIXME stuff. + * The interaudiosink element is an audio sink element. It is used + * in connection with a interaudiosrc element in a different pipeline, + * similar to intervideosink and intervideosrc. * * <refsect2> * <title>Example launch line</title> * |[ - * gst-launch -v fakesrc ! interaudiosink ! FIXME ! fakesink + * gst-launch -v audiotestsrc ! queue ! interaudiosink * ]| - * FIXME Describe what the pipeline does. + * + * The interaudiosink element cannot be used effectively with gst-launch, + * as it requires a second pipeline in the application to receive the + * audio. + * See the gstintertest.c example in the gst-plugins-bad source code for + * more details. * </refsect2> */ @@ -91,8 +98,7 @@ GST_STATIC_PAD_TEMPLATE ("sink", "endianness = (int) BYTE_ORDER, " "signed = (boolean) true, " "width = (int) 16, " - "depth = (int) 16, " - "rate = (int) [ 1, MAX ], " "channels = (int) [ 1, 2 ]") + "depth = (int) 16, " "rate = (int) 48000, " "channels = (int) 2") ); @@ -113,8 +119,11 @@ gst_inter_audio_sink_base_init (gpointer g_class) gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&gst_inter_audio_sink_sink_template)); - gst_element_class_set_details_simple (element_class, "FIXME Long name", - "Generic", "FIXME Description", "FIXME <fixme@example.com>"); + gst_element_class_set_details_simple (element_class, + "Internal audio sink", + "Sink/Audio", + "Virtual audio sink for internal process communication", + "David Schleef <ds@schleef.org>"); } static void @@ -151,26 +160,32 @@ gst_inter_audio_sink_class_init (GstInterAudioSinkClass * klass) base_sink_class->unlock_stop = GST_DEBUG_FUNCPTR (gst_inter_audio_sink_unlock_stop); +#if 0 g_object_class_install_property (gobject_class, PROP_CHANNEL, g_param_spec_string ("channel", "Channel", "Channel name to match inter src and sink elements", "default", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); +#endif } static void gst_inter_audio_sink_init (GstInterAudioSink * interaudiosink, GstInterAudioSinkClass * interaudiosink_class) { - interaudiosink->surface = gst_inter_surface_get ("default"); + interaudiosink->channel = g_strdup ("default"); } void gst_inter_audio_sink_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { - /* GstInterAudioSink *interaudiosink = GST_INTER_AUDIO_SINK (object); */ + GstInterAudioSink *interaudiosink = GST_INTER_AUDIO_SINK (object); switch (property_id) { + case PROP_CHANNEL: + g_free (interaudiosink->channel); + interaudiosink->channel = g_value_dup_string (value); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); break; @@ -181,9 +196,12 @@ void gst_inter_audio_sink_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { - /* GstInterAudioSink *interaudiosink = GST_INTER_AUDIO_SINK (object); */ + GstInterAudioSink *interaudiosink = GST_INTER_AUDIO_SINK (object); switch (property_id) { + case PROP_CHANNEL: + g_value_set_string (value, interaudiosink->channel); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); break; @@ -259,6 +277,11 @@ gst_inter_audio_sink_get_times (GstBaseSink * sink, GstBuffer * buffer, static gboolean gst_inter_audio_sink_start (GstBaseSink * sink) { + GstInterAudioSink *interaudiosink = GST_INTER_AUDIO_SINK (sink); + + GST_DEBUG ("start"); + + interaudiosink->surface = gst_inter_surface_get (interaudiosink->channel); return TRUE; } @@ -274,6 +297,9 @@ gst_inter_audio_sink_stop (GstBaseSink * sink) gst_adapter_clear (interaudiosink->surface->audio_adapter); g_mutex_unlock (interaudiosink->surface->mutex); + gst_inter_surface_unref (interaudiosink->surface); + interaudiosink->surface = NULL; + return TRUE; } |