Commit graph

72 commits

Author SHA1 Message Date
Peter Kjellerstedt b85b7ff0cf gst/gstclock.h: Cast the results from the timeval/spec_to_time macros to what the docs say it casts to, a GstClockTim...
Original commit message from CVS:
Patch by: Peter Kjellerstedt <pkj axis com>
* gst/gstclock.h:
Cast the results from the timeval/spec_to_time macros to what the
docs say it casts to, a GstClockTime. fixes #508175.
2008-01-09 12:22:22 +00:00
Stefan Kost 428a4e9669 Change GST_GET_TIMESTAMP into gst_util_get_timestamp and replace all uses as we don't have HAVE_POSIX_TIMERS in publi...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstclock.h:
* gst/gstdebugutils.c:
* gst/gstinfo.c:
* gst/gstutils.c:
* gst/gstutils.h:
* libs/gst/base/gstbasesink.c:
* tools/gst-launch.c:
Change GST_GET_TIMESTAMP into gst_util_get_timestamp and replace all
uses as we don't have HAVE_POSIX_TIMERS in public headers.
Thanks Tim for spotting.
2007-12-11 20:23:58 +00:00
Stefan Kost ddb7cc2763 Rename new API + ChangeLog surgery to remove old name from last entry..
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstclock.h:
* gst/gstdebugutils.c:
* gst/gstinfo.c:
Rename new API + ChangeLog surgery to remove old name from last entry..
API: GST_GET_TIMESTAMP
2007-11-28 12:35:14 +00:00
Stefan Kost fbf7086287 Now hide the different clock stuff behind a macro.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstclock.h:
* gst/gstdebugutils.c:
* gst/gstinfo.c:
Now hide the different clock stuff behind a macro.
API: GST_GET_CURRENT_TIME
2007-11-28 12:11:59 +00:00
Wim Taymans 0e0caaf16a Start merging in the easy bits of #361155, the monotonic clock patch.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstclock.h:
* tests/check/gst/gstsystemclock.c: (GST_START_TEST),
(gst_systemclock_suite):
Start merging in the easy bits of #361155, the monotonic clock patch.
This one adds a few handy macros with docs and a testsuite.
2007-11-28 10:58:39 +00:00
Tim-Philipp Müller 50521a14dc gst/gstclock.h: Fix up broken GST_CLOCK_FLAGS macro and GstClock docs. The flags field has moved to GstObject.
Original commit message from CVS:
* gst/gstclock.h:
Fix up broken GST_CLOCK_FLAGS macro and GstClock docs. The flags
field has moved to GstObject.
2007-10-03 11:16:48 +00:00
Wim Taymans a78857c296 Improve _adjust_unlocked() so that it overflows less.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstclock.c: (gst_clock_adjust_unlocked),
(gst_clock_unadjust_unlocked), (gst_clock_set_calibration):
* gst/gstclock.h:
Improve _adjust_unlocked() so that it overflows less.
Add gst_clock_unadjust_unlocked to convert from external time to
internal time based on calibration.
Add some more debug.
API: GstClock::gst_clock_unadjust_unlocked()
2007-04-05 10:06:20 +00:00
Wim Taymans c0a833edca Small docs fixes.
Original commit message from CVS:
* docs/design/part-live-source.txt:
* gst/gstclock.h:
Small docs fixes.
2006-10-18 13:21:56 +00:00
Thomas Vander Stichele 24703cdf92 releasing 0.10.10
Original commit message from CVS:
releasing 0.10.10
2006-09-14 20:08:14 +00:00
Wim Taymans f0eeee3342 docs/gst/gstreamer-sections.txt: Add GstClockClass vmethod docs.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
Add GstClockClass vmethod docs.
* gst/gstcaps.h:
Mark #endif with comment for associated #if
* gst/gstclock.c: (gst_clock_id_wait):
* gst/gstclock.h:
Add vmethod wait_jitter to avoid an unneeded _get_time() for
most clock implementations.
Document vmethods.
Flesh out docs about resolution methods.
API: GstClockClass::wait_jitter
* gst/gstsystemclock.c: (gst_system_clock_class_init),
(gst_system_clock_async_thread),
(gst_system_clock_id_wait_jitter_unlocked),
(gst_system_clock_id_wait_jitter):
Use base class wait_jitter variant for improved performance
due to less clock polling.
2006-08-11 15:24:03 +00:00
Wim Taymans 15d8500f57 gst/: Remove comma at end of enumerator list.
Original commit message from CVS:
* gst/gstbus.h:
* gst/gstclock.h:
* gst/gstevent.h:
* gst/gstiterator.h:
* gst/gstpad.h:
* gst/gstplugin.h:
* gst/gsttask.h:
Remove comma at end of enumerator list.
2006-07-06 09:21:03 +00:00
Tim-Philipp Müller 61ce17d6f3 gst/gstclock.h: Fix GST_CLOCK_TIME_IS_VALID signedness issues - we need to cast the input to GstClockTime before comp...
Original commit message from CVS:
* gst/gstclock.h:
Fix GST_CLOCK_TIME_IS_VALID signedness issues - we need
to cast the input to GstClockTime before comparing with
another GstClockTime value.
2006-03-10 23:44:00 +00:00
Wim Taymans 99a61247bc gst/gstclock.*: Review docs.
Original commit message from CVS:
* gst/gstclock.c: (gst_clock_entry_new),
(gst_clock_id_compare_func), (gst_clock_id_wait),
(gst_clock_id_wait_async), (gst_clock_id_unschedule),
(gst_clock_init), (gst_clock_get_internal_time),
(gst_clock_set_master), (do_linear_regression),
(gst_clock_add_observation), (gst_clock_set_property):
* gst/gstclock.h:
Review docs.
Small cleanups.
Fix a possible segfault when the window-size is made smaller.
Calculate jitter before performing the clock wait. Ideally
the clock implementation should calculate jitter but we need
API breakage for that.
* gst/gstsystemclock.c: (gst_system_clock_init):
Docs review.
* libs/gst/base/gstbasesink.c: (gst_base_sink_do_sync):
Remove leftover else
* tests/check/gst/gstsystemclock.c: (GST_START_TEST),
(gst_systemclock_suite):
Added check to test GST_CLOCK_DIFF.
2006-03-09 11:45:14 +00:00
Thomas Vander Stichele 06fcb64c77 gst/gstclock.h: Show GST_CLOCK_TIME_NONE as 99:99:99.999999999
Original commit message from CVS:

* gst/gstclock.h:
Show GST_CLOCK_TIME_NONE as 99:99:99.999999999
2006-03-06 14:34:49 +00:00
Wim Taymans fbf5f16d69 check/gst/gstutils.c: Added test for scaling.
Original commit message from CVS:
* check/gst/gstutils.c: (GST_START_TEST), (gst_utils_suite):
Added test for scaling.

* gst/gstclock.h:
Small doc fix.

* gst/gstutils.c: (gst_util_uint64_scale_int):
Implemented high precision scaling code.
2005-11-24 17:44:57 +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
Wim Taymans cf925ebb6f gst/base/gstbasesink.*: No need to store the clock, the parent element class already has it.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_class_init),
(gst_base_sink_wait), (gst_base_sink_do_sync),
(gst_base_sink_handle_event):
* gst/base/gstbasesink.h:
No need to store the clock, the parent element class already
has it.

* gst/gstbin.c: (gst_bin_set_clock_func), (gst_bin_add_func):
Updates for clock_set returning a gboolean

* gst/gstclock.c: (gst_clock_entry_new), (gst_clock_id_wait),
(gst_clock_id_wait_async), (gst_clock_class_init),
(gst_clock_init), (gst_clock_finalize),
(gst_clock_get_internal_time), (gst_clock_get_time),
(gst_clock_slave_callback), (gst_clock_set_master),
(gst_clock_get_master), (do_linear_regression),
(gst_clock_add_observation), (gst_clock_set_property),
(gst_clock_get_property):
* gst/gstclock.h:
Implement master/slave. When setting a clock as a slave, a
periodic timeout is scheduled to sample master and slave times.
Then the slave clock is recalibrated to match offset and rate
of the master clock.
Update logging a bit.
Add flag so that a clock can state that is cannot be slaved to
another clock.

* gst/gstelement.c: (gst_element_set_clock):
* gst/gstelement.h:
The set_clock returns a gboolean for when an element cannot
deal with the selected clock in the pipeline.

* gst/gstpipeline.c: (gst_pipeline_change_state),
(gst_pipeline_set_clock):
* gst/gstpipeline.h:
Handle the case where the selected clock cannot be set on
the pipeline.

* gst/net/gstnetclientclock.c: (gst_net_client_clock_class_init),
(gst_net_client_clock_init), (gst_net_client_clock_finalize),
(gst_net_client_clock_set_property),
(gst_net_client_clock_get_property),
(gst_net_client_clock_observe_times):
* gst/net/gstnetclientclock.h:
Use regression code in GstClock parent, remove duplicated
functionality.
2005-11-22 18:28:44 +00:00
Wim Taymans e6bbe0ddb2 gst/: Convert Clock flags to object flags.
Original commit message from CVS:
* gst/gstclock.c: (gst_clock_init), (gst_clock_set_master),
(gst_clock_get_master):
* gst/gstclock.h:
* gst/gstsystemclock.c: (gst_system_clock_init):
Convert Clock flags to object flags.
Added methods to manage master/slave clocks.
2005-11-21 17:12:50 +00:00
Andy Wingo 44c548b205 *.*: Ran scripts/update-macros. Oh yes. gst/gstobject.h (GST_OBJECT_GET_LOCK, GST_OBJECT_LOCK)
Original commit message from CVS:
2005-11-21  Andy Wingo  <wingo@pobox.com>

* *.h:
* *.c: Ran scripts/update-macros. Oh yes.

* gst/gstobject.h (GST_OBJECT_GET_LOCK, GST_OBJECT_LOCK)
(GST_OBJECT_TRYLOCK, GST_OBJECT_UNLOCK): Renamed from
GST_GET_LOCK, etc.

* scripts/update-macros: New script. Run it on your files to
change GST_LOCK to GST_OBJECT_LOCK, and the same for UNLOCK as
well.
2005-11-21 16:34:26 +00:00
Andy Wingo f082cb34a4 gst/gstclock.*: Change resolution to be a GstClockTime.
Original commit message from CVS:
2005-11-19  Andy Wingo  <wingo@pobox.com>

* gst/gstclock.h:
* gst/gstclock.c (GstClock, GstClockClass): Change resolution to
be a GstClockTime.
(gst_clock_set_resolution, gst_clock_get_resolution): Resolution
is a GstClockTime. Fixes #321710.
2005-11-19 18:17:29 +00:00
Andy Wingo c0b753f74f gst/gstclock.h (GstClock): Remove offset property. Add internal_calibration and external_calibration. Fix padding. Pa...
Original commit message from CVS:
2005-11-19  Andy Wingo  <wingo@pobox.com>

* gst/gstclock.h (GstClock): Remove offset property. Add
internal_calibration and external_calibration. Fix padding. Pad
also by GstClockTime so we don't run into problems.

* gst/gstclock.c (gst_clock_set_rate_offset): Remove.
(gst_clock_get_rate_offset): Remove.
(gst_clock_set_time_adjust): Remove. Fixes #321712.
2005-11-19 18:06:56 +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
Michael Smith 3f80a0d393 gst/gstclock.*: Anonymous structs are a gcc (and some other compilers) extension, so don't use them. Since this is on...
Original commit message from CVS:
* gst/gstclock.c: (gst_clock_init), (gst_clock_adjust_unlocked),
(gst_clock_set_rate_offset), (gst_clock_get_rate_offset):
* gst/gstclock.h:
Anonymous structs are a gcc (and some other compilers) extension, so
don't use them. Since this is only for ABI-compatibility, and our
API/ABI freeze is over in a few days, this whole thing will only
last a few days, so don't bother trying to think up a meaningful
name for the struct.
2005-11-17 12:36:30 +00:00
Andy Wingo c557e030a9 gst/gstclock.h (GstClock): Add rate and offset properties, preserving ABI stability. Add rate/offset accessors. Will ...
Original commit message from CVS:
2005-11-17  Andy Wingo  <wingo@pobox.com>

* gst/gstclock.h (GstClock): Add rate and offset properties,
preserving ABI stability. Add rate/offset accessors. Will file bug
for the freeze break.

* gst/gstclock.c (gst_clock_adjust_unlocked): Implement using rate
and offset, trying to keep precision and avoiding
underflow/overflow.
(gst_clock_set_rate_offset, gst_clock_get_rate_offset): New
functions. Make gst_clock_set_time_adjust obsolete.
(gst_clock_set_time_adjust): Note that this function is obsolete.
Will file bug soon.

* gst/base/gstbasetransform.h: Make the ABI-stability hack
greppable by using GST_PADDING-1+1.
2005-11-17 11:51:49 +00:00
Wim Taymans a628e6f4be docs/gst/gstreamer-sections.txt: Added some new macros.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
Added some new macros.

* gst/gstclock.c:
* gst/gstclock.h:
* gst/gstobject.h:
Docs updates.
2005-11-09 12:36:17 +00:00
Wim Taymans 55bf3d095b Documented the clocks.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstclock.c:
* gst/gstclock.h:
Documented the clocks.
2005-10-28 17:35:05 +00:00
Thomas Vander Stichele 9eea358a9e GStreamer consultants will make a lot of money in 2038
Original commit message from CVS:
GStreamer consultants will make a lot of money in 2038
2005-10-16 11:48:09 +00:00
Wim Taymans cc28efc239 check/: Moved sinks2 testcode in sinks check.
Original commit message from CVS:
* check/Makefile.am:
* check/states/sinks.c: (GST_START_TEST), (gst_object_suite):
* check/states/sinks2.c:
Moved sinks2 testcode in sinks check.

* gst/gstbin.c: (gst_bin_provide_clock_func), (gst_bin_add_func),
(gst_bin_remove_func), (gst_bin_recalc_state),
(gst_bin_change_state_func), (bin_bus_handler):
Fix potential race condition when _get_state() iterated over an
ASYNC element right before it posted a state completion.

* gst/gstclock.h:
Do proper cast here.

* gst/gstevent.c: (gst_event_new_newsegment),
(gst_event_parse_newsegment):
A playback rate of 0.0 is not allowed.
2005-10-12 08:38:06 +00:00
Wim Taymans fd1a66e8b5 docs/design/part-states.txt: Some more docs.
Original commit message from CVS:
* docs/design/part-states.txt:
Some more docs.

* gst/gstbin.c: (gst_bin_set_clock_func), (gst_bin_recalc_state),
(gst_bin_change_state_func), (bin_bus_handler):
Doc updates. Don't distribute the same clock over and over again.

* gst/gstclock.c:
* gst/gstclock.h:
Doc updates.

* gst/gstpad.c: (gst_flow_get_name), (gst_flow_to_quark),
(gst_pad_get_type), (gst_pad_push), (gst_pad_push_event),
(gst_pad_send_event):
* gst/gstpad.h:
Make probe emission threadsafe again.
Register quarks and move _get_name() from utils.
Doc updates.

* gst/gstpipeline.c: (gst_pipeline_class_init),
(gst_pipeline_change_state), (gst_pipeline_provide_clock_func):
Only redistribute the clock of it changed.

* gst/gstsystemclock.h:
Doc updates.

* gst/gstutils.c:
* gst/gstutils.h:
Moved the _flow_get_name() to GstPad.
2005-10-11 11:08:52 +00:00
Thomas Vander Stichele be19f39e5c gst/gstclock.h: Well, that's embarassing. Luckily we weren't using
Original commit message from CVS:
* gst/gstclock.h:
Well, that's embarassing.  Luckily we weren't using
GST_CLOCK_DIFF anywhere.
2005-09-24 11:41:01 +00:00
Thomas Vander Stichele f74399ea55 fix docs
Original commit message from CVS:
fix docs
2005-09-23 16:35:43 +00:00
Thomas Vander Stichele 9b3e3a2613 various doc fixes
Original commit message from CVS:
various doc fixes
2005-09-11 12:57:36 +00:00
Stefan Kost d7b4691c3b check/gst-libs/controller.c: more tests
Original commit message from CVS:
* check/gst-libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
more tests
* docs/gst/tmpl/gstutils.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/tmpl/gstdataprotocol.sgml:
include path fixes
* examples/controller/audio-example.c: (main):
controller example works now
* gst/gstclock.h:
doc fixes
* tools/gst-inspect.c: (print_element_properties_info):
show param spec flags
2005-08-29 19:59:52 +00:00
Stefan Kost c73b03243a docs/design/part-messages.txt: update info
Original commit message from CVS:
* docs/design/part-messages.txt:
update info
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstcaps.sgml:
* docs/gst/tmpl/gstclock.sgml:
* gst/gstbus.c:
* gst/gstcaps.c:
* gst/gstcaps.h:
* gst/gstclock.c:
* gst/gstclock.h:
* gst/gstmessage.c:
added descriptions for bus and message
inline caps and clock docs
2005-08-27 10:57:00 +00:00
Wim Taymans 4101d268d0 gst/gstbuffer.c: Some debugging.
Original commit message from CVS:
* gst/gstbuffer.c: (gst_buffer_new_and_alloc):
Some debugging.

* gst/gstclock.h:
Cast to ClockTime before formatting to time.

* gst/gstutils.h:
Cleanups.
2005-08-24 11:22:32 +00:00
Wim Taymans 06ab4b7831 gst/base/gstbasesink.c: Small debug line.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_change_state):
Small debug line.

* gst/gstclock.h:
map SIGNAL and BROADCAST to the right function.

* gst/gstobject.h:
Remove redundant braces.

* gst/gstpad.c: (gst_pad_set_caps):
Don't call setcaps function when reseting caps to NULL.

* gst/gstsystemclock.c: (gst_system_clock_dispose),
(gst_system_clock_async_thread), (gst_system_clock_id_wait_async),
(gst_system_clock_id_unschedule):
Use BROADCAST as this is what we do.
2005-06-29 11:10:44 +00:00
David Schleef 46e13eb5e2 Convert everything from GstAtomicInt to g_atomic_int_*, and remove gstatomic.
Original commit message from CVS:
Convert everything from GstAtomicInt to g_atomic_int_*, and
remove gstatomic.
* gst/Makefile.am:
* gst/gstatomic.c:
* gst/gstatomic.h:
* gst/gstatomic_impl.h:
* gst/gstbuffer.c:
* gst/gstcaps.c:
* gst/gstcaps.h:
* gst/gstclock.c:
* gst/gstclock.h:
* gst/gstdata.c:
* gst/gstdata.h:
* gst/gstdata_private.h:
* gst/gstevent.c:
* gst/gstinfo.c:
* gst/gstinfo.h:
* gst/gstmessage.c:
* gst/gstobject.c:
* gst/gstobject.h:
* gst/gststructure.c:
* gst/gststructure.h:
* gst/gstutils.c: Add gst_atomic_int_set() compaitibility function.
* gst/gstutils.h:
2005-04-24 22:49:45 +00:00
Wim Taymans b338085a29 Docs updates, clean up some headers.
Original commit message from CVS:
* docs/design/part-MT-refcounting.txt:
* docs/design/part-conventions.txt:
* docs/design/part-gstobject.txt:
* docs/design/part-relations.txt:
* docs/design/part-standards.txt:
* gst/gstbin.c: (gst_bin_add_func), (gst_bin_add),
(gst_bin_remove_func), (gst_bin_remove), (gst_bin_iterate_recurse),
(gst_bin_get_by_name), (gst_bin_get_by_interface),
(gst_bin_iterate_all_by_interface):
* gst/gstbuffer.h:
* gst/gstclock.h:
* gst/gstelement.c: (gst_element_class_init),
(gst_element_change_state), (gst_element_set_loop_function):
* gst/gstelement.h:
* gst/gstiterator.c:
* gst/gstobject.c: (gst_object_class_init), (gst_object_ref),
(gst_object_unref), (gst_object_sink), (gst_object_dispose),
(gst_object_dispatch_properties_changed), (gst_object_set_name),
(gst_object_set_parent), (gst_object_unparent),
(gst_object_check_uniqueness):
* gst/gstobject.h:
Docs updates, clean up some headers.
Free iterators in GstBin.
GstObject is now looking good.
2005-03-08 14:38:06 +00:00
Wim Taymans c47dc4d853 First THREADED backport attempt, focusing on adding locks and making sure the API is threadsafe. Needs more work. Mor...
Original commit message from CVS:
First THREADED backport attempt, focusing on adding locks and
making sure the API is threadsafe. Needs more work. More docs
follow this week.
2005-03-07 18:27:42 +00:00
Benjamin Otte 9b9a151d43 gst/gstclock.h: GST_SECOND shouldn't cause a conversion to unsigned.
Original commit message from CVS:
* gst/gstclock.h:
GST_SECOND shouldn't cause a conversion to unsigned.
* testsuite/clock/.cvsignore:
* testsuite/clock/Makefile.am:
* testsuite/clock/signedness.c: (main):
make sure it never will again
2004-07-11 18:19:54 +00:00
Martin Soto 78640b89c0 gst/gstelement.*: New function for setting element time taking into account a hardware buffering delay.
Original commit message from CVS:
* gst/gstelement.h:
* gst/gstelement.c (gst_element_set_time_delay): New function for
setting element time taking into account a hardware buffering
delay.
(gst_element_set_time): Now just an invocation of
gst_element_set_time_delay.
* gst/gstclock.h:
* gst/gstclock.c (gst_clock_get_event_time_delay): New function
allowing to set event times in the future.
(gst_clock_get_event_time): Now just an invocation of
gst_clock_get_event_time_delay.
2004-03-28 13:15:21 +00:00
Johan Dahlin ecd88e381d Revert again, this time without post-commit reindent hooks to put back the indentation :-)
Original commit message from CVS:
Revert again, this time without post-commit reindent hooks
to put back the indentation :-)
2004-03-15 14:43:35 +00:00
Johan Dahlin e2b3dc3e47 *.h: Revert indentation changes.
Original commit message from CVS:
* *.h: Revert indentation changes.
2004-03-15 14:31:41 +00:00
Thomas Vander Stichele a967370df5 gst-indent run on core
Original commit message from CVS:
gst-indent run on core
2004-03-13 15:27:01 +00:00
Andy Wingo 3f5a8814d5 gst/gstelement.c (gst_element_dispose): Protect against multiple invocations.
Original commit message from CVS:
2004-02-24  Andy Wingo  <wingo@pobox.com>

* gst/gstelement.c (gst_element_dispose): Protect against multiple
invocations.

* gst/schedulers/gstoptimalscheduler.c
I added a mess of prototypes at the top of the file by way of
documentation. Some of the operations on chains and groups were
re-organized.

(create_group): Added a type argument so if the group is enabled,
the setup_group_scheduler knows what to do.
(group_elements): Added a type argument here, too, to be passed on
to create_group.
(group_element_set_enabled): If an unlinked PLAYING element is
added to a bin, we have to create a new group to hold the element,
and this function will be called before the group is added to the
chain. Thus we have a valid case for group->chain==NULL. Instead
of calling chain_group_set_enabled, just set the flag on the group
(the chain's status will be set when the group is added to it).
(gst_opt_scheduler_state_transition, chain_group_set_enabled):
Setup the group scheduler when the group is enabled, not
specifically when an element goes PAUSED->PLAYING. This means
PLAYING elements can be added, linked, and scheduled into a
PLAYING pipeline, as was intended.
(add_to_group): Don't ref the group twice. I don't know when this
double-ref got in here. Removing it has the potential to cause
segfaults if other parts of the scheduler are buggy. If you find
that the scheduler is segfaulting for you, put in an extra ref
here and see if that hacks over the underlying issue. Of course,
then find out what code is unreffing a group it doesn't own...
(create_group): Make the extra refcount floating, and remove it
after adding the element. This means that...
(unref_group): Destroy when the refcount reaches 0, not 1, like
every other refcounted object in the known universe.
(remove_from_group): When a group becomes empty, set it to be not
active, and remove it from its chain. Don't unref it again,
there's no floating reference any more.
(destroy_group): We have to remove the group from the chain in
remove_from_group (rather than here) to break refcounting cycles
(the chain always has a ref on the group). So assert that
group->chain==NULL.
(ref_group_by_count): Removed, it was commented out anyway.
(merge_chains): Use the remove_from_chain and add_to_chain
primitives to do the reparenting, instead of rolling our own
implementation.
(add_to_chain): The first non-disabled group in the chain's group
list will be the entry point for the chain. Because buffers can
accumulate in loop elements' peer bufpens, we preferentially
schedule loop groups before get groups to avoid unnecessary
execution of get-based groups when the bufpens are already full.
(gst_opt_scheduler_schedule_run_queue): Debug fixes.
(get_group_schedule_function): Ditto.
(loop_group_schedule_function): Ditto.
(gst_opt_scheduler_loop_wrapper): Ditto.
(gst_opt_scheduler_iterate): Ditto.

I understand the opt scheduler now, yippee!

* gst/gstpad.c: All throughout, added FIXMEs to look at for 0.9.
(gst_pad_get_name, gst_pad_set_chain_function)
(gst_pad_set_get_function, gst_pad_set_event_function)
(gst_pad_set_event_mask_function, gst_pad_get_event_masks)
(gst_pad_get_event_masks_default, gst_pad_set_convert_function)
(gst_pad_set_query_function, gst_pad_get_query_types)
(gst_pad_get_query_types_default)
(gst_pad_set_internal_link_function)
(gst_pad_set_formats_function, gst_pad_set_link_function)
(gst_pad_set_fixate_function, gst_pad_set_getcaps_function)
(gst_pad_set_bufferalloc_function, gst_pad_unlink)
(gst_pad_renegotiate, gst_pad_set_parent, gst_pad_get_parent)
(gst_pad_add_ghost_pad, gst_pad_proxy_getcaps)
(gst_pad_proxy_pad_link, gst_pad_proxy_fixate)
(gst_pad_get_pad_template_caps, gst_pad_check_compatibility)
(gst_pad_get_peer, gst_pad_get_allowed_caps)
(gst_pad_alloc_buffer, gst_pad_push, gst_pad_pull)
(gst_pad_selectv, gst_pad_select, gst_pad_template_get_caps)
(gst_pad_event_default_dispatch, gst_pad_event_default)
(gst_pad_dispatcher, gst_pad_send_event, gst_pad_convert_default)
(gst_pad_convert, gst_pad_query_default, gst_pad_query)
(gst_pad_get_formats_default, gst_pad_get_formats): Better
argument checks, and some doc fixes.

(gst_pad_custom_new_from_template): Um, does anyone
use these functions? Actually make a custom pad instead of a
normal one.
(gst_pad_try_set_caps): Transpose some checks.
(gst_pad_try_set_caps_nonfixed): Same, and use a macro to check if
the pad is in negotiation.
(gst_pad_try_relink_filtered): Use pad_link_prepare.

* gst/gstelement.c: Remove prototypes also defined in gstclock.h.

* gst/gstelement.h:
* gst/gstclock.h: Un-deprecate the old clocking API, as discussed
on the list.
2004-02-25 13:16:12 +00:00
David Schleef 5e7335abe3 gst/elements/gstfdsrc.c: (gst_fdsrc_get): Use GST_TIME_TO_TIMEVAL()
Original commit message from CVS:
* gst/elements/gstfdsrc.c: (gst_fdsrc_get): Use GST_TIME_TO_TIMEVAL()
* gst/gstclock.h: Avoid using 64-bit % operator (slow!)
2004-02-13 23:56:11 +00:00
Benjamin Otte 642685bbbc gst/gstclock.*: reset padding, remove unused fields
Original commit message from CVS:
2004-02-04  Benjamin Otte  <in7y118@public.uni-hamburg.de>

* gst/gstclock.c: (gst_clock_init), (gst_clock_set_speed),
(gst_clock_get_speed):
* gst/gstclock.h:
reset padding, remove unused fields
2004-02-04 22:35:12 +00:00
Thomas Vander Stichele 2c8574e0aa reset padding
Original commit message from CVS:
reset padding
2004-02-04 21:59:27 +00:00
Benjamin Otte 1e82f617e4 gst/gstclock.*: deprecate old interface and disable functions that aren't in use anymore.
Original commit message from CVS:
2004-01-13  Benjamin Otte  <in7y118@public.uni-hamburg.de>

* gst/gstclock.c: (gst_clock_class_init), (gst_clock_init),
(gst_clock_set_speed), (gst_clock_set_active),
(gst_clock_is_active), (gst_clock_reset),
(gst_clock_handle_discont):
* gst/gstclock.h:
deprecate old interface and disable functions that aren't in use
anymore.
* gst/gstelement.h:
* gst/gstelement.c: (gst_element_get_time), (gst_element_wait),
(gst_element_set_time), (gst_element_adjust_time):
add concept of "element time" and functions to get/set this time.
* gst/gstelement.c: (gst_element_change_state):
update element time correctly.
* gst/gstelement.c: (gst_element_get_compatible_pad_filtered):
This is a debug message, not a g_critical.
* gst/gstpad.c: (gst_pad_event_default):
handle discontinuous events right with element time.
* gst/gstscheduler.c: (gst_scheduler_state_transition):
update to clocking fixes.
set clocks on elements in READY=>PAUSED. The old behaviour caused
a wrong element time on the first element that started playing.
* gst/schedulers/gstbasicscheduler.c:
(gst_basic_scheduler_class_init):
* gst/schedulers/gstoptimalscheduler.c:
(gst_opt_scheduler_class_init):
remove code that just implements the default behaviour.
* gst/elements/gstfakesink.c: (gst_fakesink_chain):
update to use new clocking functions
* testsuite/clock/clock1.c: (gst_clock_debug), (main):
* testsuite/clock/clock2.c: (gst_clock_debug), (main):
update to test new element time.
* gst/autoplug/gstspideridentity.c: (gst_spider_identity_getcaps):
use _get_allowed_caps instead of _get_caps. This catches filtered
caps correctly.
* testsuite/debug/commandline.c:
update for new GST_DEBUG syntax.
* testsuite/threads/Makefile.am:
disable a test that only works sometimes.
2004-01-14 00:46:48 +00:00
David Schleef 1cd87b37e5 Change GST_.*_PADDING to _gst_padding[GST_PADDING];
Original commit message from CVS:
Change GST_.*_PADDING to _gst_padding[GST_PADDING];
2003-12-09 02:39:31 +00:00