Commit graph

27 commits

Author SHA1 Message Date
Niels De Graef
f91659ba92 audiotestsrc: Use G_DECLARE_FINAL_TYPE 2020-03-16 15:47:58 +00:00
Carlos Rafael Giani
c656cfb170 audiotestsrc: Improvements to the "ticks" wave
(Initially discussed in
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/305)

The ticks waveform can be useful for audio synchronization diagnostics
and other cases where the time offset between waveforms is important.
However, in its current form, it is too limited, and has problems with
discontinuities, which result in severe artifacts when this waveform
is output by a DAC.

This patch fixes some discontinuities and considerably expand the ticks
waveform's flexibility. They also introduce the notion of a "marker tick";
every Nth tick can have a different amplitude (usually one that is larger
than the others). This is useful for combining frequent oscilloscope
triggering with large time offset detection. For example, without marker
ticks, the tick intervals must not be too small, otherwise the maximum time
offset that can be unambiguously detected is quite small (for example, if
the interval is 50ms, then no time offset larger than 25ms can be
unambiguously recognized). If the tick intervals are too far apart, then
no sudden changes can be clearly observed, since the oscilloscope is not
updated quickly enough. But with marker ticks, this is not an issue: If
there's for example a tick every 100 ms, then the oscilloscope can be
triggered every 100 ms. And, if every 20th tick is a marker tick, then
time offsets of up to 1 second can be discovered, even though the time
between ticks is 100 ms.

The patch also applies some minor cleanup to the audiotestsrc documentation.
2019-01-10 16:15:47 +00:00
Wim Taymans
b0bf294a62 audiotestsrc: add support for all formats
Use the pack functions to also support the other audio formats we
have.
2015-11-02 13:22:18 +01:00
Tim-Philipp Müller
5f59b4f7ee Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 23:05:09 +00:00
Sebastian Dröge
0f654f3feb Merge branch 'master' into 0.11
Conflicts:
	docs/libs/Makefile.am
	tests/check/elements/decodebin2.c
2011-09-08 14:42:00 +02:00
Stefan Sauer
abc96efb2a docs: add two mising enum docs 2011-09-07 14:14:02 +02:00
Wim Taymans
dae848818d audio: rework audio caps.
Rework the audio caps similar to the video caps. Remove
width/depth/endianness/signed fields and replace with a simple string
format and media type audio/x-raw.
Create a GstAudioInfo and some helper methods to parse caps.
Remove duplicate code from the ringbuffer and replace with audio info.
Use AudioInfo in the base audio filter class.
Port elements to new API.
2011-08-18 19:15:03 +02:00
Stefan Kost
5cd0e0f666 audiotestsrc: add blue and violet noise by using spectral inversion
Add blue and violet noise by spectral inversion of pink and red noise.
Fixes #649969
2011-05-26 00:18:55 +03:00
Stefan Kost
1cf831e74e audiotestsrc: add red (brownian) noise generator
Add another noise generator which produces a quite dark noise color.

Fixes parts of #649969.
2011-05-25 23:43:56 +03:00
Leo Singer
82199c5815 audiotestsrc: each element gets its own instance of GRand, if needed
As a result, pipelines that contain multiple instances of audiotestsrc
with the 'wave' property set to 'white-noise', 'pink-noise', or
'gaussian-noise' will run much faster, since they won't be competing
for access to the global, lock-protected instance of GRand.

Fixes bug #642720.
2011-02-19 08:37:46 +01:00
Stefan Kost
718edb5c14 audiotestsrc: implement reverse playback
Support playback at negative rates. When having a GstController assigned, the
element will produce time dependend output.
2010-04-02 21:04:37 +03:00
Kipp Cannon
620391b300 audiotestsrc: Add support for generating gaussian white noise
This patch adds support for stationary white Gaussian noise.
The Box-Muller algorithm is used to generate pairs of independent
normally-distributed random numbers.

Fixes bug #586519.
2009-06-21 12:29:03 +02:00
Tim-Philipp Müller
72c5884f4a audiotestsrc: support more than just one channel 2009-05-12 15:32:02 +01:00
Wim Taymans
c3ec18af97 gst/audiotestsrc/gstaudiotestsrc.*: Add property to control pull/push based scheduling.
Original commit message from CVS:
* gst/audiotestsrc/gstaudiotestsrc.c:
(gst_audio_test_src_class_init), (gst_audio_test_src_init),
(gst_audio_test_src_check_get_range),
(gst_audio_test_src_set_property),
(gst_audio_test_src_get_property):
* gst/audiotestsrc/gstaudiotestsrc.h:
Add property to control pull/push based scheduling.
2009-01-05 10:59:35 +00:00
Wim Taymans
81f5117fa9 gst/audiotestsrc/gstaudiotestsrc.*: Define the default property values in the usual place.
Original commit message from CVS:
* gst/audiotestsrc/gstaudiotestsrc.c:
(gst_audio_test_src_class_init), (gst_audio_test_src_init),
(gst_audio_test_src_src_fixate), (gst_audio_test_src_setcaps),
(gst_audio_test_src_start), (gst_audio_test_src_stop),
(gst_audio_test_src_do_seek), (gst_audio_test_src_check_get_range),
(gst_audio_test_src_create):
* gst/audiotestsrc/gstaudiotestsrc.h:
Define the default property values in the usual place.
Implement start/stop to reset values correctly.
Calculate the sample size only once when we negotiate.
Rename some values to make more sense.
Keep track of our byte range.
Add support for pull based scheduling. Disabled for now until we have
the whole stack working.
Set the BUFFER_OFFSET correctly.
2008-10-10 15:45:15 +00:00
David Schleef
cc74285d12 gst/audiotestsrc/gstaudiotestsrc.*: Add 'ticks', a 1/30 second sine wave pulse every second.
Original commit message from CVS:
* gst/audiotestsrc/gstaudiotestsrc.c:
* gst/audiotestsrc/gstaudiotestsrc.h:
Add 'ticks', a 1/30 second sine wave pulse every second.
2008-07-17 02:30:24 +00:00
Sebastian Dröge
6f397125d1 gst/audiotestsrc/gstaudiotestsrc.*: Add float/double and int32 support to audiotestsrc. Fixes #460422.
Original commit message from CVS:
* gst/audiotestsrc/gstaudiotestsrc.c: (gst_audio_test_src_init),
(gst_audio_test_src_src_fixate), (gst_audio_test_src_setcaps),
(gst_audio_test_src_init_sine_table),
(gst_audio_test_src_change_wave), (gst_audio_test_src_create):
* gst/audiotestsrc/gstaudiotestsrc.h:
Add float/double and int32 support to audiotestsrc. Fixes #460422.
Also set the default volume to the default value specified in the
GParamSpec.
2007-08-03 19:53:11 +00:00
Stefan Kost
fae581d596 gst/: remove obsolete _factory_init protos
Original commit message from CVS:
* gst/adder/gstadder.h:
* gst/audiotestsrc/gstaudiotestsrc.h:
remove obsolete _factory_init protos
2006-11-24 08:56:10 +00:00
Stefan Kost
267a068e70 ext/gnomevfs/gstgnomevfssrc.c: Add docs about icydemux usage in connection with gnomevfssrc
Original commit message from CVS:
* ext/gnomevfs/gstgnomevfssrc.c:
Add docs about icydemux usage in connection with gnomevfssrc
* ext/libvisual/visual.c:
* ext/ogg/gstoggaviparse.c:
* ext/ogg/gstoggdemux.c:
* ext/ogg/gstoggmux.c:
* ext/ogg/gstoggparse.c:
* gst-libs/gst/audio/gstaudiofiltertemplate.c:
* gst-libs/gst/audio/gstaudiosink.c:
* gst-libs/gst/audio/gstaudiosrc.c:
* gst/audiorate/gstaudiorate.c:
More G_OBJECT macro fixing.
* gst/audiotestsrc/gstaudiotestsrc.h:
Fix wrong info in header due to copy & paste
2006-09-16 21:54:48 +00:00
Stefan Kost
131fb86b4b Fix more gobject macros: obj<->klass, GstXXX<->GstXXXClass
Original commit message from CVS:
* ext/alsa/gstalsamixerelement.h:
* ext/alsa/gstalsamixeroptions.h:
* ext/alsa/gstalsamixertrack.h:
* ext/gnomevfs/gstgnomevfssink.h:
* ext/gnomevfs/gstgnomevfssrc.h:
* ext/theora/gsttheoradec.h:
* ext/theora/gsttheoraenc.h:
* ext/theora/gsttheoraparse.h:
* ext/vorbis/vorbisparse.h:
* gst-libs/gst/audio/gstaudioclock.h:
* gst-libs/gst/audio/gstaudiofilter.h:
* gst-libs/gst/rtp/gstbasertpaudiopayload.h:
* gst/audioconvert/gstaudioconvert.h:
* gst/audioresample/gstaudioresample.h:
* gst/audiotestsrc/gstaudiotestsrc.h:
* gst/ffmpegcolorspace/gstffmpegcolorspace.h:
* gst/playback/gststreamselector.h:
* gst/tcp/gstmultifdsink.h:
* gst/tcp/gsttcpclientsink.h:
* gst/tcp/gsttcpclientsrc.h:
* gst/tcp/gsttcpserversink.h:
* gst/tcp/gsttcpserversrc.h:
* gst/videorate/gstvideorate.h:
* gst/videoscale/gstvideoscale.h:
* gst/videotestsrc/gstvideotestsrc.h:
* gst/volume/gstvolume.h:
* sys/v4l/gstv4ljpegsrc.h:
* sys/v4l/gstv4lmjpegsink.h:
* sys/v4l/gstv4lmjpegsrc.h:
* sys/v4l/gstv4lsrc.h:
* sys/ximage/ximagesink.h:
* sys/xvimage/xvimagesink.h:
* tests/old/testsuite/alsa/sinesrc.h:
Fix more gobject macros: obj<->klass, GstXXX<->GstXXXClass
2006-06-01 19:19:51 +00:00
Wim Taymans
81e72d14b4 Updated/added documentation.
Original commit message from CVS:
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-base-plugins-docs.sgml:
* docs/plugins/gst-plugins-base-plugins-sections.txt:
* ext/pango/gstclockoverlay.h:
* ext/pango/gsttextoverlay.h:
* ext/pango/gsttextrender.h:
* ext/pango/gsttimeoverlay.h:
* ext/theora/gsttheoradec.h:
* ext/theora/gsttheoraenc.h:
* ext/theora/theoradec.c:
* ext/theora/theoraenc.c:
* gst/audioconvert/gstaudioconvert.h:
* gst/audiotestsrc/gstaudiotestsrc.h:
* gst/ffmpegcolorspace/gstffmpegcolorspace.h:
* gst/tcp/gstmultifdsink.c: (gst_multi_fd_sink_class_init):
* gst/tcp/gstmultifdsink.h:
Updated/added documentation.
* ext/pango/gsttextoverlay.c: (gst_text_overlay_valign_get_type),
(gst_text_overlay_halign_get_type),
(gst_text_overlay_wrap_mode_get_type),
(gst_text_overlay_base_init), (gst_text_overlay_class_init),
(gst_text_overlay_init), (gst_text_overlay_set_property),
(gst_text_overlay_get_property):
Fix up properties to be enums instead of string to make bindings,
introspection and automatic GUI creation possible.
Add getters for the properties.
2006-03-01 16:24:37 +00:00
Stefan Kost
0d85e2cc15 gst/audiotestsrc/gstaudiotestsrc.*: update to basesrc changes, implement segmented seeking and eos handling, add a 's...
Original commit message from CVS:
* gst/audiotestsrc/gstaudiotestsrc.c:
(gst_audiostestsrc_wave_get_type), (gst_audio_test_src_class_init),
(gst_audio_test_src_init), (gst_audio_test_src_src_fixate),
(gst_audio_test_src_query), (gst_audio_test_src_create_sine),
(gst_audio_test_src_create_square),
(gst_audio_test_src_create_saw),
(gst_audio_test_src_create_triangle),
(gst_audio_test_src_create_silence),
(gst_audio_test_src_create_white_noise),
(gst_audio_test_src_create_pink_noise),
(gst_audio_test_src_init_sine_table),
(gst_audio_test_src_create_sine_table),
(gst_audio_test_src_change_wave),
(gst_audio_test_src_change_volume), (gst_audio_test_src_do_seek),
(gst_audio_test_src_create), (gst_audio_test_src_set_property):
* gst/audiotestsrc/gstaudiotestsrc.h:
update to basesrc changes, implement segmented seeking and eos handling,
add a 'sine-tab' waveform for performance critical playback
2005-12-29 20:37:23 +00:00
Stefan Kost
90736bc6e7 ext/libvisual/visual.c: change some char* into char[]
Original commit message from CVS:
* ext/libvisual/visual.c: (make_valid_name):
change some char* into char[]
* gst/audiotestsrc/gstaudiotestsrc.c:
(gst_audio_test_src_class_init), (gst_audio_test_src_do_seek),
(gst_audio_test_src_create):
* gst/audiotestsrc/gstaudiotestsrc.h:
prepare to handle EOS and SEGMENT_DONE
2005-12-16 22:00:07 +00:00
Stefan Kost
7906b3c945 gst/audiotestsrc/gstaudiotestsrc.*: Adjust to some recent api changes and add wtays new cool seeking capabillities
Original commit message from CVS:
* gst/audiotestsrc/gstaudiotestsrc.c:
(gst_audio_test_src_class_init), (gst_audio_test_src_init),
(gst_audio_test_src_setcaps), (gst_audio_test_src_src_query),
(gst_audio_test_src_do_seek), (gst_audio_test_src_is_seekable),
(gst_audio_test_src_create):
* gst/audiotestsrc/gstaudiotestsrc.h:
Adjust to some recent api changes and add wtays new cool seeking
capabillities
2005-12-14 20:42:11 +00:00
Thomas Vander Stichele
f39b477379 borgify further clean up docs a little
Original commit message from CVS:
borgify further
clean up docs a little
2005-12-01 01:12:55 +00:00
Stefan Kost
7f3f034d44 gst/audiotestsrc/gstaudiotestsrc.*: fixed typo, added pink noise
Original commit message from CVS:
* gst/audiotestsrc/gstaudiotestsrc.c:
(gst_audiostestsrc_wave_get_type), (gst_audiotestsrc_class_init),
(gst_audiotestsrc_init), (gst_audiotestsrc_create_sine),
(gst_audiotestsrc_create_square), (gst_audiotestsrc_create_saw),
(gst_audiotestsrc_create_triangle),
(gst_audiotestsrc_create_silence),
(gst_audiotestsrc_create_white_noise),
(gst_audiotestsrc_init_pink_noise),
(gst_audiotestsrc_generate_pink_noise_value),
(gst_audiotestsrc_create_pink_noise),
(gst_audiotestsrc_change_wave):
* gst/audiotestsrc/gstaudiotestsrc.h:
fixed typo, added pink noise
2005-10-09 20:47:31 +00:00
Stefan Kost
9be025e197 add new plugin and element
Original commit message from CVS:
* configure.ac:
* docs/plugins/gst-plugins-base-plugins-docs.sgml:
* docs/plugins/gst-plugins-base-plugins-sections.txt:
* gst/audioscale/gstaudioscale.c: (gst_audioscale_method_get_type):
* gst/audiotestsrc/Makefile.am:
* gst/audiotestsrc/gstaudiotestsrc.c:
(gst_audiostestsrc_wave_get_type), (gst_audiotestsrc_base_init),
(gst_audiotestsrc_class_init), (gst_audiotestsrc_init),
(gst_audiotestsrc_src_fixate), (gst_audiotestsrc_setcaps),
(gst_audiotestsrc_get_query_types), (gst_audiotestsrc_src_query),
(gst_audiotestsrc_wait), (gst_audiotestsrc_unlock),
(gst_audiotestsrc_create_sine), (gst_audiotestsrc_create_square),
(gst_audiotestsrc_create_saw), (gst_audiotestsrc_create_triangle),
(gst_audiotestsrc_create_silence),
(gst_audiotestsrc_create_white_noise),
(gst_audiotestsrc_change_wave), (gst_audiotestsrc_create),
(gst_audiotestsrc_set_property), (gst_audiotestsrc_get_property),
(gst_audiotestsrc_start), (plugin_init):
* gst/audiotestsrc/gstaudiotestsrc.h:
add new plugin and element
* gst/sine/gstsinesrc.c: (gst_sinesrc_class_init):
use gobject_class
2005-10-09 18:34:44 +00:00