Commit graph

11 commits

Author SHA1 Message Date
Wim Taymans 5d498183bc Clean up gstelement.h
Original commit message from CVS:
Clean up gstelement.h
GstBin cleanups, fix bug where iterator was freed.
GstElement cleanups.
Backport gstinfo from HEAD.
Fix GstIterator comparison bug.
Fix clock tests.
2005-03-09 16:24:52 +00:00
Wim Taymans b43d8f1006 gst/: Backport HEAD changes, mostly docs.
Original commit message from CVS:
* gst/gst_private.h:
* gst/gstbin.c: (gst_bin_get_by_name_recurse_up):
* gst/gstbuffer.h:
* gst/gstclock.c: (gst_clock_id_ref), (gst_clock_id_unref),
(gst_clock_id_compare_func), (gst_clock_id_wait),
(gst_clock_id_wait_async), (gst_clock_init),
(gst_clock_adjust_unlocked), (gst_clock_get_time):
* gst/gstclock.h:
* gst/gstelement.c: (gst_element_class_init),
(gst_element_get_random_pad), (gst_element_get_state_func),
(gst_element_lost_state):
* gst/gstelement.h:
* gst/gstelementfactory.c: (gst_element_register):
* gst/gstiterator.c:
* gst/gstobject.c: (gst_object_set_parent):
* gst/gstobject.h:
* gst/gstpad.c: (gst_pad_push), (gst_pad_pull_range),
(gst_pad_query):
* gst/gstpad.h:
* gst/gstplugin.h:
* gst/gstprobe.h:
* gst/parse/parse.l:
* gst/registries/gstxmlregistry.c: (gst_xml_registry_load):
Backport HEAD changes, mostly docs.
Fix possible deadlock in _get_random_pad.
2005-03-09 11:05:00 +00:00
Andy Wingo bffbacfaae gst/gstiterator.c (gst_iterator_find_custom)
Original commit message from CVS:
2005-03-03  Andy Wingo  <wingo@pobox.com>

* gst/gstiterator.c (gst_iterator_find_custom)
(gst_iterator_foreach, gst_iterator_fold): Never free the
iterator.

* gst/elements/gsttee.c (gst_tee_handle_buffer):
* gst/gstutils.c (gst_pad_proxy_setcaps, gst_pad_proxy_getcaps):
Always free the iterator.

* check/gst/gstbus.c (pull_messages): Use public
gst_message_get_structure().
2005-03-03 15:58:42 +00:00
Andy Wingo 70d2a801d9 tests/complexity.c: Adjust to lack of gst_bin_iterate, boolean link return values.
Original commit message from CVS:
2005-03-01  Andy Wingo  <wingo@pobox.com>

* tests/complexity.c: Adjust to lack of gst_bin_iterate, boolean
link return values.

* gst/elements/gsttee.c, gst/elements/gsttee.h: I am the master of
do-nothing plugins! Fear the dev-zero!

* gst/elements/gstelements.c
* gst/elements/Makefile.am: Add tee back to gstelements.

* gst/gstutils.h
* gst/gstutils.c (gst_pad_proxy_getcaps, gst_pad_proxy_setcaps):
Resurrect from the dead. Use gst_iterator_fold to be threadsafe.

* gst/gstiterator.h (GstIteratorFoldFunction): Return a bool.

* gst/gstiterator.c (gst_iterator_fold): Only continue folding as
long as the fold function returns TRUE. Add a bunch o docs.
(gst_iterator_foreach): Add docs about when the iterator will be
freed.
(gst_iterator_find_custom): Make more efficient because of the
bool-return-value thing.

* check/gst/gstiterator.c (add_fold_func): Adapt to new
fold-funcs-returning-bool policy.

* gst/gstutils.h:
* gst/gstutils.c (gst_element_link, gst_element_link_many)
(gst_element_link_filtered, gst_element_link_pads)
(gst_element_link_pads_filtered): It seems Wim changed the return
type to booleans internally. Assume he knows what he's doing and
change the prototypes as well.
2005-03-01 16:51:11 +00:00
Andy Wingo b56662cf97 gst/gstpipeline.c: Fix element details.
Original commit message from CVS:
2005-03-01  Andy Wingo  <wingo@pobox.com>

* gst/gstpipeline.c: Fix element details.
(gst_pipeline_set_property, gst_pipeline_get_property): Lock
around the whole get/set properties.

* gst/gstpad.c (gst_real_pad_set_property): Add a FIXME, the
::active property doesn't make sense any more.
(gst_pad_set_active): Check to see if the pad has the right
functions to be activated in this mode.
(gst_pad_event_default): Handle EOS specially, pausing the task on
the pad if necessary.

* gst/gstbin.c: Adapt callers of gst_iterator_foreach and
gst_iterator_filter to new argument order.

* gst/gstiterator.c (gst_iterator_find_custom)
(gst_iterator_foreach): Implement on top of gst_iterator_fold
instead of using the filter_next internals. A bit cleaner this
way.

* gst/gstiterator.h:
(gst_iterator_filter, gst_iterator_find_custom): Switch the
argument order so user_data is last.
(gst_iterator_foreach): Return the GstIteratorResult so the caller
knows if all elements were called, or if an error or resync
happened.
(gst_iterator_fold): New procedure.

* check/Makefile.am (TESTS):
* check/gst/gstiterator.c: New test suite for GstIterator. Checks
that iterating through a list hits all members in order, that
resync works correctly, and that fold works.

* gst/base/gstbasesink.c (gst_basesink_event): Fix Waymans bug.
2005-03-01 12:55:32 +00:00
Wim Taymans 918a75789e gst/: Only call the item function in the iterator if there is an item.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_basesink_get_template),
(gst_basesink_base_init), (gst_basesink_class_init),
(gst_basesink_pad_getcaps), (gst_basesink_pad_setcaps),
(gst_basesink_pad_buffer_alloc), (gst_basesink_init),
(gst_base_sink_get_template), (gst_base_sink_get_caps),
(gst_base_sink_set_caps), (gst_base_sink_buffer_alloc),
(gst_basesink_finish_preroll), (gst_basesink_event),
(gst_basesink_get_times), (gst_basesink_do_sync),
(gst_basesink_change_state):
* gst/base/gstbasesink.h:
* gst/gstiterator.c: (gst_iterator_init), (gst_iterator_new),
(gst_list_iterator_next), (gst_list_iterator_free),
(gst_iterator_new_list), (gst_iterator_pop), (gst_iterator_next),
(gst_iterator_push):
Only call the item function in the iterator if there is an item.
Add capsnego stuff and buffer_alloc to the basesink class.
Cleanups in the preroll code.
2005-02-23 17:32:37 +00:00
Wim Taymans ba3534f315 Add sink base class to abstract locking and preroll.
Original commit message from CVS:
* configure.ac:
* docs/design/part-states.txt:
* gst/Makefile.am:
* gst/base/Makefile.am:
* gst/base/gstbasesink.c: (gst_basesink_get_template),
(gst_basesink_base_init), (gst_basesink_class_init),
(gst_basesink_init), (gst_basesink_set_pad_functions),
(gst_basesink_set_all_pad_functions), (gst_basesink_set_clock),
(gst_basesink_set_property), (gst_basesink_get_property),
(gst_base_sink_get_template), (gst_base_sink_get_caps),
(gst_base_sink_set_caps), (gst_base_sink_alloc_buffer),
(gst_basesink_finish_preroll), (gst_basesink_event),
(gst_basesink_chain_unlocked), (gst_basesink_chain),
(gst_basesink_loop), (gst_basesink_activate),
(gst_basesink_change_state):
* gst/base/gstbasesink.h:
* gst/elements/Makefile.am:
* gst/elements/gstfakesink.c: (gst_fakesink_base_init),
(gst_fakesink_class_init), (gst_fakesink_init),
(gst_fakesink_set_property), (gst_fakesink_get_property),
(gst_fakesink_event), (gst_fakesink_preroll),
(gst_fakesink_render), (gst_fakesink_change_state):
* gst/elements/gstfakesink.h:
* gst/gstelement.c: (gst_element_get_random_pad):
* gst/gstevent.h:
* gst/gstiterator.c: (gst_iterator_init), (gst_iterator_new),
(gst_list_iterator_next), (gst_list_iterator_free),
(gst_iterator_new_list), (gst_iterator_pop), (gst_iterator_next),
(gst_iterator_push), (filter_next):
* gst/gstmessage.h:
* gst/gsttrashstack.h:
Add sink base class to abstract locking and preroll.
Make fakesink use the base class.
Some doc fixes.
Fix missing breaks.
2005-02-23 11:22:43 +00:00
Wim Taymans 10e648c7d9 Removed schedulers and compat stuff.
Original commit message from CVS:
Removed schedulers and compat stuff.
Use iterators in bin for the various lookup functions.
Optimized the clock a bit.
Added some more docs.
Fixed scheduling in the ()-(l) case.
Fixed and added some testcases.
Removed old code.
2005-01-26 10:56:09 +00:00
Wim Taymans 74ca793b0a Clock fixes. Added async callbacks and clock unscheduling.
Original commit message from CVS:
Clock fixes. Added async callbacks and clock unscheduling.
Threading fixes. Fixed race condition in GstTask and possible
deadlock in _pad_get_caps(). Made various subsystems (query,
format,..) threadsafe.
Lots of cleanups and documentation.
2005-01-06 18:17:12 +00:00
Wim Taymans 767d9e4681 More MT fixes, added design document describing refcounting policies used in GStreamer and locking involved.
Original commit message from CVS:
* docs/design/part-MT-refcounting.txt:
* docs/design/part-conventions.txt:
* gst/gstbin.c: (gst_bin_set_index), (gst_bin_set_clock),
(gst_bin_add_func), (gst_bin_remove_func),
(gst_bin_iterate_elements), (gst_bin_change_state),
(gst_bin_dispose), (gst_bin_get_by_name_recurse_up):
* gst/gstcaps.c:
* gst/gstelement.c: (gst_element_add_pad),
(gst_element_remove_pad), (pad_compare_name),
(gst_element_get_static_pad), (gst_element_get_request_pad),
(gst_element_get_pad), (gst_element_iterate_pads),
(gst_element_class_get_pad_template_list),
(gst_element_class_get_pad_template), (gst_element_get_random_pad),
(gst_element_get_event_masks), (gst_element_send_event),
(gst_element_seek), (gst_element_get_query_types),
(gst_element_query), (gst_element_get_formats),
(gst_element_convert), (gst_element_post_message),
(gst_element_set_locked_state), (gst_element_get_state),
(gst_element_set_state), (gst_element_pads_activate),
(gst_element_dispose), (gst_element_set_manager_func),
(gst_element_get_manager):
* gst/gstelement.h:
* gst/gstiterator.c: (gst_iterator_new), (gst_list_iterator_next),
(gst_list_iterator_resync), (gst_list_iterator_free),
(gst_iterator_new_list):
* gst/gstiterator.h:
* gst/gstmessage.c: (_gst_message_copy):
* gst/gstobject.c: (gst_object_class_init), (gst_object_init),
(gst_object_ref), (gst_object_unref), (gst_object_sink),
(gst_object_replace), (gst_object_dispose),
(gst_object_dispatch_properties_changed), (gst_object_set_name),
(gst_object_set_parent), (gst_object_get_parent),
(gst_object_unparent), (gst_object_check_uniqueness),
(gst_object_get_path_string):
* gst/gstobject.h:
* gst/gstpad.c: (gst_pad_dispose), (gst_pad_set_active),
(gst_pad_is_active), (gst_pad_set_blocked_async),
(gst_pad_is_blocked), (gst_pad_unlink), (gst_pad_is_linked),
(gst_pad_link_prepare_filtered), (gst_pad_link_filtered),
(gst_pad_get_real_parent), (gst_pad_relink_filtered),
(gst_pad_get_peer), (gst_pad_realize), (gst_pad_get_allowed_caps),
(gst_pad_alloc_buffer), (gst_pad_push), (gst_pad_pull),
(gst_pad_pull_range), (gst_pad_push_event):
* gst/gstpad.h:
* gst/gstpipeline.c: (gst_pipeline_init), (gst_pipeline_dispose),
(is_eos), (pipeline_bus_handler):
* gst/gstutils.c: (gst_element_get_compatible_pad_filtered),
(gst_element_link_pads_filtered), (gst_element_unlink):
* gst/parse/grammar.y:
* tools/gst-compprep.c: (main):
* tools/gst-inspect.c: (print_pad_info):
* tools/gst-launch.c: (main):
* tools/gst-xmlinspect.c: (print_element_info):
More MT fixes, added design document describing refcounting
policies used in GStreamer and locking involved.
Fixed unsafe ghostpad dereffing.
Removed old unsafe methods.
2004-12-13 11:33:55 +00:00
Thomas Vander Stichele 65285e1acf newly added files
Original commit message from CVS:
newly added files
2004-12-08 18:05:14 +00:00