gst/gstbin.c: Keep track of pads that are being linked/unlinked and resync the state...
authorOlivier Crete <tester@tester.ca>
Mon, 6 Oct 2008 16:15:02 +0000 (16:15 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Mon, 6 Oct 2008 16:15:02 +0000 (16:15 +0000)
commitee0eaf824beeacdeaba530c6803f8a01cb66560b
treeed4d0c9b2b81e2ba1d00b56fae1c4344e93e5fcd
parentcb98130213349fec8c40b14f919909e4a106e54c
gst/gstbin.c: Keep track of pads that are being linked/unlinked and resync the state changes.

Original commit message from CVS:
Base on Patch by: Olivier Crete <tester at tester dot ca>
* gst/gstbin.c: (gst_bin_init), (gst_bin_add_func),
(gst_bin_remove_func), (update_degree),
(gst_bin_sort_iterator_new), (gst_bin_handle_message_func):
Keep track of pads that are being linked/unlinked and resync the state
changes.
* gst/gstpad.c: (gst_pad_get_direction),
(gst_pad_set_chain_function), (gst_pad_set_getrange_function),
(gst_pad_set_checkgetrange_function), (gst_pad_unlink),
(gst_pad_link_prepare), (gst_pad_link),
(gst_pad_event_default_dispatch), (gst_pad_chain), (gst_pad_push),
(gst_pad_check_pull_range), (gst_pad_get_range),
(gst_pad_pull_range):
Some code cleanups, use macros to check pad direction.
Don't need to take the lock on the pad direction.
Post structure change when pads are linked/unlinked.
Change some checks into _return_if_fail().
* tests/check/gst/gstbin.c:
(test_link_structure_change_state_changed_sync_cb),
(GST_START_TEST), (gst_bin_suite):
Add testcase for pad link/unlinke resync during a state change.
Fixes #510354.
ChangeLog
gst/gstbin.c
gst/gstpad.c
tests/check/gst/gstbin.c