Commit graph

13 commits

Author SHA1 Message Date
Tim-Philipp Müller 3b54dace2d tests: include config.h and don't include unix headers
In many cases the unistd.h includes weren't actually needed.

Preparation for making tests work on Windows with MSVC.
2017-11-24 13:41:20 +01:00
Jan Schmidt b08b97c99a tests: Use gst_clock_wait_for_sync () for net client clock
Instead of looping, use the gst_clock_wait_for_sync() function
to give clocks up to 1 second to synchronise
2016-07-19 23:28:32 +10:00
Tim-Philipp Müller 4ab09ee869 tests: make netclientclock test faster and less flaky 2014-03-23 12:55:22 +00: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
Tim-Philipp Müller 53cfccf764 tests: fix spurious netclientclock test failures
Give clocks a bit more time to synchronise.
2012-08-05 17:11:46 +01:00
Sebastian Dröge 58cc2ede0a And correct even more valid sparse warnings.
Original commit message from CVS:
* gst/gstelementfactory.h:
* tests/check/elements/fakesink.c:
* tests/check/elements/fakesrc.c: (setup_fakesrc):
* tests/check/elements/fdsrc.c: (setup_fdsrc):
* tests/check/elements/filesink.c: (setup_filesink):
* tests/check/elements/filesrc.c: (setup_filesrc):
* tests/check/elements/identity.c: (setup_identity):
* tests/check/elements/tee.c:
* tests/check/generic/sinks.c:
* tests/check/generic/states.c: (setup), (teardown):
* tests/check/gst/gst.c:
* tests/check/gst/gstabi.c:
* tests/check/gst/gstbin.c:
* tests/check/gst/gstbus.c: (pull_messages):
* tests/check/gst/gstcaps.c:
* tests/check/gst/gstelement.c:
* tests/check/gst/gstevent.c:
* tests/check/gst/gstghostpad.c:
* tests/check/gst/gstiterator.c:
* tests/check/gst/gstmessage.c:
* tests/check/gst/gstminiobject.c: (my_foo_init):
* tests/check/gst/gstobject.c: (thread_name_object),
(gst_object_suite):
* tests/check/gst/gstpad.c:
* tests/check/gst/gstplugin.c:
* tests/check/gst/gstpoll.c:
* tests/check/gst/gstquery.c:
* tests/check/gst/gstsegment.c:
* tests/check/gst/gststructure.c:
* tests/check/gst/gstsystemclock.c:
* tests/check/gst/gsttask.c:
* tests/check/gst/gstutils.c:
* tests/check/gst/gstvalue.c:
* tests/check/gst/struct_hppa.h:
* tests/check/gst/struct_i386.h:
* tests/check/gst/struct_ppc32.h:
* tests/check/gst/struct_ppc64.h:
* tests/check/gst/struct_x86_64.h:
* tests/check/libs/adapter.c: (create_and_fill_adapter):
* tests/check/libs/basesrc.c:
* tests/check/libs/controller.c: (GST_START_TEST):
* tests/check/libs/gdp.c:
* tests/check/libs/gstnetclientclock.c:
* tests/check/libs/gstnettimeprovider.c:
* tests/check/libs/libsabi.c:
* tests/check/libs/struct_hppa.h:
* tests/check/libs/struct_i386.h:
* tests/check/libs/struct_ppc32.h:
* tests/check/libs/struct_ppc64.h:
* tests/check/libs/struct_x86_64.h:
* tests/check/pipelines/cleanup.c:
* tests/check/pipelines/simple-launch-lines.c:
* tests/check/pipelines/stress.c:
And correct even more valid sparse warnings.
* win32/common/libgstreamer.def:
Add gst_poll_fd_init to the list of symbols.
2008-02-29 13:59:24 +00:00
Thomas Vander Stichele 64086e2970 tests/check/: use the new macro
Original commit message from CVS:
* tests/check/elements/fakesink.c:
* tests/check/elements/fakesrc.c:
* tests/check/elements/fdsrc.c:
* tests/check/elements/identity.c:
* tests/check/generic/sinks.c: (gst_sinks_suite):
* tests/check/generic/states.c:
* tests/check/gst/gst.c:
* tests/check/gst/gstabi.c:
* tests/check/gst/gstbin.c:
* tests/check/gst/gstbuffer.c: (gst_buffer_suite):
* tests/check/gst/gstbus.c: (gst_bus_suite):
* tests/check/gst/gstcaps.c: (GST_START_TEST):
* tests/check/gst/gstelement.c:
* tests/check/gst/gstevent.c: (gst_event_suite):
* tests/check/gst/gstghostpad.c:
* tests/check/gst/gstiterator.c: (gst_iterator_suite):
* tests/check/gst/gstmessage.c: (gst_message_suite):
* tests/check/gst/gstminiobject.c:
* tests/check/gst/gstobject.c:
* tests/check/gst/gstpad.c:
* tests/check/gst/gstpipeline.c:
* tests/check/gst/gstplugin.c:
* tests/check/gst/gstquery.c: (gst_query_suite):
* tests/check/gst/gstsegment.c: (gst_segment_suite):
* tests/check/gst/gststructure.c:
* tests/check/gst/gstsystemclock.c:
* tests/check/gst/gsttag.c:
* tests/check/gst/gsttask.c: (gst_task_suite):
* tests/check/gst/gstutils.c:
* tests/check/gst/gstvalue.c:
* tests/check/libs/adapter.c:
* tests/check/libs/basesrc.c:
* tests/check/libs/collectpads.c:
* tests/check/libs/controller.c:
* tests/check/libs/gdp.c: (gst_dp_suite):
* tests/check/libs/gstnetclientclock.c:
* tests/check/libs/gstnettimeprovider.c:
* tests/check/libs/libsabi.c: (libsabi_suite):
* tests/check/libs/typefindhelper.c:
* tests/check/pipelines/cleanup.c:
* tests/check/pipelines/parse-launch.c:
* tests/check/pipelines/simple-launch-lines.c:
* tests/check/pipelines/stress.c: (stress_suite):
use the new macro
2006-07-01 20:56:56 +00:00
Andy Wingo da72aaa235 check/net/gstnetclientclock.c (test_functioning): Adjust to rate_num/rate_denom change.
Original commit message from CVS:
2005-11-23  Andy Wingo  <wingo@pobox.com>

* check/net/gstnetclientclock.c (test_functioning): Adjust to
rate_num/rate_denom change.

* gst/net/gstnetclientclock.c
(gst_net_client_clock_observe_times): Take the SLAVE_LOCK not the
OBJECT_LOCK. Don't call add_observation with the lock.

* gst/gstclock.c (gst_clock_init): Initialize the rate as a
fraction.
(gst_clock_adjust_unlocked): Adjust using uint64_scale and the
rate fraction.
(gst_clock_set_calibration, gst_clock_get_calibration): Change to
deal with rate as a fraction whose numerator and denominator are
GstClockTime values.
(gst_clock_set_master): Only use the OBJECT_LOCK to set the
master; the other fields are protected by the SLAVE_LOCK.
(do_linear_regression): Note that this must be called with the
SLAVE_LOCK.
(gst_clock_add_observation): Take the SLAVE_LOCK, not the
OBJECT_LOCK. Call set_calibration instead of touching the
variables directly.
(gst_clock_set_property, gst_clock_get_property): Protect
master/slave parameters with the SLAVE_LOCK.

* gst/gstclock.h (GstClock): Remove rate, add rate_numerator and
rate_denominator. PR3C1S3. Add a new lock, the SLAVE_LOCK, and
note that all of the instance variables that add_observation and
the set_master functions use are protected by that lock and not
the OBJECT_LOCK.
(GST_CLOCK_SLAVE_LOCK, GST_CLOCK_SLAVE_UNLOCK): New macros.

* gst/gstclock.c (gst_clock_add_observation): No longer requires
the caller to take the object lock.
2005-11-23 12:36:00 +00:00
Andy Wingo a1ac7b668a gst/net/gstnetclientclock.c: Turn off debugging.
Original commit message from CVS:
2005-11-18  Andy Wingo  <wingo@pobox.com>

* gst/net/gstnetclientclock.c: Turn off debugging.

* check/net/gstnetclientclock.c (test_functioning): Assert that the
times connverge somewhat. Can't make a real test.
2005-11-18 15:52:24 +00:00
Andy Wingo fa09daa3d2 gst/net/gstnetclientclock.c (do_linear_regression): Use all integer arithmetic. Return the minimum of the domain, whi...
Original commit message from CVS:
2005-11-18  Andy Wingo  <wingo@pobox.com>

* gst/net/gstnetclientclock.c (do_linear_regression): Use all
integer arithmetic. Return the minimum of the domain, which can be
set as "internal" for gst_clock_set_calibration.
(gst_net_client_clock_observe_times): Call _set_calibration.
(gst_net_client_clock_new): Call _set_calibration instead of
rate_offset.

* check/net/gstnetclientclock.c (test_functioning): Use the right
adjustment api.

* gst/gstclock.h:
* gst/gstclock.c (gst_clock_get_calibration)
(gst_clock_set_calibration): New functions, obsolete the ones I
added yesterday. Doh. Precision issues mean we have to extrapolate
from a point in the more recent past than 1970.
(gst_clock_get_rate_offset, gst_clock_set_rate_offset): Mark as
obsolete.
(gst_clock_adjust_unlocked): Use the right calibration data.
2005-11-18 15:30:18 +00:00
Andy Wingo 24fc208196 gst/net/gstnetclientclock.c (gst_net_client_clock_thread): Whoops, check the right fd. Also add some debugging.
Original commit message from CVS:
2005-11-18  Andy Wingo  <wingo@pobox.com>

* gst/net/gstnetclientclock.c (gst_net_client_clock_thread):
Whoops, check the right fd. Also add some debugging.
(gst_net_client_clock_observe_times): Adjust for int64 offset.
(do_linear_regression): Add a crapload of debugging. Subtract off
the minimum values from the input series to discard unneeded bits.
Use only int arithmetic. There is still double arithmetic when
calculating the intercept that needs fixing. Return boolean to
indicate success; FALSE would mean the domain or range is too
great. Still needs fixes.
2005-11-18 14:13:28 +00:00
Andy Wingo d8b2273583 gst/net/gstnetclientclock.c (gst_net_client_clock_class_init): Port goes all the way to MAXUINT16.
Original commit message from CVS:
2005-11-18  Andy Wingo  <wingo@pobox.com>

* gst/net/gstnetclientclock.c (gst_net_client_clock_class_init):
Port goes all the way to MAXUINT16.

* gst/net/gstnettimeprovider.c: Make the port range the same as
for the kernel: 0 assigns, otherwise ports are less than
MAXUINT16.

* check/net/gstnettimeprovider.c: Adapt for 0 == kernel assigns
port change.

* check/net/gstnetclientclock.c (test_functioning): Add the start
of another test.
2005-11-18 11:57:30 +00:00
Andy Wingo d56b83f662 check/: Add a most minimal test for the net client clock. More to come later.
Original commit message from CVS:
2005-11-17  Andy Wingo  <wingo@pobox.com>

* check/Makefile.am (check_PROGRAMS):
* check/net/gstnetclientclock.c: Add a most minimal test for the
net client clock. More to come later.

* gst/net/gstnet.h:
* gst/net/Makefile.am: Add netclientclock.

* gst/net/gstnetclientclock.h:
* gst/net/gstnetclientclock.c: New files, implement an untested
GstClock that takes its time from a network time provider.
Implements the algorithm in network-clock.scm.

* tests/network-clock.scm (*window-size*): Rename from
*queue-length*.
* tests/network-clock.scm (network-time):
* tests/network-clock-utils.scm (q-push): Update callers.
2005-11-17 17:55:17 +00:00