Commit graph

221 commits

Author SHA1 Message Date
Wim Taymans 74c74e189e gst/: Pending ABI changes.
Original commit message from CVS:
* gst/gstbin.h:
* gst/gstelement.c: (gst_element_class_init),
(gst_element_set_state), (gst_element_set_state_func):
* gst/gstelement.h:
Pending ABI changes.
GThreadPool in GstBinClass to monitor async state changes.
state_cookie in GstElement to detect concurrent gst/set state.
set_state is now virtual too in case a very complicated element
has to be constructed.
2005-10-18 14:29:21 +00:00
Stefan Kost e000de4064 add new api entries hide internal macro
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/libs/gstreamer-libs-sections.txt:
* gst/gstelement.h:
add new api entries
hide internal macro
2005-10-17 20:16:55 +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
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 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
Andy Wingo cfd14e0fd3 gst/gstelement.c (gst_element_init, gst_element_finalize): Allocate and free the mutex properly.
Original commit message from CVS:
2005-10-10  Andy Wingo  <wingo@pobox.com>

* gst/gstelement.c (gst_element_init, gst_element_finalize):
Allocate and free the mutex properly.

* gst/gstelement.h (GST_STATE_UNLOCK_FULL, GST_STATE_LOCK_FULL):
New macros.
(GstElement): The state_lock is now recursive. Rebuild your
plugins, suckers. Old macros adapted.
2005-10-10 14:33:13 +00:00
Wim Taymans 06bc343e3f gst/base/gstbasesink.c: Better log message.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_handle_buffer):
Better log message.

* gst/gstbus.h:
* gst/gstelement.h:
More docs.

* gst/gstqueue.c: (gst_queue_class_init), (gst_queue_init),
(gst_queue_set_property), (gst_queue_get_property):
* gst/gstqueue.h:
Remove old unused properties.
2005-10-08 14:57:09 +00:00
Thomas Vander Stichele 6eb5fb3112 doc updates
Original commit message from CVS:
doc updates
2005-10-05 22:35:14 +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
Stefan Kost 6de84a3d83 added two new functions to the docs documents all undocumented GstXXXFlags completed some incomplete docs
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/base/gstbasesrc.h:
* gst/gstelement.h:
* gst/gstevent.h:
* gst/gstobject.h:
* gst/gstpad.h:
* gst/gstpipeline.c:
* gst/gstpipeline.h:
* gst/gstutils.h:
* gst/gstxml.h:
added two new functions to the docs
documents all undocumented GstXXXFlags
completed some incomplete docs
2005-09-27 20:40:35 +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
Thomas Vander Stichele f74399ea55 fix docs
Original commit message from CVS:
fix docs
2005-09-23 16:35:43 +00:00
Stefan Kost 5afb6e6809 inlined 3 more biiiig doc files and added some missing docs on the fly
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstelement.sgml:
* docs/gst/tmpl/gstinfo.sgml:
* docs/gst/tmpl/gstobject.sgml:
* gst/gstelement.c:
* gst/gstelement.h:
* gst/gstinfo.c:
* gst/gstinfo.h:
* gst/gstobject.c: (gst_object_class_init):
* gst/gstobject.h:
inlined 3 more biiiig doc files and added some missing docs on the fly
2005-09-23 14:31:21 +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
Thomas Vander Stichele 9b3e3a2613 various doc fixes
Original commit message from CVS:
various doc fixes
2005-09-11 12:57:36 +00:00
Stefan Kost b5454f7c5c renamed gsttag -> gsttaglist, gsttaginterface -> gsttagsetter inlined docs for gsttrace, gsttrashstack
Original commit message from CVS:
* docs/gst/gstreamer-docs.sgml:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gsttrace.sgml:
* docs/gst/tmpl/gsttrashstack.sgml:
* gst/Makefile.am:
* gst/gst.h:
* gst/gstelement.h:
* gst/gstevent.h:
* gst/gstmessage.c:
* gst/gstmessage.h:
* gst/gsttag.c:
* gst/gsttag.h:
* gst/gsttaginterface.c:
* gst/gsttaginterface.h:
* gst/gsttaglist.c:
* gst/gsttaglist.h:
* gst/gsttagsetter.c:
* gst/gsttagsetter.h:
* gst/gsttrace.c:
* gst/gsttrace.h:
* gst/gsttrashstack.c:
renamed gsttag -> gsttaglist, gsttaginterface -> gsttagsetter
inlined docs for gsttrace, gsttrashstack
2005-09-07 13:22:16 +00:00
Andy Wingo 1b38cd4afa gst/gstelement.h: Add magical pixie dust to make glib-mkenums consider this enum an enum and not a flags.
Original commit message from CVS:
2005-09-02  Andy Wingo  <wingo@pobox.com>

* gst/gstelement.h: Add magical pixie dust to make glib-mkenums
consider this enum an enum and not a flags.
2005-09-02 16:44:57 +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
Jan Schmidt 8aa248c92b docs/pwg/advanced-types.xml: Well done to Michael for catching my deliberate introduction of this spelling mistake.
Original commit message from CVS:
* docs/pwg/advanced-types.xml:
Well done to Michael for catching my deliberate introduction
of this spelling mistake.
* gst/gstbin.c: (gst_bin_remove_func), (bin_bus_handler):
* gst/gstelement.h:
Add GST_ELEMENT_UNPARENTING to prevent races so that we can
unlink pads before removing the element from the bin.
2005-08-24 15:10:41 +00:00
Thomas Vander Stichele feb446c5d4 make GST_ELEMENT_ERROR not do GST_ERROR_OBJECT - these errors should be handled by the application and not always pri...
Original commit message from CVS:
make GST_ELEMENT_ERROR not do GST_ERROR_OBJECT - these errors should
be handled by the application and not always printed as well
2005-08-20 20:30:36 +00:00
Wim Taymans 66d7070ef1 Some docs updates
Original commit message from CVS:
* CHANGES-0.9:
* docs/design/part-TODO.txt:
* docs/design/part-events.txt:
Some docs updates

* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_do_sync),
(gst_base_sink_activate_push), (gst_base_sink_activate_pull):
* gst/base/gstbasesrc.c: (gst_base_src_send_discont),
(gst_base_src_do_seek), (gst_base_src_event_handler),
(gst_base_src_loop):
* gst/base/gstbasetransform.c: (gst_base_transform_transform_caps),
(gst_base_transform_configure_caps), (gst_base_transform_setcaps),
(gst_base_transform_get_size), (gst_base_transform_buffer_alloc),
(gst_base_transform_event), (gst_base_transform_handle_buffer),
(gst_base_transform_set_passthrough),
(gst_base_transform_is_passthrough):
* gst/elements/gstfakesink.c: (gst_fake_sink_event):
* gst/elements/gstfilesink.c: (gst_file_sink_event):
Event updates.

* gst/gstbuffer.h:
Use faster casts.

* gst/gstelement.c: (gst_element_seek):
* gst/gstelement.h:
Update gst_element_seek.

* gst/gstevent.c: (gst_event_finalize), (_gst_event_copy),
(gst_event_new), (gst_event_new_custom), (gst_event_get_structure),
(gst_event_new_flush_start), (gst_event_new_flush_stop),
(gst_event_new_eos), (gst_event_new_newsegment),
(gst_event_parse_newsegment), (gst_event_new_tag),
(gst_event_parse_tag), (gst_event_new_filler), (gst_event_new_qos),
(gst_event_parse_qos), (gst_event_new_seek),
(gst_event_parse_seek), (gst_event_new_navigation):
* gst/gstevent.h:
Make GstEvent use GstStructure. Add parsing code, make sure the
API is sufficiently generic.
Mark possible directions of events and serialization.

* gst/gstmessage.c: (gst_message_init), (gst_message_finalize),
(_gst_message_copy), (gst_message_new_segment_start),
(gst_message_new_segment_done), (gst_message_new_custom),
(gst_message_parse_segment_start),
(gst_message_parse_segment_done):
Small cleanups.

* gst/gstpad.c: (gst_pad_get_caps_unlocked), (gst_pad_accept_caps),
(gst_pad_set_caps), (gst_pad_send_event):
Update for new events.
Catch events sent in wrong directions.

* gst/gstqueue.c: (gst_queue_link_src),
(gst_queue_handle_sink_event), (gst_queue_chain), (gst_queue_loop),
(gst_queue_handle_src_query):
Event updates.

* gst/gsttag.c:
* gst/gsttag.h:
Remove event code from this file.

* libs/gst/dataprotocol/dataprotocol.c: (gst_dp_packet_from_event),
(gst_dp_event_from_packet):
Event updates.
2005-07-27 18:33:03 +00:00
Ronald S. Bultje 3f62c7db23 GstElement::new-pad -> pad-added, GstElement::state-change -> state-changed, GstValueFixedList -> GstValueArray, add ...
Original commit message from CVS:
* docs/manual/advanced-autoplugging.xml:
* docs/manual/basics-helloworld.xml:
* docs/manual/basics-pads.xml:
* docs/random/ds/0.9-suggested-changes:
* gst/gstelement.c: (gst_element_class_init), (gst_element_seek):
* gst/gstelement.h:
* gst/gstevent.h:
* gst/gstformat.h:
* gst/gstquery.h:
* gst/gststructure.c: (gst_structure_value_get_generic_type),
(gst_structure_parse_array), (gst_structure_parse_value):
* gst/gstvalue.c: (gst_type_is_fixed),
(gst_value_list_prepend_value), (gst_value_list_append_value),
(gst_value_list_get_size), (gst_value_list_get_value),
(gst_value_transform_array_string), (gst_value_serialize_array),
(gst_value_deserialize_array), (gst_value_intersect_array),
(gst_value_is_fixed), (_gst_value_initialize):
* gst/gstvalue.h:
GstElement::new-pad -> pad-added, GstElement::state-change ->
state-changed, GstValueFixedList -> GstValueArray, add format and
flags as their own arguments in gst_element_seek() (should improve
"bindeability"), remove function generators since they don't work
under a whole bunch of compilers (they were deprecated already
anyway).
2005-07-20 17:16:44 +00:00
Wim Taymans e1aeec6d77 Removed plugable schedulers.
Original commit message from CVS:
Removed plugable schedulers.
Removed Scheduler/Manager from elements.
Removed gsttypes.h, rearranged includes.
Removed dependency pad<->element, element<>pipeline, and
various others,  fix includes.
implement gst_pad_get_parent() with gst_object_get_parent()
Make GstTask sefcontained.
Fix _get_state() on GstBin, it did not return ASYNC with a 0
timeout.
Fix endless loop in iterator_fold_with_resync.
2005-07-18 12:49:53 +00:00
Wim Taymans d5be929bf8 gst/base/gstbasesink.*: Store and use discont values when syncing buffers as described in design docs.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_get_times),
(gst_base_sink_do_sync), (gst_base_sink_change_state):
* gst/base/gstbasesink.h:
Store and use discont values when syncing buffers as described
in design docs.

* gst/base/gstbasesrc.c: (gst_base_src_send_discont),
(gst_base_src_do_seek), (gst_base_src_loop), (gst_base_src_start),
(gst_base_src_activate_push):
Push discont event when starting.

* gst/elements/gstidentity.c: (gst_identity_transform):
Small cleanups.

* gst/gstbin.c: (gst_bin_change_state):
Small cleanups in base_time  distribution.

* gst/gstelement.c: (gst_element_set_base_time),
(gst_element_get_base_time), (gst_element_change_state):
* gst/gstelement.h:
Added methods for the base_time of the element.
Some MT fixes.

* gst/gstpipeline.c: (gst_pipeline_send_event),
(gst_pipeline_change_state), (gst_pipeline_set_new_stream_time),
(gst_pipeline_get_last_stream_time):
* gst/gstpipeline.h:
MT fixes.
Handle seeking as described in design doc, remove stream_time
hack.
Cleanups clock and stream_time selection code. Added accessors
for the stream_time.
2005-07-16 14:41:25 +00:00
Thomas Vander Stichele bd728f0b2c doc fixes
Original commit message from CVS:
doc fixes
2005-06-29 12:23:35 +00:00
Andy Wingo f2cf753b17 gst/base/gsttypefindhelper.c (gst_type_find_helper): Unref any remaining buffer.
Original commit message from CVS:
2005-06-27  Andy Wingo  <wingo@pobox.com>

* gst/base/gsttypefindhelper.c (gst_type_find_helper): Unref any
remaining buffer.

* gst/gsttrace.c (gst_alloc_trace_list_sorted): New helper,
returns a sorted copy of the trace list.
(gst_alloc_trace_print_live): New API, only prints traces with
live objects. Sort the list.
(gst_alloc_trace_print_all): Sort the list.
(gst_alloc_trace_print): Align columns.

* gst/elements/gstttypefindelement.c:
* gst/elements/gsttee.c:
* gst/base/gstbasesrc.c:
* gst/base/gstbasesink.c:
* gst/base/gstbasetransform.c:
* gst/gstqueue.c: Adapt for pad activation changes.

* gst/gstpipeline.c (gst_pipeline_init): Unref after parenting
sched.
(gst_pipeline_dispose): Drop ref on sched.

* gst/gstpad.c (gst_pad_init): Set the default activate func.
(gst_pad_activate_default): Push mode by default.
(pre_activate_switch, post_activate_switch): New stubs, things to
do before and after switching activation modes on pads.
(gst_pad_set_active): Take a boolean and not a mode, dispatch to
the pad's activate function to choose which mode to activate.
Shortcut on deactivation and call the right function directly.
(gst_pad_activate_pull): New API, (de)activates a pad in pull
mode.
(gst_pad_activate_push): New API, same for push mode.
(gst_pad_set_activate_function)
(gst_pad_set_activatepull_function)
(gst_pad_set_activatepush_function): Setters for new API.

* gst/gstminiobject.c (gst_mini_object_new, gst_mini_object_free):
Trace all miniobjects.
(gst_mini_object_make_writable): Unref the arg if we copy, like
gst_caps_make_writable.

* gst/gstmessage.c (_gst_message_initialize): No trace init.

* gst/gstghostpad.c (gst_proxy_pad_do_activate)
(gst_proxy_pad_do_activatepull, gst_proxy_pad_do_activatepush):
Adapt for new pad API.

* gst/gstevent.c (_gst_event_initialize): Don't initialize trace.

* gst/gstelement.h:
* gst/gstelement.c (gst_element_iterate_src_pads)
(gst_element_iterate_sink_pads): New API functions.

* gst/gstelement.c (iterator_fold_with_resync): New utility,
should fold into gstiterator.c in some form.
(gst_element_pads_activate): Simplified via use of fold and
delegation of decisions to gstpad->activate.

* gst/gstbus.c (gst_bus_source_finalize): Set the bus to NULL,
help in debugging.

* gst/gstbuffer.c (_gst_buffer_initialize): Ref the buffer type
class once in init, like gstmessage. Didn't run into this issue
but it seems correct. Don't initialize a trace, gstminiobject does
that.

* check/pipelines/simple_launch_lines.c (test_stop_from_app): New
test, runs fakesrc ! fakesink, stopping on ::handoff via a message
to the bus.
(assert_live_count): New util function, uses alloc traces to check
cleanup.

* check/gst/gstghostpad.c (test_ghost_pads): More refcount checks.
To be modified when unlink drops the internal pad.
2005-06-27 18:35:05 +00:00
Thomas Vander Stichele 012d4ec9de more doc and whitespace fixes
Original commit message from CVS:
more doc and whitespace fixes
2005-06-27 08:16:51 +00:00
Wim Taymans 2169b1a5d8 gst/: Keep track of current target state while performing a state change so that subclasses can do something interest...
Original commit message from CVS:
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_set_state):
* gst/gstelement.h:
* gst/gstmessage.c: (gst_message_parse_error),
(gst_message_parse_warning):
Keep track of current target state while performing a state
change so that subclasses can do something interesting.
Fix parsing of warning/error messages when GError is NULL.
2005-06-25 17:42:17 +00:00
Wim Taymans 1cda8197e9 Added support for live sources and other elements that cannot do preroll.
Original commit message from CVS:
Added support for live sources and other elements that
cannot do preroll.
Updated design docs, added live-source design doc.
Implemented live source functionality in basesrc
Fix error condition in _bin_get_state()
Implement live source handling in -launch.
Added check for live sources.
Fixed case in GstBin where elements were changed state
multiple times.
2005-06-23 10:37:09 +00:00
Andy Wingo 4b908e33e0 gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08  Andy Wingo  <wingo@pobox.com>

* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.

* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.

* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.

* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.

* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.

* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.

* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.

* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.

* gst/gst.h: Include gstghostpad.h.

* gst/gst.c (init_post): No more real, ghost pads.

* gst/Makefile.am: Add gstghostpad.[ch].

* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
Wim Taymans e1b5b74857 gst/: Move elementfactory methods to separate .h file.
Original commit message from CVS:
* gst/Makefile.am:
* gst/gstelement.h:
* gst/gstelementfactory.h:
* gst/gsttypes.h:
Move elementfactory methods to separate .h file.
2005-05-30 15:51:40 +00:00
Wim Taymans 1c4ea6213b gst/: Identify sinks by their flag to avoid overly complicated checks (fow now).
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_basesink_init),
(gst_basesink_activate):
* gst/base/gstbasesrc.c: (gst_basesrc_unlock),
(gst_basesrc_is_seekable):
* gst/gstbin.c: (gst_bin_add_func), (gst_bin_remove_func),
(bin_element_is_sink), (gst_bin_change_state):
* gst/gstelement.c: (gst_element_add_pad), (gst_element_query):
* gst/gstelement.h:
Identify sinks by their flag to avoid overly complicated
checks (fow now).
Do state changes even for elements not reachable from the
sinks.
BaseSink is a sink now :)
Some more debugging info in the basesrc.
2005-05-12 19:45:44 +00:00
Wim Taymans 8df6cd7243 Remove old query functions. Ported old code.
Original commit message from CVS:
Remove old query functions. Ported old code.
Added position/convert helper functions to gstutils.
Reordered gstpad.c code, grouping relevant things.
Remove gst_message_new(), always need to speficy a specific
message.
2005-05-09 10:53:13 +00:00
Ronald S. Bultje 560d0ba1de Use libxml2 for registry parsing, use staticpadtemplates in elementfactories. Makes gst_init() +/- 10x faster.
Original commit message from CVS:
* docs/gst/tmpl/gstelementfactory.sgml:
* gst/gstelement.h:
* gst/gstelementfactory.c: (gst_element_factory_init),
(gst_element_factory_cleanup), (gst_element_register),
(__gst_element_factory_add_static_pad_template),
(gst_element_factory_get_static_pad_templates),
(gst_element_factory_can_src_caps),
(gst_element_factory_can_sink_caps):
* gst/registries/Makefile.am:
* gst/registries/gstlibxmlregistry.c: (gst_xml_registry_get_type),
(gst_xml_registry_class_init), (gst_xml_registry_init),
(gst_xml_registry_new), (gst_xml_registry_set_property),
(gst_xml_registry_get_property), (get_time), (make_dir),
(gst_xml_registry_get_perms_func),
(plugin_times_older_than_recurse), (plugin_times_older_than),
(gst_xml_registry_open_func), (gst_xml_registry_load_func),
(gst_xml_registry_save_func), (gst_xml_registry_close_func),
(add_to_char_array), (read_string), (read_uint), (read_enum),
(load_pad_template), (load_feature), (load_plugin), (load_paths),
(gst_xml_registry_load), (gst_xml_registry_load_plugin),
(gst_xml_registry_save_caps), (gst_xml_registry_save_pad_template),
(gst_xml_registry_save_feature), (gst_xml_registry_save_plugin),
(gst_xml_registry_save), (gst_xml_registry_rebuild_recurse),
(gst_xml_registry_rebuild):
* gst/registries/gstlibxmlregistry.h:
* tools/gst-compprep.c: (main):
* tools/gst-inspect.c: (print_pad_templates_info):
* tools/gst-xmlinspect.c: (print_element_info):
Use libxml2 for registry parsing, use staticpadtemplates in
elementfactories. Makes gst_init() +/- 10x faster.
2005-04-12 15:00:30 +00:00
Wim Taymans c2f41a8906 Next big merge.
Original commit message from CVS:
Next big merge.
Added GstBus for mainloop integration.
Added GstMessage for sending notifications on the bus.
Added GstTask as an abstraction for pipeline entry points.
Removed GstThread.
Removed Schedulers.
Simplified GstQueue for multithreaded core.
Made _link threadsafe, removed old capsnego.
Added STREAM_LOCK and PREROLL_LOCK in GstPad.
Added pad blocking functions.
Reworked scheduling functions in GstPad to prepare for
scheduling updates soon.
Moved events out of data stream.
Simplified GstEvent types.
Added return values to push/pull.
Removed clocking from GstElement.
Added prototypes for state change function for next merge.
Removed iterate from bins and state change management.
Fixed some elements, disabled others for now.
Fixed -inspect and -launch.
Added check for GstBus.
2005-03-21 17:34:02 +00:00
Wim Taymans 6cacf76cd9 Added GstBin test.
Original commit message from CVS:
Added GstBin test.
Added GstSystemClock test.
Implemented clock distribution code in GstBin.
Implemented iterate sinks method for future use.
Rearranged gstelement.h
Fix GstIterator comparison bug.
Moved some code to GstPipeline, mostly clocking related.
2005-03-09 16:10:59 +00:00
Wim Taymans c6a7adc9d4 Bump version number, we're now 0.9.0
Original commit message from CVS:
* configure.ac:
* gst/gst_private.h:
* gst/gstbin.c: (gst_bin_add_func), (gst_bin_add),
(gst_bin_remove_func), (gst_bin_remove),
(gst_bin_get_by_name_recurse_up):
* 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/gstelement.h:
* gst/gstinfo.c: (_gst_debug_init):
* gst/gstobject.h:
* gst/gstpad.c: (_gst_pad_default_fixate_foreach),
(gst_pad_collectv), (gst_pad_collect_valist), (gst_pad_query):
* gst/gstpad.h:
Bump version number, we're now 0.9.0
Add future debugging category.
Fix NULL _unref() in _get_by_name_recurse_up
Rearrange gstpad.h.
Update some docs.
2005-03-09 11:08:18 +00:00
Wim Taymans 9e24b85a9d Remove threadsafe properties. Fix elements because GObject complains when installing a property before declaring a se...
Original commit message from CVS:
Remove threadsafe properties. Fix elements because GObject
complains when installing a property before declaring a
set/get_property handler.
Rearrange gstelement.h file, use STATE macros for state locks.
Free mutexes in the finalize method instead of dispose.
2005-03-08 17:42:29 +00:00
Wim Taymans b338085a29 Docs updates, clean up some headers.
Original commit message from CVS:
* docs/design/part-MT-refcounting.txt:
* docs/design/part-conventions.txt:
* docs/design/part-gstobject.txt:
* docs/design/part-relations.txt:
* docs/design/part-standards.txt:
* gst/gstbin.c: (gst_bin_add_func), (gst_bin_add),
(gst_bin_remove_func), (gst_bin_remove), (gst_bin_iterate_recurse),
(gst_bin_get_by_name), (gst_bin_get_by_interface),
(gst_bin_iterate_all_by_interface):
* gst/gstbuffer.h:
* gst/gstclock.h:
* gst/gstelement.c: (gst_element_class_init),
(gst_element_change_state), (gst_element_set_loop_function):
* gst/gstelement.h:
* gst/gstiterator.c:
* 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/gstobject.h:
Docs updates, clean up some headers.
Free iterators in GstBin.
GstObject is now looking good.
2005-03-08 14:38:06 +00:00
Wim Taymans c47dc4d853 First THREADED backport attempt, focusing on adding locks and making sure the API is threadsafe. Needs more work. Mor...
Original commit message from CVS:
First THREADED backport attempt, focusing on adding locks and
making sure the API is threadsafe. Needs more work. More docs
follow this week.
2005-03-07 18:27:42 +00:00
Stefan Kost c44852739c install style.css along with docs fixing incomplete docs
Original commit message from CVS:
install style.css along with docs
fixing incomplete docs
2005-01-24 17:04:08 +00:00
Benjamin Otte ae23ffba6f gst/gstelement.h: Don't GST_ERROR_OBJECT smpty strings - Solaris doesn't like NULL strings.
Original commit message from CVS:
* gst/gstelement.h:
Don't GST_ERROR_OBJECT smpty strings - Solaris doesn't like NULL
strings.
* gst/gstelement.c (gst_element_class_init):
GError's are boxed, not objects
* gst/gstmarshal.list:
update list for the fixed error signal
2004-07-15 02:26:48 +00:00
Benjamin Otte 86a748f0e6 gst/gstelement.h: remove define that referenced a nonexisting GstElement struct member
Original commit message from CVS:
* gst/gstelement.h:
remove define that referenced a nonexisting GstElement struct member
2004-06-22 03:08:56 +00:00
Steve Lhomme 395faf9c06 rename GSTREAMER_EXPORT to GST_EXPORT
Original commit message from CVS:
rename GSTREAMER_EXPORT to GST_EXPORT
2004-06-13 10:04:12 +00:00
Steve Lhomme f50188b8a0 Fix a bug to enable/disable DEBUG under MSVC
Original commit message from CVS:
Fix a bug to enable/disable DEBUG under MSVC
2004-06-12 10:51:35 +00:00
Benjamin Otte aafaa5b7e2 gst/gstelement.*: add gst_element_no_more_pads and the "no-more-pads" signal
Original commit message from CVS:
* gst/gstelement.c: (gst_element_class_init),
(gst_element_no_more_pads):
* gst/gstelement.h:
add gst_element_no_more_pads and the "no-more-pads" signal
2004-05-10 16:48:44 +00:00
David Schleef 8ce063f780 docs/gst/Makefile.am: Disable a bunch of headers from being scanned
Original commit message from CVS:
* docs/gst/Makefile.am:  Disable a bunch of headers from being scanned
* docs/gst/gstreamer-docs.sgml:  More hacking
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/cothreads_compat.sgml:
* docs/gst/tmpl/gstcaps.sgml:
* docs/gst/tmpl/gstclock.sgml:
* docs/gst/tmpl/gstelement.sgml:
* docs/gst/tmpl/gstevent.sgml:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstutils.sgml:
* docs/gst/tmpl/gstxml.sgml:
* docs/gst/tmpl/gthread-cothreads.sgml:
* docs/random/ds/0.9-suggested-changes:
* gst/elements/gstfakesink.h: doc fixes
* gst/elements/gstfakesrc.h: doc fixes
* gst/gstcaps.c: doc fixes
* gst/gstcaps.h: doc fixes
* gst/gstelement.c: doc fixes
* gst/gstelement.h: doc fixes
* gst/gstindex.c: doc fixes
* gst/gstinfo.c: doc fixes
* gst/gstpad.c: doc fixes
* gst/gstpad.h: doc fixes
* gst/gstplugin.c: doc fixes
* gst/gsttypefind.h: doc fixes
* gst/gsturi.c: doc fixes
* gst/gstvalue.c: doc fixes
2004-03-30 07:36:19 +00:00