Commit graph

305 commits

Author SHA1 Message Date
Wim Taymans 563477a64e gst/gstbin.c: Fix typo in docs.
Original commit message from CVS:
* gst/gstbin.c:
Fix typo in docs.

* gst/gstelement.c: (gst_element_commit_state):
Remove unused value.

* gst/gstiterator.c:
Mention that the returned element is reffed in the docs.
2005-11-02 18:44:20 +00:00
Thomas Vander Stichele d581d5c976 doc updates
Original commit message from CVS:

* docs/README:
* docs/gst/gstreamer-sections.txt:
* gst/gstbin.c:
doc updates
* gst/gstregistry.c: (gst_registry_scan_path_level):
fix for a nasty little missed situation where an installed plug-in
which was in the cache did not get overridden by an uninstalled one
which was earlier in the plugin path because the newly created plugin
for the uninstalled one (not in the registry) didn't get its
->registered set to TRUE
2005-11-02 15:34:23 +00:00
Thomas Vander Stichele 4652cba829 more doc updates
Original commit message from CVS:
more doc updates
2005-11-01 19:16:58 +00:00
Thomas Vander Stichele 4a8451a360 Documentation updates.
Original commit message from CVS:
Documentation updates.
2005-10-28 17:35:43 +00:00
Wim Taymans 7f22710f65 gst/base/gstbasesink.c: Some more debug.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_get_position):
Some more debug.

* gst/gstbin.c: (message_check), (bin_replace_message),
(bin_remove_messages), (is_eos), (gst_bin_add_func),
(update_degree), (gst_bin_sort_iterator_next), (bin_bus_handler),
(bin_query_duration_init), (bin_query_duration_fold),
(bin_query_duration_done), (bin_query_generic_fold),
(gst_bin_query):
* tools/gst-launch.c: (main):
Remove old option.
2005-10-27 08:55:44 +00:00
Wim Taymans ef17d9b6bb gst/gstbin.c: Some doc and debug updates.
Original commit message from CVS:
* gst/gstbin.c: (message_check), (bin_replace_message),
(bin_remove_messages), (is_eos), (gst_bin_add_func),
(update_degree), (gst_bin_sort_iterator_next), (bin_bus_handler),
(bin_query_duration_init), (bin_query_duration_fold),
(bin_query_duration_done), (bin_query_generic_fold),
(gst_bin_query):
Some doc and debug updates.
Cache previously requested query DURATION for speed. invalidate
cached duration if element posts a DURATION message.
2005-10-25 17:41:24 +00:00
Wim Taymans 2803a5587e docs/design/part-TODO.txt: Update TODO.
Original commit message from CVS:
* docs/design/part-TODO.txt:
Update TODO.

* gst/gstbin.c: (message_check), (bin_replace_message),
(bin_remove_messages), (is_eos), (gst_bin_add_func),
(update_degree), (gst_bin_sort_iterator_next), (bin_bus_handler),
(bin_query_duration_init), (bin_query_duration_fold),
(bin_query_duration_done), (bin_query_generic_fold),
(gst_bin_query):
Handle SEGMENT_START/DONE messages correctly.
More evolved query algorithm that handles duration queries
correctly.

* gst/gstelement.c: (gst_element_send_event), (gst_element_query),
(gst_element_get_state_func), (gst_element_abort_state),
(gst_element_commit_state), (gst_element_lost_state):
Some more debugging.

* gst/gstmessage.h:
Added doc.
2005-10-25 15:39:36 +00:00
Wim Taymans 40f11256e8 gst/gstbin.c: Reworked the message handling a bit, cache the messages instead of only the senders. alows us to do mor...
Original commit message from CVS:
* gst/gstbin.c: (message_check), (bin_replace_message),
(bin_remove_messages), (is_eos), (gst_bin_add_func),
(update_degree), (gst_bin_sort_iterator_next),
(gst_bin_change_state_func), (gst_bin_dispose), (bin_bus_handler):
Reworked the message handling a bit, cache the messages instead of
only the senders. alows us to do more in the future.
2005-10-20 17:22:40 +00:00
Wim Taymans 4dbc7a5bf8 gst/base/gstbasesink.c: Speed up current position calculation.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_get_position),
(gst_base_sink_query):
Speed up current position calculation.

* gst/base/gstbasesrc.c: (gst_base_src_query),
(gst_base_src_default_newsegment):
Correctly set stream position in newsegment.

* gst/gstbin.c: (gst_bin_add_func), (add_to_queue),
(update_degree), (gst_bin_sort_iterator_next),
(gst_bin_sort_iterator_resync), (gst_bin_sort_iterator_free):
* gst/gstmessage.c: (gst_message_new_custom):
Clean up debugging info

* gst/gstqueue.c: (gst_queue_link_src), (gst_queue_chain),
(gst_queue_loop), (gst_queue_handle_src_query):
Pause task faster.
2005-10-20 11:48:53 +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 2c61a2f4d5 gst/: Cleanups, prepare for state change fixes.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_class_init), (gst_bin_get_state_func),
(gst_bin_recalc_func):
* gst/gstelement.c: (gst_element_set_clock),
(gst_element_abort_state), (gst_element_lost_state):
Cleanups, prepare for state change fixes.
2005-10-18 15:15:11 +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
Thomas Vander Stichele 2ca1c89aac gst/gst.*: remove _gst_registry_auto_load, not used anymore
Original commit message from CVS:

* gst/gst.c:
* gst/gst.h:
remove _gst_registry_auto_load, not used anymore
* gst/gstbin.c: (gst_bin_get_type):
* gst/gstbin.h:
* gst/gstelement.c: (gst_element_get_type):
* gst/gstelement.h:
* gst/gstobject.c: (gst_object_get_type):
* gst/gstobject.h:
* gst/gstpad.c: (gst_pad_get_type):
* gst/gstpad.h:
make _get_type functions similar, fixes data export from library
2005-10-15 16:33:09 +00:00
Thomas Vander Stichele bef56ce78d various style fixes
Original commit message from CVS:
various style fixes
2005-10-15 16:01:57 +00:00
Thomas Vander Stichele 2dd1598c56 whitespace fixes
Original commit message from CVS:
whitespace fixes
2005-10-15 15:30:24 +00:00
Wim Taymans f6e003890d gst/: Protect flags with proper lock. unref provided cached clock in dispose.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_add_func), (gst_bin_remove_func),
(reset_degree), (gst_bin_dispose), (bin_bus_handler):
* gst/gstelement.c: (gst_element_commit_state),
(gst_element_set_state):
Protect flags with proper lock.
unref provided cached clock in dispose.
2005-10-12 19:38:44 +00:00
Stefan Kost a98aef82db renamed GST_FLAGS macros to GST_OBJECT_FLAGS moved bitshift from macro to enum definition
Original commit message from CVS:
* check/gst/gstbin.c: (GST_START_TEST):
* docs/gst/gstreamer-sections.txt:
* gst/base/gstbasesink.c: (gst_base_sink_init):
* gst/base/gstbasesrc.c: (gst_base_src_init),
(gst_base_src_get_range), (gst_base_src_check_get_range),
(gst_base_src_start), (gst_base_src_stop):
* gst/base/gstbasesrc.h:
* gst/elements/gstfakesrc.c: (gst_fake_src_set_property):
* gst/gstbin.c: (gst_bin_add_func), (gst_bin_remove_func),
(bin_element_is_sink), (reset_degree), (gst_bin_element_set_state),
(bin_bus_handler):
* gst/gstbin.h:
* gst/gstbuffer.h:
* gst/gstbus.c: (gst_bus_post), (gst_bus_set_flushing):
* gst/gstbus.h:
* gst/gstelement.c: (gst_element_is_locked_state),
(gst_element_set_locked_state), (gst_element_commit_state),
(gst_element_set_state):
* gst/gstelement.h:
* gst/gstindex.c: (gst_index_init):
* gst/gstindex.h:
* gst/gstminiobject.h:
* gst/gstobject.c: (gst_object_init), (gst_object_sink),
(gst_object_set_parent):
* gst/gstobject.h:
* gst/gstpad.c: (gst_pad_set_blocked_async), (gst_pad_is_blocked),
(gst_pad_get_caps_unlocked), (gst_pad_set_caps):
* gst/gstpad.h:
* gst/gstpadtemplate.h:
* gst/gstpipeline.c: (gst_pipeline_provide_clock_func),
(gst_pipeline_use_clock), (gst_pipeline_auto_clock):
* gst/gstpipeline.h:
* gst/indexers/gstfileindex.c: (gst_file_index_load),
(gst_file_index_commit):
* testsuite/bytestream/filepadsink.c: (gst_fp_sink_init):
* testsuite/pad/link.c: (gst_test_src_init),
(gst_test_filter_init), (gst_test_sink_init):
* testsuite/states/locked.c: (main):
renamed GST_FLAGS macros to GST_OBJECT_FLAGS
moved bitshift from macro to enum definition
2005-10-12 14:28:39 +00:00
Wim Taymans 6d0be74351 Use GstClockTime in _get_state() instead of GTimeVal.
Original commit message from CVS:
* check/gst/gstbin.c: (GST_START_TEST):
* check/gst/gstelement.c: (GST_START_TEST):
* check/gst/gstevent.c: (GST_START_TEST), (test_event):
* check/gst/gstghostpad.c: (GST_START_TEST):
* check/gst/gstpipeline.c: (GST_START_TEST):
* check/pipelines/simple_launch_lines.c: (run_pipeline):
* check/states/sinks.c: (GST_START_TEST):
* gst/elements/gsttypefindelement.c: (stop_typefinding):
* gst/gstbin.c: (gst_bin_provide_clock_func), (gst_bin_add_func),
(gst_bin_remove_func), (gst_bin_get_state_func),
(gst_bin_recalc_state), (gst_bin_change_state_func),
(bin_bus_handler):
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_get_state), (gst_element_abort_state),
(gst_element_commit_state), (gst_element_set_state),
(gst_element_change_state), (gst_element_change_state_func):
* gst/gstelement.h:
* gst/gstpipeline.c: (gst_pipeline_class_init), (do_pipeline_seek),
(gst_pipeline_provide_clock_func):
* gst/gstutils.c: (gst_element_link_pads_filtered):
* tools/gst-launch.c: (main):
* tools/gst-typefind.c: (main):
Use GstClockTime in _get_state() instead of GTimeVal.
Remove old code in gstutils.c
2005-10-12 12:18:48 +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 4dd6c2a587 gst/gstbin.*: Prepare to make current EOS message queue more generic.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_init), (gst_bin_provide_clock_func),
(is_eos), (gst_bin_add_func), (gst_bin_remove_func),
(gst_bin_recalc_state), (gst_bin_change_state_func),
(gst_bin_dispose), (bin_bus_handler):
* gst/gstbin.h:
Prepare to make current EOS message queue more generic.
Fix some typos.

* gst/gstevent.c: (gst_event_new_newsegment),
(gst_event_parse_newsegment):
* gst/gstevent.h:
Rename base to stream_time.

* gst/gstmessage.h:
Fix typo in docs.
2005-10-11 15:05:55 +00:00
Wim Taymans fc5dc6de66 gst/gstbin.*: Work on proper clock selection.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_init), (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):
* gst/gstbin.h:
Work on proper clock selection.
2005-10-11 12:58:44 +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
Wim Taymans 2153c45964 check/: Check fixes, use API as stated in design docs, remove hacks.
Original commit message from CVS:
* check/Makefile.am:
* check/generic/states.c: (GST_START_TEST):
* check/gst/gstbin.c: (GST_START_TEST):
* check/gst/gstpipeline.c: (GST_START_TEST), (gst_pipeline_suite):
* check/states/sinks.c: (GST_START_TEST):
* check/states/sinks2.c: (GST_START_TEST), (gst_object_suite),
(main):
Check fixes, use API as stated in design docs, remove hacks.

* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_change_state):
Catch stopping our task while we're shutting down.

* gst/gstbin.c: (gst_bin_init), (gst_bin_add_func),
(gst_bin_remove_func), (gst_bin_get_state_func),
(gst_bin_recalc_state), (gst_bin_change_state_func),
(bin_bus_handler):
* gst/gstbin.h:
* gst/gstelement.c: (gst_element_init),
(gst_element_get_state_func), (gst_element_abort_state),
(gst_element_commit_state), (gst_element_lost_state),
(gst_element_set_state), (gst_element_change_state),
(gst_element_change_state_func):
* gst/gstelement.h:
New state change algorithm (see #318116)

* gst/gstpipeline.c: (gst_pipeline_class_init),
(gst_pipeline_init), (gst_pipeline_set_property),
(gst_pipeline_get_property), (do_pipeline_seek),
(gst_pipeline_change_state), (gst_pipeline_provide_clock_func):
* gst/gstpipeline.h:
Remove crude state change hacks.

* gst/gstutils.h:
Remove crude hacks.

* tools/gst-launch.c: (main):
Fixes for state change. Needs some more work to fully use the
new stuff.
2005-10-10 16:38:26 +00:00
Tim-Philipp Müller ee379a13b6 gst/gstbin.c: Pass GType and size arguments to gst_iterator_new() in the right order (maybe we should make _new() tak...
Original commit message from CVS:
Reviewed by: Tim-Philipp Müller  <tim at centricular dot net>
* gst/gstbin.c: (gst_bin_iterate_sorted):
Pass GType and size arguments to gst_iterator_new() in the right
order (maybe we should make _new() take the GType as first argument
just like _new_list()?) (#318447).
2005-10-10 15:27:12 +00:00
Andy Wingo 933bf92949 gst/gstbin.c (gst_bin_get_state_func): Renamed from gst_bin_get_state, cleaned up (but no logic changes).
Original commit message from CVS:
2005-10-10  Andy Wingo  <wingo@pobox.com>

* gst/gstbin.c (gst_bin_get_state_func): Renamed from
gst_bin_get_state, cleaned up (but no logic changes).
(bin_element_is_sink): Comment updates.
(sink_iterator_filter): Remove needless cast.
(gst_bin_iterate_sinks): Doc update.
(gst_bin_change_state_func): Renamed from gst_bin_change_state,
cleaned up (but no logic changes).
2005-10-10 11:52:58 +00:00
Wim Taymans e823f47cdd gst/: Small docs and debug updates.
Original commit message from CVS:
* gst/gstbin.c: (is_eos), (update_degree), (gst_bin_query):
* gst/gstelement.c: (gst_element_post_message):
* gst/gstpipeline.c: (gst_pipeline_change_state):
Small docs and debug updates.
2005-10-08 18:21:20 +00:00
Wim Taymans ae25867a05 gst/gstbin.c: Fix typos, add comments.
Original commit message from CVS:
* gst/gstbin.c: (is_eos), (update_degree), (gst_bin_change_state),
(gst_bin_dispose), (bin_bus_handler):
Fix typos, add comments.
Clear EOS list when going to PAUSED from any direction and do it
in a threadsafe way.
Get base time in a threadsafe way too.
Fix confusing debug in the change_state function.
Various other mall cleanups.

* gst/gstelement.c: (gst_element_post_message):
Fix very verbose bus posting code.

* gst/gstpipeline.c: (gst_pipeline_class_init),
(gst_pipeline_set_property), (gst_pipeline_get_property),
(gst_pipeline_change_state):
Small ARG_ -> PROP_ cleanup
2005-10-08 18:01:04 +00:00
Wim Taymans 3988477b17 gst/gstbin.c: Do a less CPU demanding EOS check because we can.
Original commit message from CVS:
* gst/gstbin.c: (is_eos), (bin_bus_handler):
Do a less CPU demanding EOS check because we can.
2005-10-08 17:30:29 +00:00
Wim Taymans 65006292ce gst/: Make ChildProxy threadsafe and fix mem leaks.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_child_proxy_get_child_by_index),
(gst_bin_child_proxy_get_children_count):
* gst/gstchildproxy.c: (gst_child_proxy_get_child_by_name),
(gst_child_proxy_lookup), (gst_child_proxy_get_property),
(gst_child_proxy_get_valist), (gst_child_proxy_set_property),
(gst_child_proxy_set_valist):
* gst/parse/grammar.y:
Make ChildProxy threadsafe and fix mem leaks.
2005-10-08 09:24:25 +00:00
Thomas Vander Stichele 80ca485dad gst/: log distributing clocks and base time
Original commit message from CVS:

* gst/gst.c: (init_pre):
* gst/gstbin.c: (gst_bin_add_func):
log distributing clocks and base time
* gst/gstregistry.c: (gst_registry_add_plugin),
(gst_registry_scan_path_level), (gst_registry_scan_path):
clean up the debugging output a little
* gst/gstutils.c: (gst_element_state_get_name):
warn about a memleak (I've actually seen this be used, though
it was probably a bug)
2005-10-08 06:49:09 +00:00
Johan Dahlin 25a0f8c57f Add a GType to GstIterator, update callsites and tests.
Original commit message from CVS:
* check/gst/gstiterator.c: (GST_START_TEST):
* gst/gstbin.c: (gst_bin_iterate_elements),
(gst_bin_iterate_recurse), (gst_bin_iterate_sorted):
* gst/gstelement.c: (gst_element_iterate_pads):
* gst/gstformat.c: (gst_format_iterate_definitions):
* gst/gstiterator.c: (gst_iterator_init), (gst_iterator_new),
(gst_iterator_new_list), (gst_iterator_filter):
* gst/gstiterator.h:
* gst/gstquery.c: (gst_query_type_iterate_definitions):
Add a GType to GstIterator, update callsites and tests.
2005-10-07 00:14:45 +00:00
Wim Taymans 2d3e9f6438 gst/base/gstbasesink.c: Only error is an error.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_change_state):
Only error is an error.

* gst/gstbin.c: (gst_bin_change_state):
Better debugging.

* gst/gstpad.c: (gst_pad_alloc_buffer), (gst_pad_chain):
Also call pad_block in pad alloc.

* gst/gstutils.c: (gst_flow_get_name):
Better debugging.
2005-09-30 08:00:12 +00:00
Thomas Vander Stichele 8c2deca31b use message type names
Original commit message from CVS:
use message type names
2005-09-29 18:25:50 +00:00
Wim Taymans 92836e5172 check/gst/gstbin.c: Add bus to bin.
Original commit message from CVS:
* check/gst/gstbin.c: (GST_START_TEST):
Add bus to bin.

* gst/gstbin.c: (gst_bin_class_init), (gst_bin_init),
(add_to_queue), (clear_queue), (reset_degree), (update_degree),
(find_element), (gst_bin_sort_iterator_next),
(gst_bin_sort_iterator_resync), (gst_bin_sort_iterator_free),
(gst_bin_iterate_sorted), (gst_bin_element_set_state),
(gst_bin_change_state), (gst_bin_dispose):
A bin does not have a bus, it gets the bus from the parent.

* gst/gstelement.c: (gst_element_requires_clock),
(gst_element_provides_clock), (gst_element_is_indexable),
(gst_element_is_locked_state), (gst_element_change_state),
(gst_element_set_bus_func):
Small cleanups.

* gst/gstpipeline.c: (gst_pipeline_class_init),
(gst_pipeline_init), (gst_pipeline_provide_clock_func):
The pipeline provides a bus.
2005-09-29 09:39:36 +00:00
Wim Taymans de789ca484 gst/gstbin.c: Small doc fixes. get_clock -> provide_clock.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_class_init), (gst_bin_provide_clock_func),
(add_to_queue), (clear_queue), (reset_degree), (update_degree),
(find_element), (gst_bin_sort_iterator_next),
(gst_bin_sort_iterator_resync), (gst_bin_sort_iterator_free),
(gst_bin_iterate_sorted), (gst_bin_element_set_state),
(gst_bin_change_state), (gst_bin_dispose):
Small doc fixes. get_clock -> provide_clock.

* gst/gstelement.c: (gst_element_class_init),
(gst_element_provides_clock), (gst_element_provide_clock),
(gst_element_get_clock), (gst_element_commit_state),
(gst_element_lost_state):
* gst/gstelement.h:
Make get/set_clock() symetric. Add provide_clock vmethod since
that is actually what this function does.

* gst/gstpipeline.c: (gst_pipeline_class_init),
(gst_pipeline_change_state), (gst_pipeline_provide_clock_func),
(gst_pipeline_get_clock):
get_clock -> provide_clock.
2005-09-28 13:41:27 +00:00
Wim Taymans cacb844d6f gst/gstbin.c: Some documentation updates.
Original commit message from CVS:
* gst/gstbin.c: (add_to_queue), (clear_queue), (reset_outdegree),
(update_outdegree), (find_element), (gst_bin_sort_iterator_next),
(gst_bin_sort_iterator_resync), (gst_bin_sort_iterator_free),
(gst_bin_iterate_sorted), (gst_bin_element_set_state),
(gst_bin_change_state), (gst_bin_dispose):
Some documentation updates.
Clean up dispose handlers.

* gst/gstobject.c: (gst_object_ref), (gst_object_unref):
* gst/gstpad.c: (gst_pad_dispose):
Clean up dispose handler.

* gst/gstpipeline.c: (gst_pipeline_change_state):
Removed spurious UNLOCK.
2005-09-28 11:03:58 +00:00
Thomas Vander Stichele daadaad81b gst/: remove now useless and leaky resurrection code in dispose
Original commit message from CVS:

* gst/gstbin.c: (gst_bin_dispose):
* gst/gstelement.c: (gst_element_dispose):
remove now useless and leaky resurrection code in dispose
* gst/base/gstbasesrc.c: (gst_base_src_init):
* gst/gstelementfactory.c: (gst_element_factory_create):
* gst/gstobject.c: (gst_object_set_parent):
add some debugging
2005-09-27 18:33:48 +00:00
Wim Taymans 1da84c7e67 docs/design/part-TODO.txt: Update TODO.
Original commit message from CVS:
* docs/design/part-TODO.txt:
Update TODO.

* gst/gstbin.c: (add_to_queue), (clear_queue), (reset_outdegree),
(update_outdegree), (find_element), (gst_bin_sort_iterator_next),
(gst_bin_sort_iterator_resync), (gst_bin_sort_iterator_free),
(gst_bin_iterate_sorted), (gst_bin_element_set_state),
(gst_bin_change_state):
* gst/gstelement.h:
Remove element variable, we keep element info in the iterator now.
2005-09-27 17:00:13 +00:00
Wim Taymans 4d4a60f6c9 check/gst/gstbin.c: Enable check that works now.
Original commit message from CVS:
* check/gst/gstbin.c: (GST_START_TEST):
Enable check that works now.

* gst/gstbin.c: (add_to_queue), (clear_queue), (reset_outdegree),
(update_outdegree), (find_element), (gst_bin_sort_iterator_next),
(gst_bin_sort_iterator_resync), (gst_bin_sort_iterator_free),
(gst_bin_iterate_sorted), (gst_bin_element_set_state),
(gst_bin_change_state):
* gst/gstbin.h:
Redid the state change algorithm using a topological sort algo.
Handles all cases correctly.
Exposed iterator for state change order.

* gst/gstelement.h:
Temp storage for state changes. Need to get rid of this soon.
2005-09-27 16:16:39 +00:00
Wim Taymans 01085fa26a gst/gstbin.c: use gst_object_has_ancestor().
Original commit message from CVS:
* gst/gstbin.c: (bin_element_is_semi_sink), (gst_bin_change_state):
use gst_object_has_ancestor().

* gst/gstobject.c: (gst_object_has_ancestor):
* gst/gstobject.h:
gst_object_has_ancestor() copied from gstbin.c as it is a
usefull function.

* tests/instantiate/create.c: (create_all_elements):
* tests/lat.c: (handoff_src), (handoff_sink):
* tests/sched/runxml.c: (main):
* tests/seeking/seeking1.c: (main):
* tests/threadstate/threadstate2.c: (bus_handler), (timeout_func),
(main):
Fix compilation of some tests.
2005-09-27 09:57:20 +00:00
Wim Taymans e32e0a17ed gst/gstbin.c: Make state change function use 3 queues again, we were adding elements in the wrong order.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_change_state):
Make state change function use 3 queues again, we were
adding elements in the wrong order.

* gst/gstghostpad.c: (gst_ghost_pad_do_unlink):
Some debug info,

* gst/gstpad.c: (gst_pad_dispose):
Added some debug info first.
2005-09-26 17:46:27 +00:00
Wim Taymans 84770e8437 Various documentation updates.
Original commit message from CVS:
* docs/design/part-events.txt:
* docs/design/part-gstbus.txt:
* docs/design/part-gstpipeline.txt:
* docs/design/part-messages.txt:
* docs/design/part-overview.txt:
* docs/design/part-segments.txt:
* gst/gstbin.c:
* gst/gstbuffer.c:
* gst/gstclock.c:
* gst/gstelement.c:
* gst/gstevent.c:
* gst/gstfilter.c:
* gst/gstiterator.c:
Various documentation updates.
2005-09-24 14:14:03 +00:00
Tim-Philipp Müller 705936d1bf check/gst/gstbin.c: Added test to check state change order in bins (can still be made to fail here under heavy disk l...
Original commit message from CVS:
* check/gst/gstbin.c: (test_children_state_change_order_flagged_sink),
(test_children_state_change_order_semi_sink), (gst_bin_suite):
Added test to check state change order in bins (can still be made
to fail here under heavy disk load; bails out with 'Push on pad
fakesink:sink0, but it was not activated in push mode').
* gst/gstbin.c: (gst_bin_class_init), (gst_bin_change_state):
Fix state change order when there is only a semi sink (#316856)
* gst/gstbus.c: (gst_bus_class_init):
Use _class_peek_parent(), not _class_ref(); fix docs to say
'default main context' instead of 'mainloop' where that is
what's meant.
* gst/gstelement.c: (gst_element_commit_state),
(gst_element_set_state):
Fix typos in debug messages
2005-09-23 17:17:42 +00:00
Wim Taymans 4793bc208d gst/gstbin.c: Some more debug info.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_add_func):
Some more debug info.

* gst/gstelement.c: (gst_element_send_event):
Simplify send_event

* gst/gstelement.h:
Don't know how flags got broken.

* gst/gstquery.h:
Added new query.
2005-09-22 16:51:27 +00:00
Stefan Kost 0838cd0b74 more docs inlined, splitted gstindex.{c,h}
Original commit message from CVS:
* docs/gst/gstreamer-docs.sgml:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* gst/Makefile.am:
* gst/gst.h:
* gst/gstbin.c:
* gst/gstelement.h:
* gst/gstindex.c: (gst_index_class_init):
* gst/gstindex.h:
* gst/gstindexfactory.c: (gst_index_factory_get_type),
(gst_index_factory_class_init), (gst_index_factory_init),
(gst_index_factory_finalize), (gst_index_factory_new),
(gst_index_factory_destroy), (gst_index_factory_find),
(gst_index_factory_create), (gst_index_factory_make):
* gst/gstindexfactory.h:
* gst/gstpluginfeature.c:
* gst/gstpluginfeature.h:
* libs/gst/controller/gstcontroller.c: (gst_controller_new_valist):
more docs inlined, splitted gstindex.{c,h}
2005-09-20 20:40:00 +00:00
Andy Wingo e040bb2dbe gst/gstelement.h (GstState): Renamed from GstElementState, changed to be a normal enum instead of flags.
Original commit message from CVS:
2005-09-02  Andy Wingo  <wingo@pobox.com>

* gst/gstelement.h (GstState): Renamed from GstElementState,
changed to be a normal enum instead of flags.
(GstStateChangeReturn): Renamed from GstElementStateReturn, names
munged to be GST_STATE_CHANGE_*.
(GST_STATE_CHANGE): Renamed from GST_STATE_TRANSITION, updated to
work with the new state representation.
(GstStateChange): New enumeration of possible state transitions.
Replaces GST_STATE_FOO_TO_BAR with GST_STATE_CHANGE_FOO_TO_BAR.
(GstElementClass::change_state): Pass the GstStateChange along as
an argument. Helps language bindings, so they don't have to use
tricky lock-needing macros like GST_STATE_CHANGE ().

* scripts/update-states (file): New script. Run it on a file to
update it for state naming and API changes. Updates files in
place.

* All files updated for the new API.
2005-09-02 15:42:00 +00:00
Wim Taymans 46bb10ac37 gst/gstbin.c: Be a bit more conservative about the posted message.
Original commit message from CVS:
* gst/gstbin.c: (bin_bus_handler):
Be a bit more conservative about the posted message.

* gst/gstbus.c: (gst_bus_post):
Some cleanups, warn wrong return values.
2005-08-25 13:52:13 +00:00
Jan Schmidt 864b976fef Revert unpopular change for GST_MESSAGE_SRC to GObject.
Original commit message from CVS:
* check/gst/gstbin.c: (GST_START_TEST):
* gst/gstbin.c: (bin_bus_handler):
* gst/gstmessage.c: (gst_message_finalize), (_gst_message_copy),
(gst_message_new), (gst_message_new_eos), (gst_message_new_error),
(gst_message_new_warning), (gst_message_new_tag),
(gst_message_new_state_changed), (gst_message_new_segment_start),
(gst_message_new_segment_done), (gst_message_new_custom):
* gst/gstmessage.h:
* tools/gst-launch.c: (event_loop):
* tools/gst-md5sum.c: (event_loop):
Revert unpopular change for GST_MESSAGE_SRC to GObject.
2005-08-25 10:51:14 +00:00
Stefan Kost 2445f27de7 added miissing classes and symbols (123 more to go) removed removed symbols from section file fixed many doc-comments
Original commit message from CVS:
* docs/gst/gstreamer-docs.sgml:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* gst/gstbin.c:
* gst/gstiterator.c:
* gst/gstutils.c:
* gst/registries/gstxmlregistry.h:
added miissing classes and symbols (123 more to go)
removed removed symbols from section file
fixed many doc-comments
2005-08-24 21:35:43 +00:00