Commit graph

169 commits

Author SHA1 Message Date
Sebastian Dröge
5fe1b7efe3 clock: adjust/unadjust_with_calibration() have a clock parameter but it's useless
Document this, for 2.0 we should just remove that parameter.
2016-01-06 16:25:38 +02:00
Sebastian Dröge
fb01dd000b clock: Add gst_clock_unadjust_with_calibration()
We already have gst_clock_adjust_with_calibration() and
gst_clock_unadjust_unlocked(), having the other variant is useful.
2016-01-06 16:25:38 +02:00
Sebastian Dröge
01ba6d40a8 clock: Fix typo
clocked -> clock
2016-01-05 16:44:53 +02:00
Sebastian Dröge
2f776d679f clock: Don't allow setting an unsynced clock as master 2016-01-05 14:23:26 +02:00
Sebastian Dröge
ab827eca2e clock: Don't try to slave unsynced clocks
They will return useless values from get_time().
2016-01-05 14:21:58 +02:00
Nicolas Dufresne
b059520926 doc: Fix typo in ref _clock_wait_for_sync() 2015-06-13 20:52:01 -04:00
Sebastian Dröge
fe3249b0e1 clock: Add GST_CLOCK_FLAG_NEEDS_STARTUP_SYNC and related API
gst_clock_wait_for_sync(), gst_clock_is_synced() and gst_clock_set_synced()
plus a signal to asynchronously wait for the clock to be synced.

This can be used by clocks to signal that they need initial synchronization
before they can report any time, and that this synchronization can also get
completely lost at some point. Network clocks, like the GStreamer
netclientclock, NTP or PTP clocks are examples for clocks where this is useful
to have as they can't report any time at all before they're synced.

https://bugzilla.gnome.org/show_bug.cgi?id=749391
2015-06-03 13:53:27 +02:00
Jan Schmidt
81d613694c clock: Improve slaving regression.
Add domain checks for the input values, and a variable precision
calculation that loops if necessary to ensure we never overflow
accumulators and then silently produce garbage results.

Make the (non-public) linear regression function available for
unit testing by putting it in a separate source file the test
can include. Add a unit test that the new regression function
produces sensible results for several inputs taken from real-world
captures.
2015-01-21 22:27:18 +11:00
Jan Schmidt
4bc7d34f57 clock: Add gst_clock_add_observation_unapplied()
gst_clock_add_observation_unapplied() adds a new master/slave clock
observation and runs the regression without activating the new
calibration results.
2015-01-21 22:27:18 +11:00
Jan Schmidt
b79b14815e clock: Add gst_clock_adjust_with_calibration()
gst_clock_adjust_with_calibration() uses directly passed calibration
parameters, instead of using the clock's current calibration,
allowing for calculations using pending or old calibration params
2015-01-21 22:27:18 +11:00
Evan Nemerson
2759882379 introspection: add missing (nullable) annotations to return values
Support for (nullable) was added to G-I at the same time as nullable
return values.  Previous versions of G-I will not mark return values as
nullable, even when an (allow-none) annotation is present, so it is
not necessary to add (allow-none) annotations for compatibility with
older versions of G-I.

https://bugzilla.gnome.org/show_bug.cgi?id=730957
2014-06-26 18:56:38 +02:00
Tim-Philipp Müller
6eb6d9ec38 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 21:21:51 +01:00
Tim-Philipp Müller
a4f2720be4 clock: simplify internal gst_clock_return_get_name() helper 2013-08-14 21:41:23 +01:00
Wim Taymans
d73b4edc99 clock: debug the clock return values 2013-07-26 12:20:05 +02:00
Tim-Philipp Müller
666c8c11c6 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 20:44:48 +00:00
Edward Hervey
d3ffa82639 Remove 0.10-related documentation and "Since" markers 2012-07-10 12:03:27 +02:00
Wim Taymans
10f3adfd9d clock: make abstract
Make the GstClock type abstract.
Fix a horrible hack in the clock unit test.
2012-07-09 16:28:22 +02:00
Tim-Philipp Müller
c0c79188ca bus, clock: make sure these never have a floating ref
Clear the initial floating ref in the init function for
busses and clocks. These objects can be set on multiple
elements, so there's no clear parent-child relationship
here. Ideally we'd just not make them derive from
GInitiallyUnowned at all, but since we want to keep
using GstObject features for debugging, we'll just do
it like this.

This should also fix some problems with bindings, which
seem to get confused when they get floating refs from
non-constructor functions (or functions annotated to
have a 'transfer full' return type). This works now:

from gi.repository import GObject, Gst

GObject.threads_init()
Gst.init(None)

pipeline=Gst.Pipeline()
bus = pipeline.get_bus()
pipeline.set_state(Gst.State.NULL)
del pipeline;

https://bugzilla.gnome.org/show_bug.cgi?id=679286
https://bugzilla.gnome.org/show_bug.cgi?id=657202
2012-07-09 13:09:45 +01:00
Wim Taymans
d7d5306009 clock: remove _full version
Rename gst_clock_id_wait_async_full() to gst_clock_id_wait_async()
and remove the old gst_clock_id_wait_async() version.
2012-06-20 09:58:14 +02:00
Evan Nemerson
6c6bb0e217 introspection: assorted introspection and documentation fixes
These changes are to clean up syntax issues such as missing colons,
missing spaces, etc., and minor issues such as argument names in
headers not matching the implementation and/or documentation.
2012-06-18 13:11:40 +02:00
Wim Taymans
ce67b0e539 docs: update more documentation 2012-03-29 13:34:50 +02:00
Wim Taymans
9aa9751938 review some docs 2012-03-28 18:12:23 +02:00
Wim Taymans
eb84682e92 clock: make more stuff private
Expose methods to get and set the timeout because subclasses uses this.
2012-02-27 09:11:36 +01:00
Wim Taymans
7cb4828e93 clock: remove method declaration too 2012-02-08 09:30:02 +01:00
Stefan Sauer
110e7c2d3c clock: remove unimplemented stats property while we can 2012-02-07 13:41:20 +01:00
Wim Taymans
f5886a17f5 remove TRACE_NAME from headers 2012-02-02 15:52:19 +01:00
Wim Taymans
321ee10bd6 trace: rework alloc tracing
Remove trace, we use debug log for that
Make alloc trace simpler, removing some methods.
Activate alloc trace with a GST_TRACE=3 environment variable.
Dump leaked objects atexit.
Provide an offset in the object where the GType can be found so that more
verbose info can be given for objects.
Remove -T option from gst-launch because tracing is now triggered with the
environment variable.
2012-01-27 17:54:43 +01:00
Wim Taymans
252327f87a Update for new gthread API 2012-01-19 09:27:04 +01:00
Tim-Philipp Müller
a1daf846f3 Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	gst/gstobject.h
	libs/gst/check/gstcheck.h
	libs/gst/controller/gstcontroller.c
	plugins/elements/gstidentity.c
	tools/gst-xmlinspect.c
2011-12-04 15:38:09 +00:00
Tim-Philipp Müller
5889260d5a Work around deprecated thread API in glib master
Add private replacements for deprecated functions such as
g_mutex_new(), g_mutex_free(), g_cond_new() etc., mostly
to avoid the deprecation warnings. We can't change most of
these in 0.10 because they're part of our API and ABI.
2011-12-04 13:35:38 +00:00
Wim Taymans
4a7c3b929a .h: fix header files
Ensure correct indentation and :retab.
Make sure all structures have padding
Fix up some old ABI additions.
2011-11-11 17:30:03 +01:00
Wim Taymans
8e4f006c57 fix more parent_class 2011-10-16 14:45:03 +02:00
Wim Taymans
5dd9ab1cab cleanups
Fix padding, remove deprecated symbols.
2011-02-22 16:04:12 +01:00
Wim Taymans
aa32e1fab1 clock: fix parameter docs 2011-02-10 15:21:45 +01:00
Sebastian Dröge
8163e51bad clock: API: Add function to re-init periodic GstClockIDs 2011-01-24 19:15:29 +01:00
Mart Raudsepp
3a0a6b477a docs: add missing "Since: 0.10.32" markers for GstClock
Since tags were missing for gst_clock_single_shot_id_reinit()
and GST_CLOCK_DONE.
2011-01-24 14:38:48 +00:00
Tim-Philipp Müller
8a7fc1d8c9 Revert "micro-optim: if (x) is cheaper than if (x > 0) for unsigned integers"
This reverts commit 6aa8ca37ee.

See http://article.gmane.org/gmane.comp.video.gstreamer.devel/32282
2010-12-26 21:21:43 +00:00
Edward Hervey
3efb73c121 gst: documentation fixups and annotation
Reported by enabling the --warn-all option of g-ir-scanner
2010-12-17 19:14:41 +01:00
Tim-Philipp Müller
3256c708be docs: gst: more gobject introspection annotations
Many of these are superfluous, added for clarity.
2010-12-07 18:37:04 +00:00
Wim Taymans
bf979b0036 clock: init variables in _reinit()
Properly initialize variables in _reinit() too
2010-12-03 16:11:05 +01:00
Wim Taymans
ba7157dce6 clock: make sync clock wait lockfree
Make the common case lockfree.
2010-12-03 16:11:04 +01:00
Edward Hervey
6aa8ca37ee micro-optim: if (x) is cheaper than if (x > 0) for unsigned integers 2010-12-03 12:03:42 +01:00
Edward Hervey
b4285611ad gstclock: New API to re-use a single shot GstClockID
API: gst_clock_single_shot_id_reinit

https://bugzilla.gnome.org/show_bug.cgi?id=632778
2010-12-02 19:04:56 +01:00
Tim-Philipp Müller
ca607d99b2 clock: remove unnecessary g_object_notify() call
GObject will do that for us when g_object_set*() is called.
2010-10-07 19:03:42 +01:00
Alessandro Decina
819780acf7 clock: use the new gst_clock_id_wait_async_full.
Use the new gst_clock_id_wait_async_full in gst_clock_set_master.
Also add some tests.
2010-07-06 10:46:42 +02:00
Alessandro Decina
538e82c6f7 clock: fix refcounting bug in gst_clock_set_master.
Make sure clock->clockid is unreffed before clock->master.
gst_clock_id_unschedule (clock->clockid) tries to access clock->master. If
clock->master is unreffed before and it's deallocated, _unschedule could access
free'd memory.
2010-07-06 10:46:42 +02:00
Alessandro Decina
dda8663811 clock: add gst_clock_id_wait_async_full.
Add gst_clock_id_wait_async_full. It's the same as gst_clock_id_wait_async but
allows passing a GDestroyNotify to destroy user_data.
2010-07-06 10:46:42 +02:00
Benjamin Otte
e8f65e8bff Make code safe for -Wredundant-decls
Adds that warning to configure.ac

Includes a tiny change of the GST_BOILERPLATE_FULL() macro:
The get_type() function is no longer declared before being defined.

https://bugzilla.gnome.org/show_bug.cgi?id=611692
2010-03-10 20:45:33 +01:00
Tim-Philipp Müller
daecaf0e8a Remove GST_DEBUG_FUNCPTR where they're pointless
There's not much point in using GST_DEBUG_FUNCPTR with GObject
virtual functions such as get_property, set_propery, finalize and
dispose, since they'll never be used by anyone anyway. Saves a
few bytes and possibly a tenth of a polar bear.
2009-10-28 00:44:24 +00:00
Wim Taymans
03037d56f4 clock: remove assertion
Remove an assertion, this is not really an error in all cases.
Fixes #582010
2009-05-25 16:54:25 +02:00