Commit graph

390 commits

Author SHA1 Message Date
Wim Taymans 9184d9ee3c gst/gstbin.*: Add do-latency signal with the old default fallback implementation. This allows for custom latency calc...
Original commit message from CVS:
* gst/gstbin.c: (_gst_boolean_accumulator), (gst_bin_class_init),
(gst_bin_recalculate_latency), (gst_bin_do_latency_func),
(gst_bin_change_state_func):
* gst/gstbin.h:
Add do-latency signal with the old default fallback implementation. This
allows for custom latency calculations for when the default is not
sufficient.
API: GstBin::do-latency signal.
2008-11-19 12:06:41 +00:00
Wim Taymans c311f2153a Add method to recalculate and redistribute the latency on a bin.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstbin.c: (gst_bin_recalculate_latency),
(gst_bin_change_state_func):
* gst/gstbin.h:
Add method to recalculate and redistribute the latency on a bin.
API: gst_bin_recalculate_latency().
2008-11-18 09:58:33 +00:00
Wim Taymans 16e6c3ef96 gst/gstbin.c: Get the seqnum before we dispose the message.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_handle_message_func):
Get the seqnum before we dispose the message.
2008-11-04 18:10:04 +00:00
Wim Taymans 0a71170006 Copy seqnums from events to messages so that they can all be related back to eachother.
Original commit message from CVS:
* gst/gstbin.c: (bin_handle_async_start),
(gst_bin_handle_message_func), (gst_bin_query):
* libs/gst/base/gstbasesink.c: (gst_base_sink_render_object),
(gst_base_sink_event), (gst_base_sink_change_state):
* libs/gst/base/gstbasesrc.c: (gst_base_src_perform_seek),
(gst_base_src_loop), (gst_base_src_change_state):
Copy seqnums from events to messages so that they can all be related
back to eachother.
2008-11-04 15:56:55 +00:00
Wim Taymans bc8e367885 gst/gstbin.c: The message src can be NULL, don't try to print the object names in that case.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_remove_func), (update_degree),
(gst_bin_handle_message_func):
The message src can be NULL, don't try to print the object names in that
case.
* libs/gst/base/gstbasesink.c: (gst_base_sink_pad_activate):
Add some more debug info.
* tests/check/pipelines/simple-launch-lines.c: (run_pipeline),
(GST_START_TEST):
Add some debug.
Fix the test, pull based sinks go ASYNC to PAUSED, just like other
scheduling modes.
2008-10-10 10:38:12 +00:00
Olivier Crete ee0eaf824b 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.
2008-10-06 16:15:02 +00:00
Wim Taymans f716d86e48 gst/gstbin.c: Take the (recursive) state lock between getting the locked state of an element and changing the element...
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_element_set_state):
Take the (recursive) state lock between getting the locked state of an
element and changing the element state. This allows the application to
lock an element's state and then change its state without races.
2008-08-25 11:00:13 +00:00
Wim Taymans a6b1feccd0 gst/gstbin.c: When an element is in the locked state we still want to update the base_time of the element.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_element_set_state):
When an element is in the locked state we still want to update the
base_time of the element.
2008-08-25 10:52:47 +00:00
Wim Taymans 5665680537 gst/gstbin.c: Fix race for bins that simulate ASYNC state changes by inserting
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_add_func), (gst_bin_remove_func),
(gst_bin_change_state_func), (bin_handle_async_done),
(gst_bin_handle_message_func):
Fix race for bins that simulate ASYNC state changes by inserting
ASYNC_START and ASYNC_DONE messages in their bus. We need to check for
pending ASYNC messages even when the bin does not have ASYNC children.
We note detect this behaviour because we will receive an ASYNC message
that is originating from the bin itself.
Fixes races with decodebin2 state changes.
* tests/check/gst/gstbin.c: (GST_START_TEST):
Add some more debug.
2008-08-04 15:49:13 +00:00
Sebastian Dröge 4bfb1fe70c Remove GST_DISABLE_(ENUMTYPES|INDEX|URI) everywhere.
Original commit message from CVS:
* configure.ac:
* docs/gst/gstreamer-sections.txt:
* docs/gst/gstreamer.types:
* docs/gst/gstreamer.types.in:
* gst/Makefile.am:
* gst/gst.c:
* gst/gstbin.c: (gst_bin_class_init), (gst_bin_set_index_func):
* gst/gstconfig.h.in:
* gst/gstelement.c: (gst_element_get_index):
* gst/gstregistrybinary.c: (gst_registry_binary_save_feature),
(gst_registry_binary_load_feature),
(gst_registry_binary_read_cache):
* gst/gstregistryxml.c: (load_feature),
(gst_registry_xml_read_cache), (gst_registry_xml_save_feature):
* plugins/Makefile.am:
* tools/gst-indent:
* tools/gst-inspect.c: (print_index_info), (print_element_list),
(print_plugin_features), (print_element_features):
* tools/gst-xmlinspect.c: (print_event_masks),
(print_element_info):
* win32/common/gstconfig.h:
Remove GST_DISABLE_(ENUMTYPES|INDEX|URI) everywhere.
Disabling the indexers and URI handler code will only reduce the
required amount of memory by a very small amount but on the other hand
requires much more maintaince work. Apart from that many places of
code are broken when disabling them.
Disabling the enum types doesn't reduce the required amount of memory
by more than a few bytes and makes it hard to fix bugs like #539772,
i.e. use the enums as GObject properties.
2008-07-31 15:20:32 +00:00
Wim Taymans 5335a8b34b gst/gstbin.c: Only care about latency min and max when the sink is actually a live sink.
Original commit message from CVS:
* gst/gstbin.c: (bin_query_latency_fold):
Only care about latency min and max when the sink is actually a live
sink.
2008-06-25 11:50:06 +00:00
Antoine Tremblay d102d88729 gst/gstbin.c: Use the GLib stuff to create a private structure.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_class_init), (gst_bin_init),
(gst_bin_dispose):
Use the GLib stuff to create a private structure.
Add some locking around some dispose methods to make them a little
safer, see #529723. Patch by: Antoine Tremblay <hexa00 at gmail dot com>
2008-04-25 17:54:28 +00:00
Stefan Kost 012d5584ff docs/gst/gstreamer-sections.txt: Move GParamSepc macros to standart section.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
Move GParamSepc macros to standart section.
* gst/gstbin.c:
Dn't document _get_type - its in private section in docs anyway and
this doc-blob was incomplete.
* gst/gstclock.h:
Fix wrong symbol names in docs.
* gst/gstmacros.h:
Add once doc sentence.
* tests/check/gst/.cvsignore:
Ignore more.
2008-04-23 06:57:30 +00:00
Sebastian Dröge b0346dff44 Define G_PARAM_STATIC_STRINGS if it's undefined (GLib < 2.13.0) and use it everywhere for GParamSpecs that use static...
Original commit message from CVS:
* docs/pwg/advanced-dparams.xml:
* docs/pwg/building-props.xml:
* docs/pwg/other-source.xml:
* gst/glib-compat.h:
* gst/gstbin.c: (gst_bin_class_init):
* gst/gstclock.c: (gst_clock_class_init):
* gst/gstindex.c: (gst_index_class_init):
* gst/gstobject.c: (gst_object_class_init):
* gst/gstpad.c: (gst_pad_class_init):
* gst/gstpipeline.c: (gst_pipeline_class_init):
* libs/gst/base/gstbasesink.c: (gst_base_sink_class_init):
* libs/gst/base/gstbasesrc.c: (gst_base_src_class_init):
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_class_init):
* libs/gst/base/gstdataqueue.c: (gst_data_queue_class_init):
* libs/gst/check/gstcheck.c: (_gst_check_fault_handler_restore),
(_gst_check_fault_handler_sighandler),
(_gst_check_fault_handler_setup), (gst_check_init):
* libs/gst/controller/gstcontroller.c:
(_gst_controller_class_init):
* libs/gst/controller/gstlfocontrolsource.c:
(gst_lfo_control_source_class_init):
* libs/gst/net/gstnetclientclock.c:
(gst_net_client_clock_class_init):
* libs/gst/net/gstnettimeprovider.c:
(gst_net_time_provider_class_init):
* plugins/elements/gstcapsfilter.c: (gst_capsfilter_class_init):
* plugins/elements/gstfakesink.c: (gst_fake_sink_class_init):
* plugins/elements/gstfakesrc.c: (gst_fake_src_class_init):
* plugins/elements/gstfdsink.c: (gst_fd_sink_class_init):
* plugins/elements/gstfdsrc.c: (gst_fd_src_class_init):
* plugins/elements/gstfilesink.c: (gst_file_sink_class_init):
* plugins/elements/gstfilesrc.c: (gst_file_src_class_init):
* plugins/elements/gstidentity.c: (gst_identity_class_init):
* plugins/elements/gstmultiqueue.c: (gst_multi_queue_class_init):
* plugins/elements/gstqueue.c: (gst_queue_class_init):
* plugins/elements/gsttee.c: (gst_tee_class_init):
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_class_init):
* plugins/indexers/gstfileindex.c: (gst_file_index_class_init):
Define G_PARAM_STATIC_STRINGS if it's undefined (GLib < 2.13.0) and
use it everywhere for GParamSpecs that use static strings (i.e. all).
This gives us less memory usage, fewer allocations and thus less
memory defragmentation. Fixes bug #523806.
2008-03-22 14:56:17 +00:00
Sebastian Dröge 2faa733276 Revert previous changes to the behaviour of GstPadTemplates, etc and the possiblity to call them in class_init as it ...
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_get_type), (gst_bin_base_init),
(gst_bin_class_init):
* gst/gstelement.c: (gst_element_base_class_init),
(gst_element_class_add_pad_template):
* gst/gstpadtemplate.c: (gst_pad_template_init):
* gst/gstpipeline.c: (gst_pipeline_get_type),
(gst_pipeline_base_init), (gst_pipeline_class_init):
* libs/gst/base/gstbasesink.c:
* libs/gst/base/gstbasesrc.c: (gst_base_src_get_type),
(gst_base_src_base_init), (gst_base_src_class_init):
* plugins/elements/gstcapsfilter.c: (gst_capsfilter_base_init),
(gst_capsfilter_class_init):
* plugins/elements/gstfakesink.c: (gst_fake_sink_base_init),
(gst_fake_sink_class_init):
* plugins/elements/gstfakesrc.c: (gst_fake_src_base_init),
(gst_fake_src_class_init):
* plugins/elements/gstfdsink.c: (gst_fd_sink_base_init),
(gst_fd_sink_class_init):
* plugins/elements/gstfdsrc.c: (gst_fd_src_base_init),
(gst_fd_src_class_init):
* plugins/elements/gstfilesink.c: (gst_file_sink_base_init),
(gst_file_sink_class_init):
* plugins/elements/gstfilesrc.c: (gst_file_src_base_init),
(gst_file_src_class_init):
* plugins/elements/gstidentity.c: (gst_identity_base_init),
(gst_identity_class_init):
* plugins/elements/gstmultiqueue.c: (gst_multi_queue_base_init),
(gst_multi_queue_class_init):
* plugins/elements/gstqueue.c: (gst_queue_base_init),
(gst_queue_class_init):
* plugins/elements/gsttee.c: (gst_tee_base_init),
(gst_tee_class_init):
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_base_init),
(gst_type_find_element_class_init):
* tests/check/gst/gstelement.c: (gst_element_suite):
Revert previous changes to the behaviour of GstPadTemplates, etc
and the possiblity to call them in class_init as it breaks too
many elements. Reopens bug #491501.
Should be applied again for 0.11, thus added a few FIXME 0.11 at
several places.
2008-02-05 14:15:15 +00:00
Sebastian Dröge 9db28f8537 Don't use base_init where not absolutely necessary. For example it's not necessary anymore for adding pad templates o...
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_get_type), (gst_bin_class_init):
* gst/gstpipeline.c: (gst_pipeline_get_type),
(gst_pipeline_class_init):
* libs/gst/base/gstbasesink.c: (gst_base_sink_get_type),
(gst_base_sink_class_init):
* libs/gst/base/gstbasesrc.c: (gst_base_src_get_type),
(gst_base_src_class_init):
* libs/gst/base/gstbasetransform.c: (gst_base_transform_get_type),
(gst_base_transform_class_init):
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_base_init),
(gst_collect_pads_class_init):
* libs/gst/base/gstdataqueue.c: (gst_data_queue_get_type):
* libs/gst/net/gstnettimeprovider.c:
(gst_net_time_provider_base_init),
(gst_net_time_provider_class_init):
* plugins/elements/gstcapsfilter.c: (gst_capsfilter_base_init),
(gst_capsfilter_class_init):
* plugins/elements/gstfakesink.c: (gst_fake_sink_base_init),
(gst_fake_sink_class_init):
* plugins/elements/gstfakesrc.c: (gst_fake_src_base_init),
(gst_fake_src_class_init):
* plugins/elements/gstfdsink.c: (gst_fd_sink_base_init),
(gst_fd_sink_class_init):
* plugins/elements/gstfdsrc.c: (gst_fd_src_base_init),
(gst_fd_src_class_init):
* plugins/elements/gstfilesink.c: (gst_file_sink_base_init),
(gst_file_sink_class_init):
* plugins/elements/gstfilesrc.c: (gst_file_src_base_init),
(gst_file_src_class_init):
* plugins/elements/gstidentity.c: (gst_identity_base_init),
(gst_identity_class_init):
* plugins/elements/gstmultiqueue.c: (gst_multi_queue_base_init),
(gst_multi_queue_class_init):
* plugins/elements/gstqueue.c: (gst_queue_base_init),
(gst_queue_class_init):
* plugins/elements/gsttee.c: (gst_tee_base_init),
(gst_tee_class_init):
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_base_init),
(gst_type_find_element_class_init):
Don't use base_init where not absolutely necessary. For example it's
not necessary anymore for adding pad templates or setting element
details.
Leave empty base_init functions in several places as GST_BOILERPLATE
still defines and uses them.
2008-02-03 12:04:37 +00:00
Stefan Kost 99897dbf24 docs/random/ensonic/profiling.txt: More ideas.
Original commit message from CVS:
* docs/random/ensonic/profiling.txt:
More ideas.
* gst/gstbin.c:
Fix typo and give better log output.
* gst/gstdebugutils.c:
* gst/gstdebugutils.h:
More ideas, make graphs a bit smaller and fix param name in macro.
2007-11-22 15:59:01 +00:00
Wim Taymans f806905e67 gst/gstbin.c: Change email, cleanups add some more debug and comments.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_class_init), (gst_bin_init),
(gst_bin_add_func), (gst_bin_remove_func),
(gst_bin_change_state_func), (gst_bin_continue_func):
Change email, cleanups add some more debug and comments.
Also set bus and clock on new elements when the pipeline was in error.
2007-11-19 08:50:04 +00:00
Stefan Kost f3d71f7ef5 gst/: Fix build with --disable-gst-debug. Fixes #497859.
Original commit message from CVS:
* gst/gstbin.c:
* gst/gstdebugutils.c:
Fix build with --disable-gst-debug. Fixes #497859.
Spotted by Sameer Naik.
2007-11-18 19:30:10 +00:00
Wim Taymans 00e832a463 gst/gstbin.c: Correctly set the next state if all of our async children commited their state. This makes sure we can ...
Original commit message from CVS:
* gst/gstbin.c: (bin_handle_async_done):
Correctly set the next state if all of our async children commited their
state. This makes sure we can actually cancel the state change in
progress. Fixes a regression in Rhythmbox when seeking.
2007-10-14 15:54:02 +00:00
Tim-Philipp Müller 65637313b0 gst/gstbin.c: Don't shadow local variable.
Original commit message from CVS:
* gst/gstbin.c:
Don't shadow local variable.
* gst/gstinfo.c:
Don't shadow global function name.
2007-10-13 17:43:27 +00:00
Wim Taymans 9d731d1e11 gst/gstbin.c: Work around a problem with pipelines containing (semi)loops until a proper, more complicated solution i...
Original commit message from CVS:
* gst/gstbin.c: (remove_from_queue):
Work around a problem with pipelines containing (semi)loops until a
proper, more complicated solution is ready. See #475455.
2007-10-09 16:20:59 +00:00
Wim Taymans d59d330076 gst/gstbin.c: A latency query fails when one of the sinks fail.
Original commit message from CVS:
* gst/gstbin.c: (bin_query_latency_fold), (gst_bin_query):
A latency query fails when one of the sinks fail.
* gst/gstelement.c: (gst_element_set_base_time):
Improve debugging.
2007-09-17 20:55:23 +00:00
Jan Schmidt 04757dd2d3 Fix minor compilation warnings shown with Forte.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_continue_func):
* libs/gst/base/gstbasesrc.c: (gst_base_src_do_sync):
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_add_pad_full):
* plugins/elements/gstmultiqueue.c: (gst_multi_queue_loop):
Fix minor compilation warnings shown with Forte.
2007-09-17 17:17:29 +00:00
Wim Taymans b155f59d19 gst/: Move latency query from GstPipeline to GstBin so that we can also use it when async-handling is enabled on bins.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_class_init), (clear_queue),
(do_bin_latency), (gst_bin_change_state_func):
* gst/gstpipeline.c: (gst_pipeline_change_state):
Move latency query from GstPipeline to GstBin so that we can also
use it when async-handling is enabled on bins.
2007-09-13 21:27:33 +00:00
Wim Taymans ebf770154f gst/gstbin.c: Improve debugging.
Original commit message from CVS:
* gst/gstbin.c: (is_eos), (gst_bin_add_func),
(bin_handle_async_start), (gst_bin_handle_message_func):
Improve debugging.
When adding elements, insert messages into the bus of the newly added
element and make sure the element is the source of the message. This
allows the parent bin to intercept the message and do the
right thing. It also avoids us posting ASYNC_START and CLOCK_PROVIDE
messages to the app (which is not allowed).
Update some docs.
* tests/check/gst/gstghostpad.c: (GST_START_TEST):
Fix testsuite so that is does not work around messages that should not
have been posted in the first place.
2007-08-16 11:04:40 +00:00
Wim Taymans 5059e9f8bd gst/gstbin.c: Fix annoying bug in the sorted iterator where a sink that is not really a sink (when it has downstream ...
Original commit message from CVS:
* gst/gstbin.c: (add_to_queue), (remove_from_queue), (clear_queue),
(update_degree), (gst_bin_sort_iterator_next):
Fix annoying bug in the sorted iterator where a sink that is not really
a sink (when it has downstream links) screwed up the iterator.
* tests/check/gst/gstbin.c: (GST_START_TEST), (gst_bin_suite):
Unit test to verify the fix.
2007-08-16 10:27:16 +00:00
Wim Taymans ef5d931f67 gst/gstbin.c: Move ASYNC_START message posting to where it belongs, similar to async_done.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_add_func), (gst_bin_element_set_state),
(bin_handle_async_start), (gst_bin_handle_message_func):
Move ASYNC_START message posting to where it belongs, similar to
async_done.
Don't post ASYNC_START when we are in error.
Post ASYNC_START when we added an async element to a bin.
2007-08-14 14:10:36 +00:00
Wim Taymans 9b24336ce5 gst/gstbin.c: Always change the state of a NO_PREROLL element even if it has ASYNC elements inside (in case of a bin).
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_element_set_state):
Always change the state of a NO_PREROLL element even if it has ASYNC
elements inside (in case of a bin).
* tests/check/generic/sinks.c: (GST_START_TEST), (gst_sinks_suite):
Unit test for this case.
2007-08-14 13:37:16 +00:00
Wim Taymans 56b5aa1ccb docs/design/part-TODO.txt: Add some more TODO items
Original commit message from CVS:
* docs/design/part-TODO.txt:
Add some more TODO items
* gst/gstbin.c: (find_message), (gst_bin_change_state_func):
Improve debugging.
* gst/gstcaps.c: (gst_caps_intersect):
Optimize trivial intersection case between identical caps pointers.
* gst/gstelement.c: (gst_element_continue_state),
(gst_element_set_state_func):
* gst/gstpad.c:
Fix spelling and grammar mistakes.
2007-08-07 09:56:08 +00:00
Wim Taymans d405a6dc4f gst/gstbin.c: Don't forget about the fact that some element went ASYNC even after a resync. This makes us post the AS...
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_change_state_func),
(bin_handle_async_done), (gst_bin_handle_message_func):
Don't forget about the fact that some element went ASYNC even after a
resync. This makes us post the ASYNC_DONE message correctly.
Fixes #462558.
2007-08-02 11:15:46 +00:00
Jan Schmidt 6c0e00bba0 gst/gstbin.c: Check that the state_cookie hasn't changed since the continue_func was scheduled. Avoids problems where...
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_continue_func):
Check that the state_cookie hasn't changed since the continue_func
was scheduled. Avoids problems where the state changes back to
something it shouldn't be because it was changed in the meantime.
2007-07-18 14:31:21 +00:00
Wim Taymans e599053491 gst/gstbin.c: Move the common code for posting state-change messages into one function.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_add_func), (gst_bin_remove_func),
(gst_bin_change_state_func), (bin_push_state_continue),
(bin_handle_async_start), (bin_handle_async_done),
(gst_bin_handle_message_func):
Move the common code for posting state-change messages into
one function.
Broadcast the state signal after we posted the messages.
Mark the bin as busy when it's doing a state-change.
Make sure async-start/done messages don't interfere with the bin's
state when it's busy.
After the state change, let the bin check which elements completed the
state change while it was busy so that it can update its state.
2007-06-19 10:41:33 +00:00
Wim Taymans 0b3153873b gst/gstbin.*: Immediatly commit the toplevel bin state when receiving an async-done message. This enables us to avoid...
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_init), (gst_bin_add_func),
(gst_bin_remove_func), (gst_bin_get_state_func),
(gst_bin_element_set_state), (gst_bin_continue_func),
(bin_push_state_continue), (bin_handle_async_start),
(bin_handle_async_done), (gst_bin_handle_message_func):
* gst/gstbin.h:
Immediatly commit the toplevel bin state when receiving an async-done
message. This enables us to avoid spawning a thread to commit the state
in some common cases and it also avoids some races.
Avoid spawning a state thread when adding/removing async elements to a
toplevel bin. Instead we immediatly update the bin state.
Get rid of iterating all the children when getting the state in the bin
because it is now always up-to-date.
Fix bug where locked elements would always return _SUCCESS even it they
returned NO_PREROLL before being locked.
Fix the order of the state_change, async-start/done messages that was
sometimes incorrect.
Mark the state_dirty field as deprecated, we don't need it anymore as we
are always up-to-date.
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_continue_state):
Small debug inprovements.
Return the previous element state return when nothing is pending instead
of blindly returning SUCCESS.
* tests/check/generic/sinks.c: (GST_START_TEST), (pad_blocked_cb),
(gst_sinks_suite):
Add a whole bunch of new testcases.
2007-06-18 15:12:28 +00:00
Wim Taymans 491de61f5a gst/gstbin.c: Add helper function to find messages.
Original commit message from CVS:
* gst/gstbin.c: (find_message), (bin_replace_message), (is_eos),
(gst_bin_remove_func), (gst_bin_element_set_state),
(bin_handle_async_start), (bin_handle_async_done),
(gst_bin_handle_message_func):
Add helper function to find messages.
Generate the async-done messages together with the state change
messages.
Small cleanups in handling toplevel bins.
2007-06-07 10:11:47 +00:00
Wim Taymans 6892e94e1d gst/gstbin.c: Make sure that the child bin stops after completing the async state change so that the parent can conti...
Original commit message from CVS:
* gst/gstbin.c: (bin_handle_async_done):
Make sure that the child bin stops after completing the async state
change so that the parent can continue the state change to PLAYING.
Fixes #441159.
2007-05-25 15:36:52 +00:00
Wim Taymans 65ef6ed5a4 gst/gstbin.c: Enable latency for next release.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_class_init), (gst_bin_get_state_func),
(gst_bin_continue_func):
Enable latency for next release.
Restore STATE_LOCK around recalc_state that was left out during the
rewrite and could result in racy behaviour when _get_state and
recalc_state are run concurrently. See #440463.
2007-05-24 08:35:04 +00:00
Tim-Philipp Müller 93230e96fe gst/gstbin.*: 'private' is a c++ keyword, let's not use that in header files, otherwise c++ compilers will throw a ta...
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_init), (gst_bin_dispose),
(gst_bin_set_property), (gst_bin_get_property),
(gst_bin_remove_func), (gst_bin_handle_message_func):
* gst/gstbin.h:
'private' is a c++ keyword, let's not use that in header files,
otherwise c++ compilers will throw a tantrum.
2007-05-22 17:10:04 +00:00
Edward Hervey 466218f4d0 Add a property for bins that handle the state change of their childs.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstbin.c: (gst_bin_class_init), (gst_bin_init),
(gst_bin_dispose), (gst_bin_set_property), (gst_bin_get_property),
(gst_bin_remove_func), (gst_bin_handle_message_func):
* gst/gstbin.h:
Add a property for bins that handle the state change of their childs.
Fixes #435880
2007-05-22 11:09:45 +00:00
Wim Taymans 75b997ad55 docs/design/part-synchronisation.txt: Small addition.
Original commit message from CVS:
* docs/design/part-synchronisation.txt:
Small addition.
* gst/gstbin.c: (gst_bin_query):
* plugins/elements/gstqueue.c: (apply_segment):
Improve debugging.
* gst/gstmessage.h:
Improve docs.
2007-05-21 12:05:14 +00:00
Stefan Kost 05287354e3 gst/gstbin.c: Fix build with --gst-disable-gst-debug
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_element_set_state),
(iterator_activate_fold_with_resync), (gst_bin_continue_func),
(bin_handle_async_done), (gst_bin_handle_message_func):
Fix build with --gst-disable-gst-debug
2007-04-23 07:30:38 +00:00
Wim Taymans 9f3b0b8f3a gst/gstbin.c: Prepare for release where we warn against possible app breakage in the case of live pipelines along wit...
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_get_type), (gst_bin_element_set_state):
Prepare for release where we warn against possible app breakage in the
case of live pipelines along with an env var to enable/disable live
preroll mode (GST_COMPAT=[no-]live-preroll).
2007-03-21 11:52:04 +00:00
Wim Taymans d14c4c4a67 docs/gst/gstreamer-sections.txt: Add new element field and method.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
Add new element field and method.
* gst/gstbin.c: (gst_bin_class_init), (gst_bin_init),
(bin_remove_messages), (gst_bin_add_func), (gst_bin_remove_func),
(gst_bin_recalc_state), (gst_bin_get_state_func),
(gst_bin_element_set_state), (gst_bin_change_state_func),
(gst_bin_continue_func), (bin_bus_handler),
(bin_push_state_continue), (bin_handle_async_start),
(bin_handle_async_done), (gst_bin_handle_message_func):
Make async state changes a bit smarter by using new ASYNC_START and
ASYNC_DONE messages. This reduces the number of times we run the state
recalculation thread.
Don't change state of element with a pending ASYNC_START message.
Deprecate STATE_DIRTY messages.
* gst/gstelement.c: (gst_element_init), (gst_element_send_event),
(gst_element_get_state_func), (gst_element_continue_state),
(gst_element_lost_state), (gst_element_set_state_func),
(gst_element_change_state):
* gst/gstelement.h:
Keep the state that was last set by the app in a new element field.
Don't allow state changes when handling an element event.
Post ASYNC_START and ASYNC_DONE messages.
Change lost_state so that we go to PAUSED and wait for the parent to set
us to PLAYING again (so latency calculation can be performed)
Export gst_element_change_state() method so that subclasses can use it.
API: gst_element_change_state()
API: GST_STATE_TARGET
* gst/gstpipeline.c: (gst_pipeline_class_init),
(reset_stream_time), (gst_pipeline_change_state),
(gst_pipeline_handle_message), (gst_pipeline_set_new_stream_time):
Using the new ASYNC_START message we can reset the base_time when
needed. This can then be used to implement base_time redistribution in
flushing seeks so that we can remove the explicit seek handling.
Perform latency query and configuration when going to PLAYING.
* libs/gst/base/gstbasesink.c: (gst_base_sink_commit_state),
(gst_base_sink_query), (gst_base_sink_change_state):
Post new ASYNC_START/ASYNC_DONE messages.
* tests/check/generic/sinks.c: (GST_START_TEST):
Fix test because the bin will not set the async element to PLAYING right
away.
* tests/check/gst/gstbin.c: (pop_async_done), (GST_START_TEST):
Make the message check a little stronger.
Handle ASYNC messages.
* tests/check/pipelines/cleanup.c: (GST_START_TEST):
* tests/check/pipelines/simple-launch-lines.c: (GST_START_TEST):
Expect ASYNC_DONE messages.
2007-03-19 10:47:56 +00:00
Sébastien Moutte 25b5fc7a7a gst/gstbin.c: Use GST_STR_NULL to prevent NULL pointer to be passed to GST_CAT_DEBUG.
Original commit message from CVS:
* gst/gstbin.c:(gst_bin_add):
Use GST_STR_NULL to prevent NULL pointer to be passed to GST_CAT_DEBUG.
* win32/common/libgstbase.def:
* win32/common/libgstreamer.def:
Add new exported functions.
2007-03-10 15:44:44 +00:00
Wim Taymans 05cf4d83c3 gst/gstbin.c: Also report the live parameter of a latency query.
Original commit message from CVS:
* gst/gstbin.c: (bin_query_min_max_init), (bin_query_latency_fold),
(bin_query_latency_done):
Also report the live parameter of a latency query.
2007-02-28 16:35:48 +00:00
Wim Taymans e561ce761b gst/gstbin.c: Improve debug info.
Original commit message from CVS:
* gst/gstbin.c: (bin_replace_message), (gst_bin_add_func),
(gst_bin_change_state_func), (bin_query_min_max_init),
(bin_query_latency_fold), (bin_query_latency_done),
(gst_bin_query):
Improve debug info.
Implement latency query.
2007-02-20 10:45:13 +00:00
Stefan Kost 85c81ea952 docs/libs/Makefile.am: Fix path to core docs.
Original commit message from CVS:
* docs/libs/Makefile.am:
Fix path to core docs.
* gst/gstbin.c: (gst_bin_get_by_interface),
(gst_bin_iterate_all_by_interface):
Refix docs by also renaming 'interface' to 'iface' in implementation.
* docs/gst/gstreamer-sections.txt:
* gst/gstcaps.c:
* gst/gstchildproxy.c: (gst_child_proxy_base_init):
* gst/gstchildproxy.h:
* gst/gstelementfactory.c:
* gst/gstpadtemplate.h:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_new):
Document more.
2007-02-11 19:59:12 +00:00
Stefan Kost ea55e1357e configure.ac: comment about refining the xml deps
Original commit message from CVS:
* configure.ac:
comment about refining the xml deps
* docs/manuals.mak:
comments about moving away from jade for docs
* gst/gst.c:
recommit the ifdefs to use the binary registry
* gst/gstbin.c: (gst_bin_change_state_func):
this break is obsolete
* gst/gstelementfactory.h:
better GST_ELEMENT_DETAILS docs, add comment about translation
* gst/gstinfo.h:
remove eol slash
* gst/gstobject.c: (gst_signal_object_get_type):
add G_UNLIKELY as usual
* gst/gstpad.c: (gst_pad_event_default):
add fall trhu comment
* gst/gstregistrybinary.c: (gst_registry_binary_write),
(gst_registry_binary_initialize_magic),
(gst_registry_binary_save_string),
(gst_registry_binary_save_pad_template),
(gst_registry_binary_save_feature),
(gst_registry_binary_save_plugin),
(gst_registry_binary_write_cache),
(gst_registry_binary_check_magic),
(gst_registry_binary_load_pad_template),
(gst_registry_binary_load_feature),
(gst_registry_binary_load_plugin),
(gst_registry_binary_read_cache):
comment typo and formatting
* gst/gstutils.c: (gst_element_state_get_name),
(gst_element_state_change_return_get_name):
remove obsolete breaks
* gst/gstvalue.c: (gst_date_get_type), (_gst_value_initialize):
add FIXME 0.11 and remove cpp comment
2007-01-29 15:54:09 +00:00
Wim Taymans 57667ddd07 gst/gstbin.c: Add some more docs about the POSITION query.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_query):
Add some more docs about the POSITION query.
2006-12-07 10:02:19 +00:00
Stefan Kost 894b7f9f4a docs/gst/gstreamer-sections.txt: add new API and fix the build
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
add new API and fix the build
* gst/gstbin.c: (gst_bin_recalc_state):
* gst/gstelement.c: (gst_element_message_full),
(gst_element_get_state_func), (gst_element_set_state_func):
use new API and improve logging
* gst/gstutils.c: (gst_element_state_change_return_get_name):
* gst/gstutils.h:
API: add function to get StateChangereturn names to improve logs
2006-11-06 15:14:46 +00:00