Commit graph

32 commits

Author SHA1 Message Date
Sebastian Dröge
2a8784e218 audioclock: Sink the reference in the constructor
This is now needed as GstClock does not do that internally anymore,
because that broke bindings.

And mark the function correctly as (transfer full), which it already was
before.

https://bugzilla.gnome.org/show_bug.cgi?id=743062
2017-05-17 10:40:52 +03:00
Thibault Saunier
099ac9faf2 docs: Convert gtkdoc comments to markdown
Modernizing the documentation, making it simpler to read an
modify and allowing us to possibly switch to hotdoc in the
future.
2017-03-10 18:19:17 -03:00
Marcin Kolny
89e711663f audioclock: use GstAudioClock* as first argument in GstAudioClock methods
All the GstAudioClock method declarations required object of GstClock type
as a first argument, but in fact, required GstAudioClock object (runtime
check in function body). Instead of checking type in run-time, we can
change functions declaration, to accept only GstAudioClock methods. Then,
runtime check is not necessary anymore, since always GstAudioClock object
is passed to a function.

https://bugzilla.gnome.org/show_bug.cgi?id=756628
2016-11-01 19:54:01 +02:00
Michael Olbrich
44da322083 audioclock: use GST_STIME_FORMAT for the correct argument
GST_STIME_ARGS is used for time_offset not for last_time.
This fixes the format string accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=768990
2016-07-20 12:28:54 +01:00
Luis de Bethencourt
94a7f9fc4e audioclock: use GST_STIME_FORMAT for GstClockTimeDiff
GST_STIME_FORMAT is more appropriate for GstClockTimeDiff since it can
handle negative values better.

https://bugzilla.gnome.org/show_bug.cgi?id=757480
2015-11-03 14:08:29 +00:00
Sebastian Dröge
f5cf586e77 audioclock: Fix redundant definitions compiler warning
gstaudioclock.c:51:31: error: redundant redeclaration of 'gst_audio_clock_init' [-Werror=redundant-decls]
 G_DEFINE_TYPE (GstAudioClock, gst_audio_clock, GST_TYPE_SYSTEM_CLOCK);

gstaudioclock.c:51:31: error: redundant redeclaration of 'gst_audio_clock_class_init' [-Werror=redundant-decls]
 G_DEFINE_TYPE (GstAudioClock, gst_audio_clock, GST_TYPE_SYSTEM_CLOCK);
2014-12-13 16:14:49 +01:00
Sebastian Dröge
cb70d3fdf0 audioclock: No need to get the parent class in class_init, G_DEFINE_TYPE does that for us 2014-12-13 16:04:40 +01:00
Sebastian Dröge
41f1ec1c81 audioclock: Use G_DEFINE_TYPE instead of a custom get_type() function 2014-12-13 16:02:01 +01:00
Tim-Philipp Müller
bcb8068e27 docs: remove outdated and pointless 'Last reviewed' lines from docs
They are very confusing for people, and more often than not
also just not very accurate. Seeing 'last reviewed: 2005' in
your docs is not very confidence-inspiring. Let's just remove
those comments.
2014-04-26 23:28:57 +01:00
Wim Taymans
fe93457191 audioclock: mark as using some other clock
We need to mark our clock as using some other clock source. Alsa source uses the
clock type to decide if it can use alsa driver timestamps or not.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=690465
2012-12-20 16:48:04 +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
Edward Hervey
2817bdadc9 libs: Remove "Since" markers and minor doc fixups 2012-07-13 12:11:06 +02:00
Wim Taymans
ee7072fe7e rename GstBaseAudio* ->GstAudioBase* 2011-11-11 11:52:47 +01:00
Wim Taymans
1f8fe283f6 audioclock: remove _full version 2011-11-10 13:51:23 +01:00
Wim Taymans
a58805216a audio: clean up headers 2011-06-21 18:17:59 +02:00
Tim-Philipp Müller
751c34bffc audio: make public get_type() functions thread-safe 2010-10-08 11:34:58 +01:00
Wim Taymans
c7972692d3 audioclock: add a function to invalidate the clock
Add a function to invalidate the time function of a clock. Useful for when the
function becomes invalid.
2010-09-07 18:12:38 +02:00
Sebastian Dröge
8989ad93d9 audioclock: API: Add gst_audio_clock_new_full() with a GDestroyNotify for the user_data
Elements usually use their own instance as instance data but the
clock can have a longer lifetime than their elements and the clock
doesn't own a reference of the element.

Fixes bug #623807.
2010-07-16 17:40:17 +02:00
Wim Taymans
5dbaccabca audioclock: whitespace fixes 2009-10-12 15:47:28 +02:00
Wim Taymans
451789735c audioclock: add some more debug 2009-09-09 18:26:03 +02:00
Edward Hervey
9329b8be72 gst-libs: Remove dead assignments and resulting unused variables. 2009-08-08 15:54:57 +02:00
Wim Taymans
b9723f6e1c audioclock: make our internal time monotonic
Make the internal time increase monotonically.
2009-05-13 21:38:56 +02:00
Wim Taymans
d655120ee6 audioclock: make sure values are ever increasing 2009-05-12 10:39:41 +02:00
Wim Taymans
4231d54823 audioclock: add methods for the internal offset
Add two methods for getting the unadjusted time of the clock and one for
adjusting an internal time. We will need these methods for correctly handling
the time after a gst_audio_clock_reset().

Add a debug category and some debug lines to the audio clock.

API: gst_audio_clock_get_time()
API: gst_audio_clock_adjust()
API: GST_AUDIO_CLOCK_CAST()
2009-04-14 13:08:52 +02:00
José Alburquerque
7431789249 gst-libs/gst/audio/gstaudioclock.*: Make gst_audio_clock_new use const gchar* to ease the wrapping of
Original commit message from CVS:
Patch by: José Alburquerque <jaalburqu svn gnome org>
* gst-libs/gst/audio/gstaudioclock.c: (gst_audio_clock_new):
* gst-libs/gst/audio/gstaudioclock.h:
Make gst_audio_clock_new use const gchar* to ease the wrapping of
C++ bindings. Fixes #566723.
2009-01-06 17:30:31 +00:00
Wim Taymans
35e4b75b86 gst-libs/gst/audio/gstaudioclock.*: Add method to inform the clock that the time starts from 0 again. We use this inf...
Original commit message from CVS:
* gst-libs/gst/audio/gstaudioclock.c: (gst_audio_clock_init),
(gst_audio_clock_reset), (gst_audio_clock_get_internal_time):
* gst-libs/gst/audio/gstaudioclock.h:
Add method to inform the clock that the time starts from 0 again. We use
this info to calculate a clock offset so that the time we report in
internal_time is monotonically increasing, as required by the clock base
class. Fixes #521761.
API: GstAudioClock::gst_audio_clock_reset()
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_skew_slaving),
(gst_base_audio_sink_change_state):
* gst-libs/gst/audio/gstbaseaudiosrc.c:
(gst_base_audio_src_create), (gst_base_audio_src_change_state):
Reset reported time when we (re)create the ringbuffer.
2008-05-27 16:20:17 +00:00
Wim Taymans
3c94c06c5a gst-libs/gst/audio/gstaudioclock.c: Fix clock name.
Original commit message from CVS:
* gst-libs/gst/audio/gstaudioclock.c: (gst_audio_clock_init),
(gst_audio_clock_new):
Fix clock name.
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_init), (gst_base_audio_sink_query):
* gst-libs/gst/audio/gstbaseaudiosrc.c: (gst_base_audio_src_init),
(gst_base_audio_src_query), (gst_base_audio_src_get_offset),
(gst_base_audio_src_create):
Improve latency query code.
Use proper clock names.
2007-02-28 15:02:25 +00:00
Wim Taymans
7367722509 Added docs for the audio libs.
Original commit message from CVS:
* docs/libs/gst-plugins-base-libs-docs.sgml:
* docs/libs/gst-plugins-base-libs-sections.txt:
* gst-libs/gst/audio/gstaudioclock.c:
* gst-libs/gst/audio/gstaudioclock.h:
* gst-libs/gst/audio/gstaudiosink.c:
* gst-libs/gst/audio/gstaudiosink.h:
* gst-libs/gst/audio/gstaudiosrc.c:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_render):
* gst-libs/gst/audio/gstbaseaudiosink.h:
* gst-libs/gst/audio/gstbaseaudiosrc.c: (gst_base_audio_src_init):
* gst-libs/gst/audio/gstbaseaudiosrc.h:
* gst-libs/gst/audio/gstringbuffer.h:
Added docs for the audio libs.
2006-09-27 11:05:08 +00:00
Stefan Kost
0afac375b4 Fix #337365 (g_type_class_ref <-> g_type_class_peek_parent)
Original commit message from CVS:
* ext/alsa/gstalsamixeroptions.c:
(gst_alsa_mixer_options_class_init):
* ext/alsa/gstalsamixertrack.c: (gst_alsa_mixer_track_class_init):
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_class_init):
* ext/ogg/gstoggmux.c: (gst_ogg_mux_class_init):
* ext/ogg/gstoggparse.c: (gst_ogg_parse_class_init):
* gst-libs/gst/audio/gstaudioclock.c: (gst_audio_clock_class_init):
* gst-libs/gst/audio/gstaudiofilter.c:
(gst_audio_filter_class_init):
* gst-libs/gst/audio/gstaudiosink.c:
(gst_audioringbuffer_class_init):
* gst-libs/gst/audio/gstaudiosrc.c:
(gst_audioringbuffer_class_init):
* gst-libs/gst/audio/gstringbuffer.c: (gst_ring_buffer_class_init):
* gst-libs/gst/interfaces/colorbalancechannel.c:
(gst_color_balance_channel_class_init):
* gst-libs/gst/interfaces/mixeroptions.c:
(gst_mixer_options_class_init):
* gst-libs/gst/interfaces/mixertrack.c:
(gst_mixer_track_class_init):
* gst-libs/gst/interfaces/tunerchannel.c:
(gst_tuner_channel_class_init):
* gst-libs/gst/interfaces/tunernorm.c: (gst_tuner_norm_class_init):
* gst-libs/gst/netbuffer/gstnetbuffer.c:
(gst_netbuffer_class_init):
* gst-libs/gst/rtp/gstbasertppayload.c:
(gst_basertppayload_class_init):
* gst/playback/gstdecodebin.c: (gst_decode_bin_class_init):
* gst/playback/gstplaybasebin.c: (gst_play_base_bin_class_init):
* gst/playback/gstplaybin.c: (gst_play_bin_class_init):
* gst/playback/gststreaminfo.c: (gst_stream_info_class_init):
* gst/playback/gststreamselector.c:
(gst_stream_selector_class_init):
* gst/subparse/gstsubparse.c: (gst_sub_parse_class_init):
* gst/tcp/gsttcpclientsink.c: (gst_tcp_client_sink_class_init):
* sys/v4l/gstv4lcolorbalance.c:
(gst_v4l_color_balance_channel_class_init):
* sys/v4l/gstv4ljpegsrc.c: (gst_v4ljpegsrc_class_init):
* sys/v4l/gstv4lmjpegsink.c: (gst_v4lmjpegsink_class_init):
* sys/v4l/gstv4lmjpegsrc.c: (gst_v4lmjpegsrc_class_init):
* sys/v4l/gstv4ltuner.c: (gst_v4l_tuner_channel_class_init),
(gst_v4l_tuner_norm_class_init):
* sys/ximage/ximagesink.c: (gst_ximagesink_class_init):
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_class_init):
* tests/old/testsuite/alsa/sinesrc.c: (sinesrc_class_init):
Fix #337365 (g_type_class_ref <-> g_type_class_peek_parent)
2006-04-08 21:02:53 +00:00
Wim Taymans
a3cb4d4937 gst-libs/gst/audio/gstaudioclock.c: This clock can be slaved to a master clock now.
Original commit message from CVS:
* gst-libs/gst/audio/gstaudioclock.c: (gst_audio_clock_init):
This clock can be slaved to a master clock now.

* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_class_init), (gst_base_audio_sink_init),
(gst_base_audio_sink_dispose), (gst_base_audio_sink_provide_clock),
(gst_base_audio_sink_set_clock),
(gst_base_audio_sink_set_property),
(gst_base_audio_sink_get_property), (gst_base_audio_sink_preroll),
(gst_base_audio_sink_render), (gst_base_audio_sink_change_state):
* gst-libs/gst/audio/gstbaseaudiosink.h:
Handle slaving the internal clock to the clock selected in the
pipeline.
Add property to make the basesink not provide a clock.

* gst-libs/gst/rtp/gstbasertpdepayload.c:
(gst_base_rtp_depayload_class_init), (gst_base_rtp_depayload_init),
(gst_base_rtp_depayload_wait):
* gst-libs/gst/rtp/gstbasertpdepayload.h:
We can use the clock in GstElement, no need to store it ourselves.
2005-11-22 18:32:09 +00:00
Wim Taymans
ee345636bc gst-libs/gst/audio/: Make sure the audio clock always returns an increasing value.
Original commit message from CVS:
* gst-libs/gst/audio/TODO:
* gst-libs/gst/audio/gstaudioclock.c: (gst_audio_clock_init),
(gst_audio_clock_get_internal_time):
* gst-libs/gst/audio/gstaudioclock.h:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_init), (gst_base_audio_sink_dispose),
(gst_base_audio_sink_get_time), (gst_base_audio_sink_event),
(gst_base_audio_sink_render),
(gst_base_audio_sink_create_ringbuffer),
(gst_base_audio_sink_change_state):
Make sure the audio clock always returns an increasing value.
2005-07-20 09:08:05 +00:00
Wim Taymans
235ea5989c Make ringbuffer faster and more simple by removing the locks in the playback thread.
Original commit message from CVS:
Make ringbuffer faster and more simple by removing the locks
in the playback thread.
Add sample accurate playback based on buffer sample offsets.
Make the baseaudiosink provide a clock.
Parse caps in the base class.
Correctly handle seeking, flushing and state changes.
2005-04-28 16:15:42 +00:00