| GStreamer Base Plugins 1.0 Plugins Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Properties | ||||
GObject
+----GInitiallyUnowned
+----GstObject
+----GstElement
+----GstBaseSrc
+----GstAudioTestSrc
"can-activate-pull" gboolean : Read / Write "can-activate-push" gboolean : Read / Write "freq" gdouble : Read / Write "is-live" gboolean : Read / Write "samplesperbuffer" gint : Read / Write "timestamp-offset" gint64 : Read / Write "volume" gdouble : Read / Write "wave" GstAudioTestSrcWave : Read / Write
AudioTestSrc can be used to generate basic audio signals. It support several different waveforms and allows to set the base frequency and volume.
1 |
gst-launch-1.0 audiotestsrc ! audioconvert ! autoaudiosink |
1 |
gst-launch-1.0 audiotestsrc wave=2 freq=200 ! tee name=t ! queue ! audioconvert ! autoaudiosink t. ! queue ! audioconvert ! libvisual_lv_scope ! videoconvert ! autovideosink |
plugin |
audiotestsrc |
author |
Stefan Kost <ensonic@users.sf.net> |
class |
Source/Audio |
name |
src |
direction |
source |
presence |
always |
details |
audio/x-raw, format=(string){ S16LE, S16BE, U16LE, U16BE, S24_32LE, S24_32BE, U24_32LE, U24_32BE, S32LE, S32BE, U32LE, U32BE, S24LE, S24BE, U24LE, U24BE, S20LE, S20BE, U20LE, U20BE, S18LE, S18BE, U18LE, U18BE, F32LE, F32BE, F64LE, F64BE, S8, U8 }, layout=(string)interleaved, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ] |
typedef enum {
GST_AUDIO_TEST_SRC_WAVE_SINE,
GST_AUDIO_TEST_SRC_WAVE_SQUARE,
GST_AUDIO_TEST_SRC_WAVE_SAW,
GST_AUDIO_TEST_SRC_WAVE_TRIANGLE,
GST_AUDIO_TEST_SRC_WAVE_SILENCE,
GST_AUDIO_TEST_SRC_WAVE_WHITE_NOISE,
GST_AUDIO_TEST_SRC_WAVE_PINK_NOISE,
GST_AUDIO_TEST_SRC_WAVE_SINE_TAB,
GST_AUDIO_TEST_SRC_WAVE_TICKS,
GST_AUDIO_TEST_SRC_WAVE_GAUSSIAN_WHITE_NOISE,
GST_AUDIO_TEST_SRC_WAVE_RED_NOISE,
GST_AUDIO_TEST_SRC_WAVE_BLUE_NOISE,
GST_AUDIO_TEST_SRC_WAVE_VIOLET_NOISE
} GstAudioTestSrcWave;
Different types of supported sound waves.
| a sine wave | |
| a square wave | |
| a saw wave | |
| a tringle wave | |
| silence | |
| white uniform noise | |
| pink noise | |
| sine wave using a table | |
| periodic ticks | |
| white (zero mean) Gaussian noise; volume sets the standard deviation of the noise in units of the range of values of the sample type, e.g. volume=0.1 produces noise with a standard deviation of 0.1*32767=3277 with 16-bit integer samples, or 0.1*1.0=0.1 with floating-point samples. | |
| red (brownian) noise | |
| spectraly inverted pink noise | |
| spectraly inverted red (brownian) noise |
"can-activate-pull" property "can-activate-pull" gboolean : Read / Write
Can activate in pull mode.
Default value: FALSE
"can-activate-push" property "can-activate-push" gboolean : Read / Write
Can activate in push mode.
Default value: TRUE
"freq" property "freq" gdouble : Read / Write
Frequency of test signal. The sample rate needs to be at least 4 times higher.
Allowed values: [0,5.36871e+08]
Default value: 440
"is-live" property "is-live" gboolean : Read / Write
Whether to act as a live source.
Default value: FALSE
"samplesperbuffer" property "samplesperbuffer" gint : Read / Write
Number of samples in each outgoing buffer.
Allowed values: >= 1
Default value: 1024
"timestamp-offset" property "timestamp-offset" gint64 : Read / Write
An offset added to timestamps set on buffers (in ns).
Default value: 0
"volume" property "volume" gdouble : Read / Write
Volume of test signal.
Allowed values: [0,1]
Default value: 0.8
"wave" property"wave" GstAudioTestSrcWave : Read / Write
Oscillator waveform.
Default value: Sine