Commit graph

234 commits

Author SHA1 Message Date
Thomas Vander Stichele 7b2d3e5536 ignore more
Original commit message from CVS:
ignore more
2005-11-24 11:16:32 +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
Jan Schmidt 5f54f34216 Oops, broke automatic string type parsing.
Original commit message from CVS:
* check/gst/gststructure.c: (GST_START_TEST):
* gst/gststructure.c: (gst_structure_parse_value):
Oops, broke automatic string type parsing.
Add a test to catch it in future.
2005-11-22 13:14:51 +00:00
Jan Schmidt 32538f9ed2 check/gst/capslist.h: Comment test cases
Original commit message from CVS:

* check/gst/capslist.h:
Comment test cases
* check/gst/gststructure.c: (GST_START_TEST),
(gst_structure_suite):
Test automatic value type detection in gst_structure_from_string.
* gst/gststructure.c: (gst_structure_parse_value):
Add fraction as a type we try and guess automatically in
caps/structure strings.
2005-11-22 12:35:42 +00:00
Thomas Vander Stichele a15da5e5e4 don't valgrind the stress test, takes too long
Original commit message from CVS:
don't valgrind the stress test, takes too long
2005-11-22 12:15:19 +00:00
Jan Schmidt ba0d715dc8 check/gst/gstcaps.c: Extend caps string tests to check that a caps to string conversion is reversible and produces th...
Original commit message from CVS:
* check/gst/gstcaps.c: (GST_START_TEST):
Extend caps string tests to check that a caps to string
conversion is reversible and produces the same caps.

* gst/gststructure.c: (gst_structure_value_get_generic_type):
Output "fraction" as the generic type fraction range, so caps
serialisation and deserialisation works.
* check/gst/capslist.h:
* gst/gstvalue.c: (gst_value_deserialize_fraction):
Support 'MIN' and 'MAX' for deserialising fractions.
2005-11-22 11:56:01 +00:00
Andy Wingo 19858fd9f0 gst/gstevent.h (gst_event_new_new_segment) (gst_event_parse_new_segment, gst_event_new_buffer_size)
Original commit message from CVS:
2005-11-22  Andy Wingo  <wingo@pobox.com>

* gst/gstevent.h (gst_event_new_new_segment)
(gst_event_parse_new_segment, gst_event_new_buffer_size)
(gst_event_parse_buffer_size, gst_ghost_pad_new_no_target):
Renamed from *_newsegment, *_buffersize, *_notarget.

* scripts/update-funcnames: New script, performs the changes
listed above.
2005-11-22 11:48:58 +00:00
Jan Schmidt 819307ab28 check/gst/gstevent.c: Block the fakesrc srcpad when we send an event, to avoid contention on the stream_lock causing ...
Original commit message from CVS:
* check/gst/gstevent.c: (test_event), (GST_START_TEST):
Block the fakesrc srcpad when we send an event, to avoid
contention on the stream_lock causing random test failures.
2005-11-22 10:24:31 +00:00
Jan Schmidt 97d08eb1a3 Fix subtraction.
Original commit message from CVS:
* check/gst/gstvalue.c: (GST_START_TEST):
* gst/gstvalue.c: (gst_value_fraction_subtract):
Fix subtraction.
2005-11-22 09:42:17 +00:00
Jan Schmidt 506aa94ce2 Implement fraction ranges and extend GstFraction to support arithmetic subtraction, as well as deserialization from i...
Original commit message from CVS:
* check/gst/capslist.h:
* check/gst/gstcaps.c: (GST_START_TEST):
* check/gst/gstvalue.c: (GST_START_TEST), (gst_value_suite):
* gst/gststructure.c: (gst_structure_parse_range),
(gst_structure_fixate_field_nearest_fraction):
* gst/gststructure.h:
* gst/gstvalue.c: (gst_value_init_fraction_range),
(gst_value_free_fraction_range), (gst_value_copy_fraction_range),
(gst_value_collect_fraction_range),
(gst_value_lcopy_fraction_range), (gst_value_set_fraction_range),
(gst_value_set_fraction_range_full),
(gst_value_get_fraction_range_min),
(gst_value_get_fraction_range_max),
(gst_value_serialize_fraction_range),
(gst_value_transform_fraction_range_string),
(gst_value_compare_fraction_range),
(gst_value_deserialize_fraction_range),
(gst_value_intersect_fraction_fraction_range),
(gst_value_intersect_fraction_range_fraction_range),
(gst_value_subtract_fraction_fraction_range),
(gst_value_subtract_fraction_range_fraction),
(gst_value_subtract_fraction_range_fraction_range),
(gst_value_collect_fraction), (gst_value_fraction_multiply),
(gst_value_fraction_subtract), (gst_value_deserialize_fraction),
(gst_value_transform_string_fraction), (_gst_value_initialize):
* gst/gstvalue.h:
Implement fraction ranges and extend GstFraction to support
arithmetic subtraction, as well as deserialization from integer
strings such as "100"
Add a testsuite as for int and double range set operations
2005-11-21 23:54:59 +00:00
Andy Wingo 153931fa86 check/gst/gstevent.c (create_custom_events): Check that
Original commit message from CVS:
2005-11-21  Andy Wingo  <wingo@pobox.com>

* check/gst/gstevent.c (create_custom_events): Check that
FLUSH_STOP is serialized.

* check/elements/identity.c (event_func):
* check/elements/fakesrc.c (event_func): No stream lock, the core
takes it.

* gst/base/gstbasetransform.c (gst_base_transform_event): No more
stream lock taking, yay.

* gst/gstevent.h (GST_EVENT_FLUSH_STOP): Marked as serialized to
ensure that core takes the stream lock.

* gst/base/gstbasesrc.c (gst_base_src_do_seek): Update for stream
lock name change.

* gst/base/gstbasesink.c (gst_base_sink_event): No need to take
the stream lock for EOS, NEWSEGMENT, or FLUSH_STOP, the core does
it already. For the flush start we do take it though so we get the
right preroll state change messages.

* gst/gstqueue.c (gst_queue_sink_activate_push): No need to take
the stream lock here, the core does it for us.

* gst/gstpad.h (GST_PAD_GET_STREAM_LOCK): Renamed from
GST_STREAM_GET_LOCK.
(GST_PAD_STREAM_LOCK, GST_PAD_STREAM_TRYLOCK)
(GST_PAD_STREAM_UNLOCK, GST_PAD_STREAM_UNLOCK_FULL)
(GST_PAD_STREAM_LOCK_FULL): Renamed from GST_STREAM_*.
(GST_PAD_GET_PREROLL_LOCK): Renamed from GST_PREROLL_GET_LOCK.
(GST_PAD_PREROLL_LOCK, GST_PAD_PREROLL_TRYLOCK)
(GST_PAD_PREROLL_UNLOCK): Renamed from GST_PREROLL_*.

* gst/gstpad.c: Update for stream lock name change.

* gst/base/gstbasesink.c: Update for preroll lock name change.
2005-11-21 17:21:15 +00:00
Wim Taymans a35882df1f More segment updates, replace code in plugins with segment helper functions.
Original commit message from CVS:
* check/gst/gstsegment.c: (GST_START_TEST):
* docs/design/part-TODO.txt:
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_do_sync),
(gst_base_sink_activate_pull), (gst_base_sink_get_position),
(gst_base_sink_query), (gst_base_sink_change_state):
* gst/base/gstbasesink.h:
* gst/base/gstbasesrc.c: (gst_base_src_init), (gst_base_src_query),
(gst_base_src_default_newsegment),
(gst_base_src_configure_segment), (gst_base_src_do_seek),
(gst_base_src_get_range), (gst_base_src_loop),
(gst_base_src_change_state):
* gst/base/gstbasesrc.h:
* gst/base/gstbasetransform.c:
(gst_base_transform_prepare_output_buf),
(gst_base_transform_event), (gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/base/gstcollectpads.c: (gst_collect_pads_add_pad),
(gst_collect_pads_event):
* gst/base/gstcollectpads.h:
* gst/elements/gstfakesrc.c: (gst_fake_src_init),
(gst_fake_src_create):
* gst/elements/gstfakesrc.h:
* gst/elements/gstidentity.c: (gst_identity_transform_ip):
* gst/gstsegment.c: (gst_segment_init), (gst_segment_set_duration),
(gst_segment_set_last_stop), (gst_segment_set_seek),
(gst_segment_set_newsegment), (gst_segment_to_stream_time),
(gst_segment_to_running_time), (gst_segment_clip):
* gst/gstsegment.h:
More segment updates, replace code in plugins with segment
helper functions.
2005-11-21 17:09:45 +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
Wim Taymans 29ea4a0bb0 More segment updates and more checks.
Original commit message from CVS:
* check/gst/gstsegment.c: (GST_START_TEST), (gstsegments_suite),
(main):
* gst/gstsegment.c: (gst_segment_init), (gst_segment_set_duration),
(gst_segment_set_last_stop), (gst_segment_set_seek),
(gst_segment_set_newsegment), (gst_segment_to_stream_time),
(gst_segment_to_running_time), (gst_segment_clip):
* gst/gstsegment.h:
More segment updates and more checks.
2005-11-21 13:26:51 +00:00
Andy Wingo e4b8378ba4 gst/gstevent.h (GST_EVENT_FILLER): Removed. Can be added back during the stable series if we need it. Fixes #319178.
Original commit message from CVS:
2005-11-21  Andy Wingo  <wingo@pobox.com>

* gst/gstevent.h (GST_EVENT_FILLER): Removed. Can be added back
during the stable series if we need it. Fixes #319178.

* gst/gstevent.c (gst_event_new_filler): Removed.

* check/gst/gstevent.c: Update comment about filler events.
2005-11-21 13:03:36 +00:00
Andy Wingo 33d5749b88 gst/gstevent.h (GstEventTypeFlags): New data type, the flags of the event type (upstream, downstream, serialized). Re...
Original commit message from CVS:
2005-11-21  Andy Wingo  <wingo@pobox.com>

* gst/gstevent.h (GstEventTypeFlags): New data type, the flags of
the event type (upstream, downstream, serialized). Renamed
GST_EVDIR_* and GST_EVSER to GST_EVENT_TYPE_*.
(GstEventType): Use GstEventTypeFlags. Rename CUSTOM_UP to
CUSTOM_UPSTREAM, CUSTOM_DS to CUSTOM_DOWNSTREAM, etc.

* gst/gstevent.c: Update for new CUSTOM event names.

* check/gst/gstevent.c: Update check for new CUSTOM event names.

* gst/gstevent.h:
* gst/gstevent.c (gst_event_type_get_flags): New function. Fixes
bug #319392.
2005-11-21 11:06:42 +00:00
Wim Taymans 2754334f05 Added segment helper structure and methods. Not fully implemented yet.
Original commit message from CVS:
* check/Makefile.am:
* check/gst/gstsegment.c: (GST_START_TEST), (gstevents_suite),
(main):
* gst/Makefile.am:
* gst/gst.h:
* gst/gstsegment.c: (gst_segment_init), (gst_segment_set_duration),
(gst_segment_set_seek), (gst_segment_set_newsegment),
(gst_segment_to_stream_time), (gst_segment_to_running_time),
(gst_segment_clip):
* gst/gstsegment.h:
Added segment helper structure and methods. Not fully implemented
yet.
Added segment check.
2005-11-20 19:11:09 +00:00
Jan Schmidt c05ba2d666 check/gst/gstvalue.c: Add a deserialisation test for fractions
Original commit message from CVS:
* check/gst/gstvalue.c: (GST_START_TEST), (gst_value_suite):
Add a deserialisation test for fractions
* examples/metadata/read-metadata.c: (message_loop),
(make_pipeline), (main):
Fix up metadata reading sample.
* gst/base/gstbasesink.c: (gst_base_sink_do_sync):
Debug format fix
* gst/base/gstbasesrc.c: (gst_base_src_default_negotiate):
Don't try and fixate empty caps
* gst/gst_private.h:
Wrap in G_BEGIN_DECLS/G_END_DECLS
* gst/gstvalue.c: (gst_value_collect_fraction),
(gst_value_set_fraction), (gst_value_get_fraction_denominator),
(gst_value_transform_string_fraction),
(gst_value_compare_fraction):
Add some extra guards to ensure that we don't end up
with an invalid denominator of 0 in a gstfraction and
that fractions always get reduced.
2005-11-20 17:12:49 +00:00
Andy Wingo 77d95482f6 check/gst/gstvalue.c (test_string): Add test for bug #165650.
Original commit message from CVS:
2005-11-19  Andy Wingo  <wingo@pobox.com>

* check/gst/gstvalue.c (test_string): Add test for bug #165650.

* gst/gstvalue.c (gst_string_wrap): Trying to serialize a NULL
string should produce an error, given the lack of a way to
represent NULL strings. Fixes #165650.
2005-11-19 17:08:23 +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
Andy Wingo dd72e57c83 check/net/gstnettimeprovider.c: Check to see that the time provider actually provides times. Works, yo!
Original commit message from CVS:
2005-11-16  Andy Wingo  <wingo@pobox.com>

* check/net/gstnettimeprovider.c: Check to see that the time
provider actually provides times. Works, yo!
2005-11-16 18:16:51 +00:00
Wim Taymans b697d9a00d check/Makefile.am: Enable more tests.
Original commit message from CVS:
* check/Makefile.am:
Enable more tests.

* check/elements/fakesrc.c: (GST_START_TEST):
Set element to NULL before disposing it.
2005-11-16 18:09:47 +00:00
Andy Wingo fec8e1db7d gst/net/: Use the timepacket stuff in the provider, include it from gstnet.h, and add it to the build.
Original commit message from CVS:
2005-11-16  Andy Wingo  <wingo@pobox.com>

* gst/net/Makefile.am:
* gst/net/gstnet.h:
* gst/net/gstnettimeprovider.c:
* gst/net/gstnettimeprovider.h: Use the timepacket stuff in the
provider, include it from gstnet.h, and add it to the build.

* gst/net/gstnettimepacket.h:
* gst/net/gstnettimepacket.c: New files, abstracts out the packet
sending and receiving.
2005-11-16 17:52:04 +00:00
Wim Taymans 578f2ae633 check/Makefile.am: Enable valgrind check.
Original commit message from CVS:
* check/Makefile.am:
Enable valgrind check.

* gst/elements/gstfakesrc.c: (gst_fake_src_alloc_parent),
(gst_fake_src_alloc_buffer):
Fix memleak.
2005-11-16 17:35:07 +00:00
Wim Taymans b9eaa6aebe check/Makefile.am: Enable valgrind check that should work fine now.
Original commit message from CVS:
* check/Makefile.am:
Enable valgrind check that should work fine now.

* gst/elements/gsttypefindelement.c: (gst_type_find_element_init):
* gst/gstqueue.c: (gst_queue_init):
Fix memleaks in pad allocation.
2005-11-16 17:18:34 +00:00
Andy Wingo 4258474de2 gst/net/: New part of core to hold network elements and objects. Put in core because it exposes API that applications...
Original commit message from CVS:
2005-11-16  Andy Wingo  <wingo@pobox.com>

* gst/net/Makefile.am:
* gst/net/gstnet.h: New part of core to hold network elements and
objects. Put in core because it exposes API that applications want
to use. The library is named libgstnet-tempname right now because
of the existing libgstnet in gst-plugins-base. Solution is
probably to rename the one in plugins-base; will file a bug for
the freeze break.

* gst/net/gstnettimeprovider.c:
* gst/net/gstnettimeprovider.h: New object to export a GstClock's
get_time call over the network.

* configure.ac:
* gst/Makefile.am (lib_LTLIBRARIES): Add gstnet to the build.

* check/Makefile.am:
* check/net/gstnettimeprovider.c: A most minimal test suite. Will
get additions shortly.
2005-11-16 16:49:49 +00:00
Andy Wingo 2124c0fded gst/gstelement.c (gst_element_set_base_time): Add debugging.
Original commit message from CVS:
2005-11-15  Andy Wingo  <wingo@pobox.com>

* gst/gstelement.c (gst_element_set_base_time): Add debugging.

* gst/gstpipeline.c (gst_pipeline_set_new_stream_time): Document
using GST_CLOCK_TIME_NONE to disable base time management.
(do_pipeline_seek, gst_pipeline_change_state): Don't reset stream
time if it was NONE before.
(gst_pipeline_change_state): Only munge the base time if
stream_time != GST_CLOCK_TIME_NONE.

* check/gst/gstpipeline.c (test_base_time): Punt around the
problem of the probe not being called, because that's not the
issue I'm looking at. Add a check that setting stream_time to NONE
disables base time management.
2005-11-15 17:57:51 +00:00
Andy Wingo 87e4af77a1 check/gst/gstpipeline.c (test_base_time): Punt around the problem of the probe not being called, because that's not t...
Original commit message from CVS:
2005-11-15  Andy Wingo  <wingo@pobox.com>

* check/gst/gstpipeline.c (test_base_time): Punt around the
problem of the probe not being called, because that's not the
issue I'm looking at...
2005-11-15 16:52:46 +00:00
Andy Wingo a594b62809 check/gst/gstpipeline.c (test_base_time): Add check that the base time and stream time are reset correctly.
Original commit message from CVS:
2005-11-15  Andy Wingo  <wingo@pobox.com>

* check/gst/gstpipeline.c (test_base_time): Add check that the
base time and stream time are reset correctly.
2005-11-15 16:27:04 +00:00
Andy Wingo 58a5b2f5fa check/gst/gstpipeline.c (test_base_time): New test for buffer timestamps with live capture.
Original commit message from CVS:
2005-11-15  Andy Wingo  <wingo@pobox.com>

* check/gst/gstpipeline.c (test_base_time): New test for buffer
timestamps with live capture.

* gst/elements/gstfakesrc.c (gst_fake_src_create): If the datarate
is 0 but we are a live source, timestamp the buffers using the
element's clock.
2005-11-15 12:29:07 +00:00
Thomas Vander Stichele c2ff34b778 ignore more
Original commit message from CVS:
ignore more
2005-11-12 10:23:52 +00:00
Andy Wingo c4740f0b48 check/gst/gstbin.c (test_message_state_changed_children): Style fix..
Original commit message from CVS:
2005-11-10  Andy Wingo  <wingo@pobox.com>

* check/gst/gstbin.c (test_message_state_changed_children): Style
fix..

* gst/gstbus.c (poll_destroy, poll_func, gst_bus_poll): Implement
gst_bus_poll with the signal watch. Ensures that poll and a signal
watch see the same messages.

* check/gst/gstbus.c (test_watch_with_poll): New test, checks that
a poll and a watch at the same time get the same messages.
2005-11-10 18:15:24 +00:00
Tim-Philipp Müller a144ca207c gst/gststructure.c: Forward-port a 0.8 patch to handle escaped spaces in structure string, so that gst_parse...
Original commit message from CVS:

patch by: Tim-Philipp Müller <tim at centricular dot net>

* gst/gststructure.c: (gst_structure_parse_field),
(gst_structure_from_string):
Forward-port a 0.8 patch to handle escaped spaces in structure string,          so that gst_parse_launch() can deal with spaces in filtered link
caps (fixes #164479)
* check/gst/capslist.h:
* check/gst/gststructure.c: (GST_START_TEST):
add unit tests for this change
2005-11-10 12:32:57 +00:00
Wim Taymans 8bf3884cbb check/gst/gstghostpad.c: Added check for bug #317341
Original commit message from CVS:
* check/gst/gstghostpad.c: (GST_START_TEST), (gst_ghost_pad_suite):
Added check for bug #317341

* gst/gstbuffer.c:
* gst/gstbuffer.h:
Some more spiffifying.

* gst/gstghostpad.c: (gst_ghost_pad_do_link):
Call peer linkfunction if we are a source pad. Totally fixes
#317341

* gst/gstpad.c:
Update docs, source pads should call the peer linkfunction
so they can atomically perform the pad link.
2005-11-10 09:19:12 +00:00
Wim Taymans 82a38aff77 check/states/sinks.c: Uncomment fixed check.
Original commit message from CVS:
* check/states/sinks.c: (GST_START_TEST):
Uncomment fixed check.

* docs/design/part-TODO.txt:
Updated TODO.

* gst/base/gstbasesink.c: (gst_base_sink_commit_state),
(gst_base_sink_handle_object), (gst_base_sink_do_sync),
(gst_base_sink_get_position):
If we are going to PLAYING, post the right pending state
when we post the intermediate paused message.

* gst/gstelement.c: (gst_element_continue_state),
(gst_element_set_state_func), (gst_element_change_state):
Don't post state changes that were between the same state
and were not ASYNC.
2005-11-03 20:14:24 +00:00
Andy Wingo e2200c1f82 check/states/sinks.c (test_livesrc_sink): Add checks that the state-changed messages actually have the right order an...
Original commit message from CVS:
2005-11-03  Andy Wingo  <wingo@pobox.com>

* check/states/sinks.c (test_livesrc_sink): Add checks that the
state-changed messages actually have the right order and the right
values.
2005-11-03 17:53:27 +00:00
Wim Taymans 43fe0b06e9 check/states/sinks.c: Added some more checks. Specifically the case where NO_PREROLL elements are in the pipeline.
Original commit message from CVS:
* check/states/sinks.c: (GST_START_TEST), (gst_object_suite):
Added some more checks. Specifically the case where NO_PREROLL
elements are in the pipeline.

* gst/base/gstbasesink.c: (gst_base_sink_commit_state),
(gst_base_sink_handle_object), (gst_base_sink_do_sync),
(gst_base_sink_get_position):
Post READY->PAUSED state change messages too.
Fix bug where VOID was posted as pending state...

* gst/gstbin.c: (gst_bin_recalc_state):
use _element_continue_state() to continue the state change.

* gst/gstelement.c: (gst_element_continue_state),
(gst_element_commit_state), (gst_element_set_state_func),
(gst_element_change_state), (gst_element_change_state_func):
Lots of state change cleanups, assign the STATE_RETURN in
a new continue_state() function that also propagates the
last return value from a state change to the app.
Update some debug statements with proper category.
2005-11-03 17:12:00 +00:00
Wim Taymans 67b27a2c01 check/gst/gstbin.c: An extra refcount is taken in basesrc.
Original commit message from CVS:
* check/gst/gstbin.c: (GST_START_TEST):
An extra refcount is taken in basesrc.

* gst/base/gstbasesrc.c: (gst_base_src_init), (gst_base_src_query),
(gst_base_src_get_range), (gst_base_src_pad_get_range),
(gst_base_src_loop):
Small cleanups, check for flushing after being unlocked from the
LIVE_LOCK. take refcounts correctly (not yet everywhere).
Don't send out EOS when going to READY.
2005-10-27 13:47:33 +00:00
Thomas Vander Stichele 842007120e check/: wait on thread to die so we can check refcount correctly
Original commit message from CVS:

* check/gst/gstbin.c: (GST_START_TEST):
* check/gst/gstghostpad.c: (GST_START_TEST):
* check/pipelines/cleanup.c: (GST_START_TEST):
wait on thread to die so we can check refcount correctly
2005-10-19 11:43:42 +00:00
Wim Taymans 9d5814c2df check/pipelines/stress.c: Make check a little more time consuming.
Original commit message from CVS:
* check/pipelines/stress.c: (GST_START_TEST):
Make check a little more time consuming.
2005-10-18 17:30:50 +00:00
Wim Taymans 1cef8c5b5a check/: Small state change torture test.
Original commit message from CVS:
* check/Makefile.am:
* check/pipelines/stress.c: (GST_START_TEST),
(simple_launch_lines_suite), (main):
Small state change torture test.

* docs/design/part-states.txt:
* gst/base/gstbasesink.c: (gst_base_sink_commit_state),
(gst_base_sink_handle_object), (gst_base_sink_event), (do_playing),
(gst_base_sink_change_state):
Never take state lock from streaming thread, clean up ugly
hacks. Unfortunatly core does not yet support nice ways to
async commit state.

* gst/gstbin.c: (gst_bin_remove_func), (gst_bin_recalc_state),
(bin_bus_handler):
Start state recalc if a STATE_DIRTY message is posted, but only
on the toplevel bin.

* gst/gstelement.c: (gst_element_sync_state_with_parent),
(gst_element_get_state_func), (gst_element_abort_state),
(gst_element_commit_state), (gst_element_lost_state),
(gst_element_set_state_func), (gst_element_change_state):
* gst/gstelement.h:
State variables are now protected with the LOCK, the state
lock is only used to serialize _set_state().
2005-10-18 17:06:29 +00:00
Wim Taymans 0176d5a0cf Seriously, this is better than a previous commit as we only need to notify the fact that an element changed state in ...
Original commit message from CVS:
* check/gst/gstbin.c: (GST_START_TEST):
* check/gst/gstmessage.c: (GST_START_TEST):
* check/gst/gstpipeline.c: (GST_START_TEST), (message_received):
* gst/gstbin.c: (gst_bin_class_init), (gst_bin_recalc_func),
(bin_bus_handler):
* gst/gstelement.c: (gst_element_abort_state),
(gst_element_commit_state), (gst_element_lost_state):
* gst/gstmessage.c: (gst_message_new_state_changed),
(gst_message_new_state_dirty), (gst_message_new_segment_start),
(gst_message_new_segment_done), (gst_message_new_duration),
(gst_message_parse_state_changed),
(gst_message_parse_segment_start),
(gst_message_parse_segment_done), (gst_message_parse_duration):
* gst/gstmessage.h:
* tools/gst-launch.c: (event_loop):
Seriously, this is better than a previous commit as we only need
to notify the fact that an element changed state in a streaming
thread, marking the state of the parents dirty, hence the
STATE_DIRTY message instead of abusing a boolean in a STATE_CHANGE
message.
2005-10-18 16:25:38 +00:00
Wim Taymans 20aff65b34 Make messages future proof. state-change gets a flag if it was a message comming from the streaming thread.
Original commit message from CVS:
* check/gst/gstbin.c: (GST_START_TEST):
* check/gst/gstmessage.c: (GST_START_TEST):
* check/gst/gstpipeline.c: (GST_START_TEST), (message_received):
* gst/gstbin.c: (bin_bus_handler):
* gst/gstelement.c: (gst_element_commit_state),
(gst_element_lost_state):
* gst/gstmessage.c: (gst_message_new_state_changed),
(gst_message_new_segment_start), (gst_message_new_segment_done),
(gst_message_new_duration), (gst_message_parse_state_changed),
(gst_message_parse_segment_start),
(gst_message_parse_segment_done), (gst_message_parse_duration):
* gst/gstmessage.h:
* tools/gst-launch.c: (event_loop):
Make messages future proof.
state-change gets a flag if it was a message comming from the
streaming thread.
segment-start/stop can also be specified in other formats.
A message to notify an app that a pipeline changed playback
duration.
Also fix a GstMessage leak in -launch
2005-10-18 13:19:16 +00:00
Stefan Kost e0a1560111 merge controller testsuites fix broken tests remove mem-chunk from docs
Original commit message from CVS:
* check/gst-libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstinterpolation.c:
* testsuite/controller/.cvsignore:
* testsuite/controller/Makefile.am:
* testsuite/controller/interpolator.c:
merge controller testsuites
fix broken tests
remove mem-chunk from docs
2005-10-17 17:05:38 +00:00
Thomas Vander Stichele 101c15c9b8 more define fixes
Original commit message from CVS:
more define fixes
2005-10-16 09:44:04 +00:00
Thomas Vander Stichele 5cb910050a whitespace fixes
Original commit message from CVS:
whitespace fixes
2005-10-15 15:53:59 +00:00