Commit graph

363 commits

Author SHA1 Message Date
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 ed1664fbaf Add finalize method to RealPad.
Original commit message from CVS:
Add finalize method to RealPad.
Add new lock to correctly do the preroll, should probably not
be put here.
Make fakesink do preroll correctly. Emit a message when the
preroll sample is queued.
Add more info in gst-launch regarding state changes.
2005-02-21 18:49:19 +00:00
Andy Wingo aafa4f7570 gst/gstpad.c (gst_real_pad_dispose): Free the stream lock (it wasn't being freed before).
Original commit message from CVS:
2005-02-21  Andy Wingo  <wingo@pobox.com>

* gst/gstpad.c (gst_real_pad_dispose): Free the stream lock (it
wasn't being freed before).
(gst_real_pad_init): Allocate and initialize the stream lock.

* gst/gstpad.h (GstRealPad): Change the stream lock to be
recursive, so that if an event comes while a loop-based sink is
pulling, the stream lock can be had by both the sink's loop
function and the sink's event function.
(GST_STREAM_GET_LOCK, GST_STREAM_LOCK, GST_STREAM_TRYLOCK)
(GST_STREAM_UNLOCK): Updated accordingly.
2005-02-21 14:11:26 +00:00
Andy Wingo 7c0804b15c testsuite/caps/value_serialize.c: merge from HEAD.
Original commit message from CVS:
2005-02-10  Andy Wingo  <wingo@pobox.com>

* testsuite/caps/value_serialize.c: merge from HEAD.

* testsuite/caps/subtract.c:
* testsuite/caps/filtercaps.c:
* testsuite/caps/enumcaps.c:
* testsuite/caps/deserialize.c:
* testsuite/caps/caps.c:
* testsuite/caps/audioscale.c: Unref caps, not free.

* testsuite/caps/caps_strings: Merged from HEAD.

* gst/elements/gstidentity.c (gst_identity_proxy_getcaps): Getcaps
implementation for identity.

* gst/gststructure.h
* gst/gststructure.c
(gst_caps_structure_fixate_field_nearest_double):
(gst_caps_structure_fixate_field_nearest_int): Moved from
gstcaps.c because we need the private IS_MUTABLE macro.
(IS_MUTABLE): New macro, determines if a
structure is mutable or not.
(gst_structure_free): Don't allow free while holding a pointer to
a parent's refcount.
(gst_structure_set_name): Check for writability.
(gst_structure_id_set_value): Same.
(gst_structure_set_value): Same.
(gst_structure_set_valist): Same.
(gst_structure_remove_field): Same.
(gst_structure_remove_all_fields): Same.
(gst_structure_map_in_place): New routine, like _foreach but
allows the function to mutate the value (via a non-const
prototype). Check for writability.
(gst_structure_foreach): Redefine to only take non-mutating
functions.

* gst/gstcaps.c (IS_WRITABLE): New macro, returns TRUE if the caps
are writable.
(gst_caps_copy): Add some docs about mutability, etc.
(_gst_caps_free): Set the parent refcount pointer on structures to
NULL before freeing them.
(gst_caps_ref): Document.
(gst_caps_make_writable): Doc.
(gst_caps_make_writable): Changed to make_writable, get_writable
sounds too much like retrieving a property.
(gst_caps_copy_1): Removed, not very useful.
(gst_caps_ref_by_count): Removed, no need to have something GLib
doesn't.
(gst_caps_copy_conditional): Ref instead of copying.
(gst_static_caps_get): Retain a reference to the returned caps, so
that the static caps will remain immutable.
(gst_caps_remove_and_get_structure): Set the parent refcount to
NULL when removing the structure.
(gst_caps_append): Fix to work with structure parent refcounts.
Check for writability.
(gst_caps_append_structure): Check for writability, work with
parent refcounts.
(gst_caps_remove_structure): Check for writability.
(gst_caps_set_simple): Check for writability.
(gst_caps_set_simple_valist): Check for writability.
(gst_caps_is_fixed_foreach): Update for non-mutating foreach.
(gst_structure_is_equal_foreach): Same.
(gst_caps_structure_intersect_field): Same.
(gst_caps_structure_subtract_field): Same. Make static.
(gst_caps_normalize_foreach): Same.
(gst_caps_structure_figure_out_union): Same.
(gst_caps_switch_structures): New static function, switches out
structures inside a caps, taking care of parent_refcount setting.

* gst/gstpad.c (gst_pad_get_allowed_caps): Remove the restriction
on only src pads, wim von masterhack claims it was bogus.

* testsuite/caps/Makefile.am
* testsuite/caps/app_fixate.c: Removed app_fixate test, things are
done a bit differently in THREADED.
2005-02-10 19:40:23 +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 5951a9840d gst/: Work on flushing.
Original commit message from CVS:
* gst/elements/gstfilesrc.c: (gst_filesrc_getrange),
(gst_filesrc_get), (gst_filesrc_activate):
* gst/gstclock.c: (gst_clock_init), (gst_clock_dispose):
* gst/gstclock.h:
* gst/gstevent.c: (gst_event_new_discontinuous_valist),
(gst_event_new_discontinuous), (gst_event_discont_get_value),
(gst_event_new_flush):
* gst/gstevent.h:
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_set_blocked_async),
(gst_pad_set_acceptcaps_function),
(gst_pad_set_fixatecaps_function), (gst_pad_unlink),
(gst_pad_link_prepare_filtered), (gst_pad_link_filtered),
(gst_pad_relink_filtered), (gst_real_pad_get_caps_unlocked),
(gst_pad_peer_get_caps), (gst_pad_fixate_caps),
(gst_pad_accept_caps), (gst_pad_peer_accept_caps),
(gst_pad_set_caps), (gst_pad_configure_sink),
(gst_pad_configure_src), (gst_pad_realize), (gst_pad_alloc_buffer),
(gst_pad_push), (gst_pad_push_event), (gst_pad_send_event):
* gst/gstpad.h:
* gst/gsttask.c: (gst_task_pause):
* gst/gsttask.h:
* gst/schedulers/threadscheduler.c:
(gst_thread_scheduler_task_class_init),
(gst_thread_scheduler_task_init),
(gst_thread_scheduler_task_start),
(gst_thread_scheduler_task_stop),
(gst_thread_scheduler_task_pause), (gst_thread_scheduler_func):
Work on flushing.
Allow tasks to be paused.
Remove some old code in GstClock
2005-01-04 12:06:57 +00:00
Wim Taymans 6bd0304727 gst/: Fix scheduler distribution.
Original commit message from CVS:
* gst/elements/gstfakesrc.c: (gst_fakesrc_loop),
(gst_fakesrc_activate):
* gst/elements/gstfilesrc.c: (gst_filesrc_getrange),
(gst_filesrc_get), (gst_filesrc_activate):
* gst/gstbin.c: (gst_bin_set_index), (gst_bin_set_clock),
(gst_bin_set_bus), (gst_bin_set_scheduler), (gst_bin_add_func),
(gst_bin_iterate_elements), (gst_bin_change_state),
(gst_bin_get_by_name), (gst_bin_get_by_name_recurse_up):
* gst/gstelement.c: (gst_element_add_pad),
(gst_element_pads_activate):
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_set_blocked_async),
(gst_pad_set_acceptcaps_function),
(gst_pad_set_fixatecaps_function), (gst_pad_unlink),
(gst_pad_link_prepare_filtered), (gst_pad_link_filtered),
(gst_pad_relink_filtered), (gst_real_pad_get_caps_unlocked),
(gst_pad_get_caps), (gst_pad_peer_get_caps), (gst_pad_fixate_caps),
(gst_pad_accept_caps), (gst_pad_peer_accept_caps),
(gst_pad_set_caps), (gst_pad_configure_sink),
(gst_pad_configure_src), (gst_pad_realize), (gst_pad_alloc_buffer),
(gst_pad_push), (gst_pad_push_event):
* gst/gstpad.h:
* gst/gstqueue.c: (gst_queue_init), (gst_queue_getcaps),
(gst_queue_bufferalloc), (gst_queue_loop),
(gst_queue_handle_src_query), (gst_queue_src_activate):
* gst/gstutils.c: (gst_element_finish_preroll),
(gst_element_get_compatible_pad_filtered),
(gst_element_link_pads_filtered), (gst_element_unlink):
* gst/parse/grammar.y:
Fix scheduler distribution.
Implement some caps functions and convenience functions.
Fix deadlock.
Implement scheduling selection.
Check pad compatibility when connecting pads.
2004-12-29 10:49:28 +00:00
Wim Taymans 457e99ab07 Correctly distribute clock/scheduler to elements
Original commit message from CVS:
* gst/elements/gstfakesink.c: (gst_fakesink_event):
* gst/elements/gstfakesrc.c: (gst_fakesrc_update_functions),
(gst_fakesrc_loop), (gst_fakesrc_activate):
* gst/elements/gstfilesrc.c: (gst_filesrc_init),
(gst_filesrc_getrange), (gst_filesrc_get), (gst_filesrc_loop):
* gst/gstbin.c: (gst_bin_class_init), (gst_bin_set_index),
(gst_bin_set_clock), (gst_bin_set_bus), (gst_bin_set_scheduler),
(gst_bin_add_func), (gst_bin_iterate_elements),
(gst_bin_change_state), (gst_bin_get_by_name_recurse_up):
* gst/gstcaps.c: (gst_caps_intersect):
* gst/gstelement.c: (gst_element_pads_activate),
(gst_element_change_state), (gst_element_create_task):
* gst/gstobject.c: (gst_object_class_init), (gst_object_ref),
(gst_object_unref), (gst_object_sink), (gst_object_dispose),
(gst_object_dispatch_properties_changed), (gst_object_set_name),
(gst_object_set_parent), (gst_object_unparent),
(gst_object_check_uniqueness), (gst_object_get_path_string):
* gst/gstpad.c: (gst_real_pad_init), (gst_real_pad_get_property),
(gst_pad_set_active), (gst_pad_is_active),
(gst_pad_set_blocked_async), (gst_pad_set_loop_function),
(gst_pad_set_getrange_function), (gst_pad_set_acceptcaps_function),
(gst_pad_set_fixatecaps_function), (gst_pad_set_setcaps_function),
(gst_pad_unlink), (gst_pad_link_prepare_filtered),
(gst_pad_link_filtered), (gst_pad_relink_filtered),
(gst_pad_get_caps), (gst_pad_set_caps), (gst_pad_configure_sink),
(gst_pad_configure_src), (gst_pad_realize),
(gst_pad_get_allowed_caps), (gst_pad_get_negotiated_caps),
(gst_pad_get_filter_caps), (gst_pad_alloc_buffer), (gst_pad_push),
(gst_pad_push_event):
* gst/gstpad.h:
* gst/gstpipeline.c: (gst_pipeline_init), (gst_pipeline_dispose),
(is_eos), (pipeline_bus_handler), (gst_pipeline_change_state),
(gst_pipeline_get_scheduler), (gst_pipeline_get_bus):
* gst/gstpipeline.h:
* gst/gstqueue.c: (gst_queue_init), (gst_queue_locked_flush),
(gst_queue_handle_sink_event), (gst_queue_chain), (gst_queue_loop),
(gst_queue_src_activate), (gst_queue_change_state):
* gst/gsttask.h:
* gst/gstutils.c: (gst_element_get_compatible_pad_filtered),
(gst_element_link_pads_filtered), (gst_element_unlink),
(gst_pad_can_link_filtered):
* gst/schedulers/threadscheduler.c: (gst_thread_scheduler_func):
* libs/gst/Makefile.am:
* tools/gst-inspect.c: (print_pad_info):
* tools/gst-launch.c: (main):
* tools/gst-xmlinspect.c: (print_element_info):
Correctly distribute clock/scheduler to elements
Caps intersection improvement.
MT fixes.
Work on scheduling simplifications, get rid of _pull and prepare
for scheduling setup.
More work on capsnego.
2004-12-20 16:07:05 +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
Wim Taymans aed37ff5c3 gst/gstpad.*: More MT fixes.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_custom_new), (gst_pad_get_direction),
(gst_pad_set_active), (gst_pad_is_active),
(gst_pad_set_blocked_async), (gst_pad_unlink),
(gst_pad_get_real_parent), (gst_pad_relink_filtered),
(gst_pad_alloc_buffer), (handle_pad_block), (gst_pad_push),
(gst_pad_pull), (gst_pad_pull_range), (gst_pad_push_event):
* gst/gstpad.h:
More MT fixes.
2004-12-09 22:03:28 +00:00
Wim Taymans 15b0278251 gst/: More MT safety fixes following the desing doc.
Original commit message from CVS:
* gst/gst_private.h:
* gst/gstbin.c: (gst_bin_class_init), (gst_bin_set_index),
(gst_bin_set_clock), (gst_bin_get_clock),
(gst_bin_iterate_elements), (gst_bin_get_by_name),
(gst_bin_get_by_name_recurse_up), (gst_bin_get_by_interface),
(gst_bin_get_all_by_interface):
* gst/gstbin.h:
* gst/gstelement.c: (gst_element_add_pad),
(gst_element_remove_pad), (gst_element_request_pad),
(gst_element_post_message), (gst_element_error_full),
(gst_element_is_locked_state), (gst_element_set_locked_state),
(gst_element_create_task):
* gst/gstelement.h:
* gst/gstinfo.h:
* gst/gstiterator.h:
* gst/gstobject.c: (gst_object_init), (gst_object_ref),
(gst_object_unref), (gst_object_sink), (gst_object_dispose),
(gst_object_finalize), (gst_object_dispatch_properties_changed),
(gst_object_set_name), (gst_object_get_name),
(gst_object_set_parent), (gst_object_get_parent),
(gst_object_unparent), (gst_object_check_uniqueness),
(gst_object_save_thyself), (gst_object_restore_thyself),
(gst_object_real_restore_thyself), (gst_object_set_property),
(gst_object_get_property), (gst_object_get_path_string):
* gst/gstobject.h:
* gst/gstpad.c: (gst_pad_get_direction), (gst_pad_unlink),
(gst_pad_is_linked), (gst_pad_link_filtered),
(gst_pad_relink_filtered), (gst_pad_get_peer), (gst_pad_push),
(gst_pad_pull), (gst_pad_pull_range):
* gst/gstpad.h:
More MT safety fixes following the desing doc.
2004-12-09 21:08:13 +00:00
Thomas Vander Stichele 3ffce00efc commiting wim's preliminary threaded work to a branch
Original commit message from CVS:
commiting wim's preliminary threaded work to a branch
2004-12-08 17:40:37 +00:00
Ronald S. Bultje 8291c44aa1 gst/gstpad.c: GST_RPAD_* will only operate on a RealPad (it casts the pointer, it doesn't actually check the contents...
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_is_negotiated),
(gst_pad_get_negotiated_caps):
GST_RPAD_* will only operate on a RealPad (it casts the pointer,
it doesn't actually check the contents), so be sure to hand it
a RealPad else we'll crash.
2004-12-03 13:24:15 +00:00
Ronald S. Bultje 8d61d9045d gst/: Deprecate _type_is_fixed, use _value_is_fixed instead, since the fixedness depends on the content.
Original commit message from CVS:
* gst/gstcaps.c: (gst_caps_is_fixed_foreach):
* gst/gstpad.c: (_gst_pad_default_fixate_value),
(_gst_pad_default_fixate_foreach):
* gst/gstvalue.c: (gst_type_is_fixed), (gst_value_is_fixed):
* gst/gstvalue.h:
Deprecate _type_is_fixed, use _value_is_fixed instead, since
in some cases (arrays), the fixedness depends on the content.
* gst/gstqueue.c: (gst_queue_handle_src_query):
Check for availability before doing something.
2004-11-29 17:02:09 +00:00
Martin Soto 7bf7d80452 gst/gstpad.c (gst_pad_collectv): Fix the return line.
Original commit message from CVS:
2004-11-07  Martin Soto  <martinsoto@users.sourceforge.net>

* gst/gstpad.c (gst_pad_collectv): Fix the return line.
(gst_pad_collect_valist): Fix gst_pad_collect_array
invocation. Apparently this functions were never tested.
2004-11-07 20:10:18 +00:00
Wim Taymans 6d42edd550 gst/: Aplied part of patch #157127: Cleanup of issues reported by sparse.
Original commit message from CVS:
reviewed by: Wim Taymans, Ronald Bultje.

* gst/cothreads.c: (cothread_create):
* gst/gstbin.c: (gst_bin_add_func), (gst_bin_remove_func),
(gst_bin_child_state_change_func):
* gst/gstbuffer.c: (gst_buffer_span):
* gst/gstelement.c: (gst_element_get_index),
(gst_element_get_event_masks), (gst_element_get_query_types),
(gst_element_get_formats):
* gst/gsterror.c: (_gst_core_errors_init),
(_gst_library_errors_init), (_gst_resource_errors_init),
(_gst_stream_errors_init):
* gst/gstobject.c: (gst_object_default_deep_notify):
* gst/gstpad.c: (gst_pad_get_event_masks),
(gst_pad_get_internal_links_default):
* gst/gstplugin.c: (gst_plugin_register_func),
(gst_plugin_get_module):
* gst/gststructure.c: (gst_structure_get_string),
(gst_structure_get_abbrs), (gst_structure_from_abbr),
(gst_structure_to_abbr):
* gst/gstutils.c: (gst_print_element_args):
* gst/schedulers/gstoptimalscheduler.c: (add_to_group),
(setup_group_scheduler), (gst_opt_scheduler_iterate):
Aplied part of patch #157127: Cleanup of issues reported by
sparse.
Also do not try to use cothreads when there is no cothread
context yet.
2004-11-02 15:02:12 +00:00
Benjamin Otte bedb0bef2b gst/gstpad.c: allow renegotiation of unconnected pads (as inside spider). Simply return OK if unconnected - mimic try...
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_renegotiate), (gst_pad_try_set_caps),
(gst_pad_try_set_caps_nonfixed):
allow renegotiation of unconnected pads (as inside spider). Simply
return OK if unconnected - mimic try_set_caps there.
2004-10-11 05:23:40 +00:00
Thomas Vander Stichele 3cd8266b12 revert preferred caps
Original commit message from CVS:
revert preferred caps
2004-09-26 17:35:08 +00:00
Wim Taymans c23fde0c51 gst/gstpad.c: Fix debug info.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_link_call_link_functions):
Fix debug info.
2004-09-06 15:02:48 +00:00
David Schleef aa6049eb61 docs/gst/Makefile.am: Remove --ignore-fail-on-non-empty (#150331)
Original commit message from CVS:
* docs/gst/Makefile.am: Remove --ignore-fail-on-non-empty (#150331)
* docs/libs/Makefile.am: same
* docs/gst/tmpl/gstxml.sgml: Remove GstXMLNs
* docs/random/ds/0.9-planning: random additions
* docs/random/ds/0.9-suggested-changes: same
* gst/gstxml.h: remove vestigal GstXMLNs definition
Preferred caps: (#147789)
* docs/gst/gstreamer-sections.txt: Add symbols
* docs/gst/tmpl/gstcaps.sgml: Add symbols
* gst/gstcaps.c: (gst_caps_copy), (gst_caps_free),
(gst_caps_append), (gst_caps_copy_1), (gst_caps_intersect),
(gst_caps_union), (gst_caps_save_thyself), (gst_caps_load_thyself),
(gst_caps_get_preferred), (gst_caps_set_preferred),
(gst_caps_get_structure_by_id), (gst_caps_prefer_foreach),
(gst_caps_use_preferred): Handle caps preferences
* gst/gstcaps.h: Add caps preferences
* gst/gstpad.c: (gst_pad_link_get_preferred),
(gst_pad_link_fixate), (gst_pad_link_call_link_functions),
(gst_pad_renegotiate), (gst_pad_guess_preferred),
(gst_pad_get_caps), (gst_pad_push):  Use caps preferences for
negotiation.
2004-08-18 21:46:55 +00:00
Thomas Vander Stichele 38ca60f6fe fix memleaks - #150001
Original commit message from CVS:
fix memleaks - #150001
2004-08-17 09:16:42 +00:00
Benjamin Otte 2bd5f3ad46 gst/gstpad.c: check that caps are fixed
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_set_explicit_caps):
check that caps are fixed
* gst/gstpad.c: (gst_pad_template_new):
don't try to simplify caps, costs too much time on gst_init
* gst/gstplugin.c: (gst_plugin_add_feature):
G_ERROR if features are added twice
* gst/gsttypefind.c: (gst_type_find_register):
* gst/gstelementfactory.c: (gst_element_register):
don't add features twice
* docs/random/ds/0.9-suggested-changes:
add note about possible gst_init optimization
2004-07-29 15:29:37 +00:00
Thomas Vander Stichele 8a374ddd88 improve some debug statements
Original commit message from CVS:
improve some debug statements
2004-07-26 12:05:41 +00:00
Benjamin Otte 1a8f31e577 gst/autoplug/gstspideridentity.c: don't delay links on the sink elements, it causes unnegotiated links.
Original commit message from CVS:
* gst/autoplug/gstspideridentity.c: (gst_spider_identity_link):
don't delay links on the sink elements, it causes unnegotiated
links.
* gst/elements/gsttypefindelement.c:
(gst_type_find_element_base_init):
add our padtemplates, we indeed do have some.
* gst/elements/gsttypefindelement.c:
(gst_type_find_element_handle_event),
(gst_type_find_element_chain):
don't push data when typefinding failed.
* gst/gstpad.c: (gst_pad_link_fixate):
check that no fixate function returns empty caps.
* gst/gstpad.c: (gst_pad_push):
check that the link is negotiated before data gets pushed.
* tools/gst-register.c: (main):
don't assert (fixes #148283)
2004-07-25 15:01:52 +00:00
Benjamin Otte d8c591b902 gst/gstpad.c: check if data is NULL before outputting debug info. (fixes #145100)
Original commit message from CVS:
* gst/gstpad.c:
check if data is NULL before outputting debug info. (fixes #145100)
2004-07-21 21:20:10 +00:00
Thomas Vander Stichele 1c5150d393 debugging additions and style cleanups
Original commit message from CVS:
debugging additions and style cleanups
2004-07-15 16:20:50 +00:00
Andy Wingo d6443170cf gst/gsttag.c: Add a tag merge func for pointers. The header was there all along, but the function wasn't. (guile-gstr...
Original commit message from CVS:
2004-07-14  Andy Wingo  <wingo@pobox.com>

* gst/gsttag.c: Add a tag merge func for pointers. The header was
there all along, but the function wasn't. (guile-gstreamer's build
system uses the address of the function -- I wasn't actually
trying to use this.)

2004-07-13  Andy Wingo  <wingo@pobox.com>

* gst/gstpad.c (gst_pad_try_set_caps): Naive link functions (such
as gst_pad_proxy_pad_link) just link to every other pad when they
are called. In the case where the graph has cycles, this will mean
that a call to try_set_caps will recurse. Allow this recursion
and return OK, while we wait for the first try_set_caps to give a
proper return value.
(gst_pad_link_call_link_functions): Since this function is the
only one to set the NEGOTIATING flag on a pad, if the flag is set
it means that the link functions have indirectly recursed. If this
happens, error out to avoid infinite recursion and an eventual
SEGV.
(gst_real_pad_class_init): Remove a crufty GtkObject comment.
(gst_pad_proxy_getcaps): Intersect the result with the template
caps to ensure that the return value is valid.

2004-07-11  Andy Wingo  <wingo@pobox.com>

* gst/gstdata.c (gst_data_is_writable): s/>=/>/. If there is only
one refcount, the calling function is the owner of the buffer.
2004-07-14 15:28:51 +00:00
Benjamin Otte 2ab9d39848 configure.ac: require valgrind >= 2.1 (fixes Gentoo bug 53967, see http://bugs.gentoo.org/show_bug.cgi?id=53967)
Original commit message from CVS:
* configure.ac:
require valgrind >= 2.1 (fixes Gentoo bug 53967, see
http://bugs.gentoo.org/show_bug.cgi?id=53967)
* gst/gstpad.c: (gst_pad_alloc_buffer):
allow buffer_alloc functions to return NULL and allocate a normal
buffer in that case
2004-07-12 21:20:40 +00:00
Thomas Vander Stichele 6595422e32 don't send events below PAUSED on parent
Original commit message from CVS:
don't send events below PAUSED on parent
2004-07-08 16:38:49 +00:00
Thomas Vander Stichele e7a32237d4 gst/autoplug/gstspideridentity.c: extra debugging
Original commit message from CVS:
* gst/autoplug/gstspideridentity.c: (gst_spider_identity_chain):
extra debugging
* gst/gstevent.h:
* gst/gstinfo.c: (gst_debug_log_default):
print time nicely.  add thread pointer until someone figures out
a completely portable way of getting at thread id's.
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_link_try),
(_invent_event), (gst_pad_pull), (gst_pad_event_default_dispatch),
(gst_pad_call_chain_function):
extra debugging
* gst/schedulers/gstoptimalscheduler.c:
(get_group_schedule_function), (loop_group_schedule_function),
(gst_opt_scheduler_loop_wrapper), (gst_opt_scheduler_get_wrapper),
(pad_clear_queued), (gst_opt_scheduler_iterate):
rename BUFPEN and friends to DATAPEN since that's what they are.
2004-07-08 13:49:14 +00:00
Thomas Vander Stichele 56e7e557ae debugging fixes
Original commit message from CVS:
debugging fixes
2004-07-07 16:50:30 +00:00
Thomas Vander Stichele d4ac2d54be debugging and cleanups
Original commit message from CVS:
debugging and cleanups
2004-07-07 14:15:28 +00:00
Thomas Vander Stichele 074bcabf93 revert until fixed
Original commit message from CVS:
revert until fixed
2004-07-02 14:01:04 +00:00
Benjamin Otte ef97ba69b4 gst/gstpad.c: check that pads that get linked belong to the same manager. The old code allowed linking elements befor...
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_check_schedulers),
(gst_pad_can_link_filtered), (gst_pad_link_filtered),
(gst_pad_link_prepare):
check that pads that get linked belong to the same manager. The old
code allowed linking elements before putting them into bins, so it
worked to link them and then put them in different threads, which
lead to weird behaviour.
Since this effectively disallows linking elements before putting
them in a bin, some applications might not work after this and error
out. If these applications are too critical, we might need to revert
that patch. Please test this before the next release...
2004-07-02 03:24:08 +00:00
Benjamin Otte 968c817c26 gst/gstpad.c: throw an error if the getcaps function does not return a subset of the template caps.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_get_caps):
throw an error if the getcaps function does not return a subset of
the template caps.
* libs/gst/bytestream/filepad.c: (gst_file_pad_chain):
make disconts without position info an error in debugging
* tests/spidey_bench.c: (handoff), (main):
don't count first try when averaging
2004-06-29 00:34:38 +00:00
Benjamin Otte 94821aea61 gst/gstpad.c: check for if we were unlinked while inside the chainfunction (fixes entrygthread having issues with #14...
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_call_chain_function):
check for if we were unlinked while inside the chainfunction (fixes
entrygthread having issues with #143777)
* testsuite/schedulers/143777.c: (main):
* testsuite/schedulers/Makefile.am:
add a test for that fix
2004-06-20 19:42:58 +00:00
Jan Schmidt 7dcd6a0533 configure.ac: Add $GST_PKG_CFLAGS back into GST_INT_CFLAGS so I have large file support until we decide where the fla...
Original commit message from CVS:
* configure.ac:
Add $GST_PKG_CFLAGS back into GST_INT_CFLAGS so I have large file
support until we decide where the flags should be used
* gst/elements/gstfilesrc.c: (gst_filesrc_srcpad_query):
Use GST_FORMAT_BYTES when GST_FORMAT_DEFAULT is passed
* gst/gstpad.c: (gst_pad_link_call_link_functions):
Output refused caps in the debug info
2004-05-13 12:06:11 +00:00
Benjamin Otte ac83b103a1 gst/elements/gstfilesrc.c: compute mapsize correctly
Original commit message from CVS:
* gst/elements/gstfilesrc.c: (gst_filesrc_get_mmap):
compute mapsize correctly
* gst/elements/gstfilesrc.c: (gst_filesrc_get_mmap):
use correct datatypes when calling a varargs function
* gst/elements/gsttypefindelement.c: (stop_typefinding):
push a DISCONT event as first thing
* gst/gst_private.h:
* gst/gstinfo.c: (_gst_debug_init):
remove GST_DATAFLOW debugging category
* gst/gstbin.c: (gst_bin_iterate):
use GST_SCHEDULING category
* gst/gstpad.c: (gst_pad_get_type), (_invent_event),
(gst_pad_push), (gst_pad_pull), (gst_pad_call_chain_function),
(gst_pad_call_get_function):
add GST_DATAFLOW to easily track flow of buffers or events.
* gst/gstqueue.c: (gst_queue_get_type),
(gst_queue_handle_pending_events), (gst_queue_chain),
(gst_queue_get), (gst_queue_handle_src_event):
use own static debugging category GST_DATAFLOW for dataflow,
use DEBUG category for showing which path events go, use LOG
category for buffers.
2004-05-11 16:20:41 +00:00
Benjamin Otte a6c45e0b76 gst/gstpad.c: really reduce the set of caps
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_proxy_fixate):
really reduce the set of caps
2004-05-08 18:27:11 +00:00
Benjamin Otte d83895c446 gst/gstpad.c: mark links as unengaged when unnegotiating instead of deactivating.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_link_unnegotiate):
mark links as unengaged when unnegotiating instead of deactivating.
This way pads aren't marked as unengaged when going PLAYING=>PAUSED
2004-05-08 14:50:12 +00:00
Benjamin Otte f9bafab28f gst/elements/gstfilesrc.*: send NEW_MEDIA events correctly
Original commit message from CVS:
* gst/elements/gstfilesrc.c: (gst_filesrc_get),
(gst_filesrc_change_state), (gst_filesrc_srcpad_event):
* gst/elements/gstfilesrc.h:
send NEW_MEDIA events correctly
* gst/elements/gsttypefindelement.c: (start_typefinding),
(gst_type_find_element_handle_event):
restart typefinding when we get a NEW_MEDIA event
* gst/gstbin.c: (gst_bin_remove_func), (gst_bin_change_state),
(gst_bin_dispose):
don't die when someone removes elements in callbacks
* gst/gstelement.c: (gst_element_change_state):
improve debugging
* gst/gstpad.c: (gst_pad_pull), (gst_pad_call_chain_function):
we need a NEW_MEDIA event to engage a link
* gst/gsttrace.c: (gst_trace_new), (gst_alloc_trace_set_flags_all):
don't g_print debugging stuff
* testsuite/caps/simplify.c: (check_caps):
2004-05-06 21:40:55 +00:00
Thomas Vander Stichele 12bcaf9b04 some debugging
Original commit message from CVS:
some debugging
2004-05-04 14:15:37 +00:00
Benjamin Otte 1c0dbd87b9 docs/gst/tmpl/: update for recent API changes
Original commit message from CVS:
* docs/gst/tmpl/gstcaps.sgml:
* docs/gst/tmpl/gstfilesrc.sgml:
* docs/gst/tmpl/gststructure.sgml:
* docs/gst/tmpl/gstvalue.sgml:
update for recent API changes
* gst/gstcaps.c: (gst_caps_do_simplify):
fix to stop trying with a freed structure
* gst/gstpad.c: (gst_pad_link_fixate):
simplify caps
* gst/gstpad.c: (gst_pad_template_get_caps_by_name):
remove C++ comment
* gst/gstpad.h:
deprecate gst_pad_template_get_caps_by_name, it doesn't work anyway
* gst/gststructure.c: (gst_structure_value_get_generic_type),
(gst_structure_to_string):
keep the correct type when using lists of ranges
* gst/gstvalue.c: (gst_value_list_prepend_value),
(gst_value_list_append_value):
copy the value before adding to the list (d'oh)
* gst/gstvalue.c: (gst_value_subtract_int_range_int),
(gst_value_subtract_int_range_int_range):
handle overflows correctly
* gst/gstvalue.c: (gst_value_subtract_from_list):
fix memleak
* testsuite/caps/caps.h:
add a caps that caused segfaults
2004-04-22 16:39:23 +00:00
Benjamin Otte a79d06fe59 gst/gstcaps.c: unset GValue after use
Original commit message from CVS:
* gst/gstcaps.c: (gst_caps_structure_simplify):
unset GValue after use
* gst/gstcaps.c: (gst_caps_append),
* gst/gstpad.c: (gst_pad_link_fixate), (gst_pad_template_new):
use gst_caps_simplify (reduces registry size by 30%)
* gst/gstpad.c: (gst_pad_template_new):
don't allow NULL caps
2004-04-22 03:34:43 +00:00
Benjamin Otte a3cb86522a gst/gstpad.c: refuse to link if the link is not possible
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_link_negotiate):
refuse to link if the link is not possible
* configure.ac:
* testsuite/Makefile.am:
* testsuite/negotiation/.cvsignore:
* testsuite/negotiation/Makefile.am:
* testsuite/negotiation/pad_link.c: (main):
add test that checks the above behaviour
2004-04-21 19:12:51 +00:00
Benjamin Otte 6d8c433fa8 gst/gstpad.c: add sophisticated error checking code to see if fixation functions did their fixation right
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_link_fixate):
add sophisticated error checking code to see if fixation functions
did their fixation right
2004-04-21 04:08:19 +00:00
Benjamin Otte 614b4d1627 gst/gstcaps.c: check for ANY caps before appending/unioning
Original commit message from CVS:
* gst/gstcaps.c: (gst_caps_append), (gst_caps_union):
check for ANY caps before appending/unioning
* gst/gstcaps.c: (gst_caps_is_subset),
(gst_caps_is_equal), (gst_caps_structure_subtract_field),
(gst_caps_structure_subtract), (gst_caps_subtract):
* gst/gstcaps.h:
add gst_caps_is_equal, gst_caps_is_subset and gst_caps_subtract to
the API. deprecate gst_caps_is_equal_fixed
* gst/gstpad.c: (gst_pad_try_set_caps):
* gst/gstqueue.c: (gst_queue_link):
s/gst_caps_is_equal_fixed/gst_caps_is_equal/
* gst/gststructure.c: (gst_structure_get_name_id):
* gst/gststructure.h:
add function gst_structure_get_name_id
* gst/gstvalue.c: (gst_value_subtract_int_int_range),
(gst_value_create_new_range), (gst_value_subtract_int_range_int),
(gst_value_subtract_int_range_int_range),
(gst_value_subtract_double_double_range),
(gst_value_subtract_double_range_double),
(gst_value_subtract_double_range_double_range),
(gst_value_subtract_from_list), (gst_value_subtract_list),
(gst_value_can_intersect), (gst_value_subtract),
(gst_value_can_subtract), (gst_value_register_subtract_func),
(_gst_value_initialize):
* gst/gstvalue.h:
add support for subtracting values from each other. Note that
subtracting means subtracting as in set theory. Required for caps
stuff above.
* testsuite/caps/.cvsignore:
* testsuite/caps/Makefile.am:
* testsuite/caps/erathostenes.c: (erathostenes), (main):
* testsuite/caps/sets.c: (check_caps), (main):
* testsuite/caps/subtract.c: (check_caps), (main):
add tests for subtraction and equality code.
2004-04-21 03:25:13 +00:00
Johan Dahlin a78d3beebf gst/gstpad.c (_invent_event): Clean up
Original commit message from CVS:
* gst/gstpad.c (_invent_event): Clean up
2004-04-20 09:43:34 +00:00
Johan Dahlin 2821d8ff20 gst/gstpad.c (_invent_event): Fix parameters to warning macros, fixes bug 140477
Original commit message from CVS:
* gst/gstpad.c (_invent_event): Fix parameters to warning macros,
fixes bug 140477
2004-04-19 10:22:32 +00:00