Commit graph

365 commits

Author SHA1 Message Date
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
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 43c8433a07 gst/base/gstbasesink.c: Prepare for more accurate position reporting and query handling.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_class_init),
(gst_base_sink_send_event), (gst_base_sink_peer_query),
(gst_base_sink_query):
Prepare for more accurate position reporting and query
handling.

* gst/gstelement.c: (gst_element_send_event),
(gst_element_set_state):
Add some comment.
2005-09-22 18:07:22 +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
Thomas Vander Stichele 361d0f2922 docs/: add a quote
Original commit message from CVS:

* docs/gst/tmpl/gstelement.sgml:
* docs/manual/appendix-quotes.xml:
add a quote
* gst/gstelement.c: (gst_element_set_state):
add some debug
2005-09-12 16:10:18 +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 e4b8f77538 Add metadata reading example that loops over a list of filenames, dumping any tags found.
Original commit message from CVS:
* configure.ac:
* examples/Makefile.am:
* examples/metadata/Makefile.am:
* examples/metadata/read-metadata.c: (message_loop),
(have_pad_handler), (make_pipeline), (print_tag), (main):
Add metadata reading example that loops over a list of filenames,
dumping any tags found.

* gst/gstbus.c: (gst_bus_dispose):
* gst/gstelement.c: (gst_element_dispose):
Release a few potentially-held references in dispose.
2005-08-26 13:28:01 +00:00
Stefan Kost a28d63431a gst/gstbin.h: removed ';' from the end of macro defs
Original commit message from CVS:
* gst/gstbin.h:
removed ';' from the end of macro defs
* docs/gst/gstreamer-docs.sgml:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* gst/gstbus.h:
* gst/gstelement.c: (gst_element_class_init),
(gst_element_set_state), (activate_pads),
(gst_element_save_thyself):
* gst/gstevent.c: (gst_event_new_newsegment):
* gst/gstevent.h:
* gst/gstiterator.c:
* gst/gstiterator.h:
* gst/gstpad.c:
* gst/gstprobe.h:
* gst/gstutils.c: (gst_pad_query_convert):
* gst/gstutils.h:
fixed parameter name mismatches between source, header and docs
added some more docs, resolved the last batch of unused elements in
docs (now someone needs to doc them)
2005-08-25 23:17:18 +00:00
Stefan Kost a7d4464ac1 Fixed long standing mem-leak
Original commit message from CVS:
* gst/gstelement.c: (gst_element_class_init),
(gst_element_set_state), (activate_pads),
(gst_element_save_thyself):
* tools/gst-compprep.c: (main):
* tools/gst-inspect.c: (print_element_properties_info):
* tools/gst-xmlinspect.c: (print_element_properties):
Fixed long standing mem-leak
2005-08-24 13:04:31 +00:00
Stefan Kost eef38df668 added about 100 symbols from gstreamer-unused.txt to the right sections fixed more broken comments added GstBus to docs
Original commit message from CVS:
* docs/gst/gstreamer-docs.sgml:
* docs/gst/gstreamer-sections.txt:
* docs/gst/gstreamer.types:
* docs/gst/tmpl/.cvsignore:
* gst/gstbin.h:
* gst/gstbus.c:
* gst/gstelement.c:
* gst/gstevent.h:
added about 100 symbols from gstreamer-unused.txt to the right sections
fixed more broken comments
added GstBus to docs
2005-08-23 14:25:55 +00:00
Wim Taymans d31c5ea1f6 gst/gstcaps.c: Make _static_caps_get() refcounting sane.
Original commit message from CVS:
* gst/gstcaps.c: (gst_static_caps_get), (gst_caps_to_string):
Make _static_caps_get() refcounting sane.

* gst/gstelement.c: (gst_element_set_state):
Add g_return_val_if_fail() to protect against segfaults.
2005-08-22 14:35:42 +00:00
Andy Wingo aa0fb69d49 Make sure that when a pipeline goes to PLAYING, that data has actually hit the sink.
Original commit message from CVS:
2005-08-18  Andy Wingo  <wingo@pobox.com>

Make sure that when a pipeline goes to PLAYING, that data has
actually hit the sink.

* check/states/sinks.c (test_sink): A sink that doesn't get any
data shouldn't return SUCCESS for going to either PLAYING or
PAUSED. Test also the return values on the way back down.

* gst/gstelement.c (gst_element_set_state): When changing the
state of an element currently changing state asynchronously, go to
lost-state after commiting the pending state. Makes future calls
to get_state continue to return ASYNC.

* gst/base/gstbasesink.c (gst_base_sink_change_state): Return
ASYNC when going to PLAYING if we still don't have preroll, as can
happen with live sources.
2005-08-18 16:20:24 +00:00
Wim Taymans 01ace6b592 check/gst/gstvalue.c: Added subtract checks.
Original commit message from CVS:
* check/gst/gstvalue.c: (GST_START_TEST), (gst_value_suite):
Added subtract checks.

* docs/design/part-events.txt:
Some more docs about newsegment

* gst/gstbin.c: (gst_bin_change_state), (bin_bus_handler):
Fix FIXME

* gst/gstcaps.c: (gst_caps_to_string):
Add comments, cleanups.

* gst/gstelement.c: (gst_element_save_thyself):
cleanups

* gst/gstvalue.c: (gst_value_collect_int_range),
(gst_string_unwrap), (gst_value_union_int_int_range),
(gst_value_union_int_range_int_range),
(gst_value_intersect_int_int_range),
(gst_value_intersect_int_range_int_range),
(gst_value_intersect_double_double_range),
(gst_value_intersect_double_range_double_range),
(gst_value_intersect_list), (gst_value_subtract_int_int_range),
(gst_value_subtract_int_range_int),
(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_compare), (gst_value_compare_fraction):
Cleanups, add comments, remove unneeded asserts.
2005-08-16 09:42:50 +00:00
Stefan Kost cdc8ba9725 docs/gst/gstreamer-sections.txt: made some defines private
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
made some defines private
* docs/gst/tmpl/gstconfig.sgml:
* docs/gst/tmpl/gstqueue.sgml:
* docs/gst/tmpl/gsttaglist.sgml:
* docs/gst/tmpl/gsttypes.sgml:
* docs/gst/tmpl/gstutils.sgml:
* docs/pwg/appendix-porting.xml:
* gst/base/gstbasesink.h:
* gst/base/gstbasesrc.c:
* gst/base/gstbasesrc.h:
* gst/elements/gstfakesink.c: (gst_fake_sink_class_init):
* gst/elements/gstfakesrc.c: (gst_fake_src_class_init):
* gst/gstelement.c: (gst_element_class_init):
* gst/gstpad.c: (gst_pad_class_init):
* gst/gstqueue.c: (gst_queue_class_init):
* gst/gstxml.c: (gst_xml_class_init):
documented all undocumented signal inline
* libs/gst/controller/gst-controller.h:
added padding
2005-08-15 16:57:34 +00:00
Ronald S. Bultje c27821d70c gst/gstelement.c: On paused->ready, set pad->caps to NULL, as is the documented behaviour in this state change. Fixes...
Original commit message from CVS:
* gst/gstelement.c: (activate_pads):
On paused->ready, set pad->caps to NULL, as is the documented
behaviour in this state change. Fixes playback of series of
media files when visualization is enabled in Totem.
2005-08-08 12:14:20 +00:00
Wim Taymans 7c7a4b68a1 check/gst/gstghostpad.c: Added some more tests for wrong hierarchy
Original commit message from CVS:
* check/gst/gstghostpad.c: (GST_START_TEST), (gst_ghost_pad_suite):
Added some more tests for wrong hierarchy

* docs/design/part-overview.txt:
Some updates.

* gst/gstbin.c: (gst_bin_remove_func), (gst_bin_dispose):
Cleanups.

* gst/gstelement.c: (gst_element_remove_pad), (gst_element_seek),
(gst_element_dispose):
Some more cleanups.

* gst/gstpad.c: (gst_pad_link_check_compatible_unlocked),
(gst_pad_link_check_hierarchy), (gst_pad_link_prepare),
(gst_pad_get_caps_unlocked), (gst_pad_accept_caps),
(gst_pad_set_caps), (gst_pad_send_event):
Check for correct hierarchy when linking pads. Moving to
strict requirement for ghostpads when linking elements in
different bins.

* gst/gstpad.h:
Clean ups. Added WRONG_HIERARCHY return value.
2005-07-28 11:24:33 +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 232b0ba690 fix refcounting of warning and error messages
Original commit message from CVS:
fix refcounting of warning and error messages
2005-07-12 16:28:36 +00:00
Thomas Vander Stichele 3127459e22 gst/gstelement.c: add debug
Original commit message from CVS:

* gst/gstelement.c: (gst_element_get_bus):
add debug
* tools/gst-launch.c: (check_intr), (event_loop):
fix bus leaks
2005-07-10 00:07:51 +00:00
Thomas Vander Stichele fe31300609 check/gst/gstbin.c: add more things to check
Original commit message from CVS:

* check/gst/gstbin.c: (pop_messages), (GST_START_TEST),
(gst_bin_suite):
add more things to check
* gst/gstbin.c: (gst_bin_change_state), (bin_bus_handler):
* gst/gstelement.c:
more debug
2005-07-09 22:54:28 +00:00
Thomas Vander Stichele 48464956ca check/gst/gstbin.c: add test for state change message on a bin
Original commit message from CVS:

* check/gst/gstbin.c: (START_TEST), (gst_bin_suite):
add test for state change message on a bin
* check/gst/gstelement.c: (START_TEST), (gst_element_suite):
add another test
* gst/gstbin.c: (gst_bin_init):
* gst/gstbus.c: (gst_bus_init), (gst_bus_post):
* gst/gstelement.c: (gst_element_post_message),
(gst_element_set_state):
* gst/gstelementfactory.c: (gst_element_factory_create):
* gst/gstmessage.c: (gst_message_new):
* gst/gstscheduler.c:
various debugging additions and cleanups
2005-07-09 15:18:53 +00:00
Thomas Vander Stichele 240c8e10cf adding tests for elements
Original commit message from CVS:
adding tests for elements
2005-07-08 16:41:45 +00:00
Thomas Vander Stichele bd728f0b2c doc fixes
Original commit message from CVS:
doc fixes
2005-06-29 12:23:35 +00:00
Wim Taymans bd72354e9a gst/gstbus.c: Add debugging messages.
Original commit message from CVS:
* gst/gstbus.c: (gst_bus_post), (gst_bus_have_pending),
(gst_bus_set_flushing), (gst_bus_pop), (gst_bus_peek),
(gst_bus_source_dispatch):
Add debugging messages.
Make internal methods static.
Handle the case where the bus is flushed in the handler.

* gst/gstelement.c: (gst_element_get_bus):
Fix refcount in _get_bus();

* gst/gstpipeline.c: (gst_pipeline_change_state),
(gst_pipeline_get_clock_func):
Clock refcounting fixes.
Handle the case where preroll timed out more gracefully.

* gst/gstsystemclock.c: (gst_system_clock_dispose):
Clean up the internal thread in dispose. This is needed
for subclasses that actually get disposed.

* gst/schedulers/threadscheduler.c:
(gst_thread_scheduler_class_init), (gst_thread_scheduler_func),
(gst_thread_scheduler_dispose):
Free thread pool in dispose.
2005-06-28 19:45:26 +00:00
Andy Wingo f8e79bdf86 *.c: Don't cast to GST_OBJECT when reffing or unreffing. Large source-munging commit!!!
Original commit message from CVS:
2005-06-28  Andy Wingo  <wingo@pobox.com>

* *.c: Don't cast to GST_OBJECT when reffing or unreffing. Large
source-munging commit!!!
2005-06-28 09:59:01 +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 0b44c713a7 adding basetransform and iterator docs
Original commit message from CVS:
adding basetransform and iterator docs
2005-06-27 14:40:09 +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 52a445a41d gst/gstelement.c: When the state did not change, also report NO_PREROLL when it matters.
Original commit message from CVS:
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_set_state), (gst_element_change_state):
When the state did not change, also report NO_PREROLL
when it matters.
2005-06-23 17:11:49 +00:00
Jan Schmidt 8bd306b791 gst/elements/gsttypefindelement.c: Don't restart typefinding on a discont.
Original commit message from CVS:
2005-06-23  Jan Schmidt  <thaytan@mad.scientist.com>

* gst/elements/gsttypefindelement.c:
(gst_type_find_element_handle_event):
Don't restart typefinding on a discont.
* gst/gstelement.c: (gst_element_set_state):
Debug spelling fix.
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_send_event):
Allow changing mode of an active pad.
Debug output fixes.
* gst/registries/gstlibxmlregistry.c: (load_feature):
Don't cast a static pad template to a normal pad template.
2005-06-23 11:43:39 +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 8d0a4e1d4f gst/gstelement.c: Slicker pad activation code.
Original commit message from CVS:
* gst/gstelement.c: (gst_element_init),
(gst_element_pads_activate), (gst_element_change_state):
Slicker pad activation code.
2005-05-30 15:53:04 +00:00
Andy Wingo 1457b69cb7 gst/gstminiobject.c (gst_value_mini_object_collect): Use gst_value_set_mini_object so as to add a ref on the object (...
Original commit message from CVS:
2005-05-26  Andy Wingo  <wingo@pobox.com>

* gst/gstminiobject.c (gst_value_mini_object_collect): Use
gst_value_set_mini_object so as to add a ref on the object (which
will be removed when the value is unset).

* gst/elements/gstfakesink.c (gst_fakesink_class_init): Fix signal
arg type in ::handoff.

* gst/gstelement.c (gst_element_change_state): Also deactivate
pads in READY->NULL, just in case the element didn't make it to
PAUSED. Wingo tested, Wim approved.
2005-05-27 09:27:35 +00:00
Wim Taymans fbe9b20d09 gst/: Make subbufer unref the parent in finalize. some more debugging info.
Original commit message from CVS:
* gst/gstbuffer.c: (gst_buffer_init), (gst_subbuffer_get_type),
(gst_subbuffer_class_init), (gst_subbuffer_finalize),
(gst_subbuffer_init), (gst_buffer_is_span_fast):
* gst/gstbuffer.h:
* gst/gstbus.c: (gst_bus_post):
* gst/gstelement.c: (gst_element_get_random_pad):
* gst/gstmessage.c: (gst_message_init), (gst_message_finalize):
Make subbufer unref the parent in finalize.
some more debugging info.
2005-05-19 16:26:50 +00:00
David Schleef e134f7f75b check/Makefile.am: remove GstData checks
Original commit message from CVS:
* check/Makefile.am: remove GstData checks
* check/gst-libs/gdp.c: (START_TEST): fix for API changes
* gst/Makefile.am: add miniobject, remove data
* gst/gst.h: add miniobject, remove data
* gst/gstdata.c: remove
* gst/gstdata.h: remove
* gst/gstdata_private.h: remove
* gst/gsttypes.h: remove GstEvent and GstMessage
* gst/gstelement.c: (gst_element_post_message): fix for API changes
* gst/gstmarshal.list: change BOXED -> OBJECT
Implement GstMiniObject.
* gst/gstminiobject.c:
* gst/gstminiobject.h:
Modify to be subclasses of GstMiniObject.
* gst/gstbuffer.c: (_gst_buffer_initialize), (gst_buffer_get_type),
(gst_buffer_class_init), (gst_buffer_finalize), (_gst_buffer_copy),
(gst_buffer_init), (gst_buffer_new), (gst_buffer_new_and_alloc),
(gst_subbuffer_get_type), (gst_subbuffer_init),
(gst_buffer_create_sub), (gst_buffer_is_span_fast),
(gst_buffer_span):
* gst/gstbuffer.h:
* gst/gstevent.c: (_gst_event_initialize), (gst_event_get_type),
(gst_event_class_init), (gst_event_init), (gst_event_finalize),
(_gst_event_copy), (gst_event_new):
* gst/gstevent.h:
* gst/gstmessage.c: (_gst_message_initialize),
(gst_message_get_type), (gst_message_class_init),
(gst_message_init), (gst_message_finalize), (_gst_message_copy),
(gst_message_new), (gst_message_new_error),
(gst_message_new_warning), (gst_message_new_tag),
(gst_message_new_state_changed), (gst_message_new_application):
* gst/gstmessage.h:
* gst/gstprobe.c: (gst_probe_perform),
(gst_probe_dispatcher_dispatch):
* gst/gstprobe.h:
* gst/gstquery.c: (_gst_query_initialize), (gst_query_get_type),
(gst_query_class_init), (gst_query_finalize), (gst_query_init),
(_gst_query_copy), (gst_query_new):
Update elements for GstData -> GstMiniObject changes
* gst/gstquery.h:
* gst/gstqueue.c: (gst_queue_finalize), (gst_queue_locked_flush),
(gst_queue_chain), (gst_queue_loop):
* gst/elements/gstbufferstore.c:
(gst_buffer_store_add_buffer_func),
(gst_buffer_store_cleared_func), (gst_buffer_store_get_buffer):
* gst/elements/gstfakesink.c: (gst_fakesink_class_init),
(gst_fakesink_render):
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init):
* gst/elements/gstfilesrc.c: (gst_mmap_buffer_get_type),
(gst_mmap_buffer_class_init), (gst_mmap_buffer_init),
(gst_mmap_buffer_finalize), (gst_filesrc_map_region),
(gst_filesrc_create_read):
* gst/elements/gstidentity.c: (gst_identity_class_init):
* gst/elements/gsttypefindelement.c:
(gst_type_find_element_src_event), (free_entry_buffers),
(gst_type_find_element_handle_event):
* libs/gst/dataprotocol/dataprotocol.c:
(gst_dp_header_from_buffer):
* libs/gst/dataprotocol/dataprotocol.h:
* libs/gst/dataprotocol/dp-private.h:
2005-05-16 20:21:55 +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 c9aaf4663f gst/: Fix refcounting in utils function.
Original commit message from CVS:
* gst/gstelement.c: (gst_element_add_pad), (gst_element_query):
* gst/gstutils.c: (gst_element_get_compatible_pad_template),
(gst_element_link_pads), (gst_element_query_position),
(gst_element_query_convert), (intersect_caps_func),
(gst_pad_query_position), (gst_pad_query_convert):
Fix refcounting in utils function.
No point in trying to activate a pad when it's added, it could
be added from the state change function and then we deadlock, the
element has to decide what to do.
2005-05-11 09:21:24 +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
Wim Taymans c11c932f88 Some more documentation.
Original commit message from CVS:
* docs/design/part-element-sink.txt:
* docs/design/part-element-source.txt:
* gst/base/gstbasesink.c: (gst_basesink_class_init),
(gst_basesink_event), (gst_basesink_activate):
* gst/base/gstbasesink.h:
* gst/base/gstbasesrc.c: (gst_basesrc_init), (gst_basesrc_unlock),
(gst_basesrc_activate):
* gst/base/gstbasesrc.h:
* gst/gstelement.c: (gst_element_pads_activate):
Some more documentation.
Fixed scheduling decision in _pads_activate().
2005-05-06 08:25:19 +00:00
Andy Wingo e33d96ba60 final cruft fixage
Original commit message from CVS:
final cruft fixage
2005-05-05 21:59:53 +00:00
Wim Taymans d2bf92842c gst/: Fix name lookup in GstBin.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_send_event), (compare_name),
(gst_bin_get_by_name):
* gst/gstbuffer.h:
* gst/gstclock.c: (gst_clock_entry_new), (gst_clock_class_init),
(gst_clock_finalize):
* gst/gstdata.c: (gst_data_replace):
* gst/gstdata.h:
* gst/gstelement.c: (gst_element_request_pad),
(gst_element_pads_activate):
* gst/gstobject.c: (gst_object_init), (gst_object_ref),
(gst_object_unref):
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_peer_set_active),
(gst_pad_set_checkgetrange_function),
(gst_pad_link_check_compatible_unlocked), (gst_pad_set_caps),
(gst_pad_check_pull_range), (gst_pad_pull_range),
(gst_static_pad_template_get_caps), (gst_pad_start_task),
(gst_pad_pause_task), (gst_pad_stop_task):
* gst/gstutils.c: (gst_element_get_compatible_pad_template),
(gst_element_request_pad), (gst_pad_proxy_getcaps):
Fix name lookup in GstBin.
Added _data_replace() function and _buffer_replace()
Use finalize method to clean up clock.
Fix refcounting on request pads.
Fix pad schedule mode error.
Some more object refcounting debug info,
2005-05-05 09:28:01 +00:00
Andy Wingo b4d7be2014 GCC 4 fixen.
Original commit message from CVS:
2005-05-04  Andy Wingo <wingo@pobox.com>

* check/Makefile.am:
* docs/gst/tmpl/gstatomic.sgml:
* docs/gst/tmpl/gstplugin.sgml:
* gst/base/gstbasesink.c: (gst_basesink_activate):
* gst/base/gstbasesrc.c: (gst_basesrc_class_init),
(gst_basesrc_init), (gst_basesrc_set_dataflow_funcs),
(gst_basesrc_query), (gst_basesrc_set_property),
(gst_basesrc_get_property), (gst_basesrc_check_get_range),
(gst_basesrc_activate):
* gst/base/gstbasesrc.h:
* gst/base/gstbasetransform.c: (gst_base_transform_sink_activate),
(gst_base_transform_src_activate):
* gst/elements/gstelements.c:
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init),
(gst_fakesrc_set_property), (gst_fakesrc_get_property):
* gst/elements/gsttee.c: (gst_tee_sink_activate):
* gst/elements/gsttypefindelement.c: (find_element_get_length),
(gst_type_find_element_checkgetrange),
(gst_type_find_element_activate):
* gst/gstbin.c: (gst_bin_save_thyself), (gst_bin_restore_thyself):
* gst/gstcaps.c: (gst_caps_do_simplify), (gst_caps_save_thyself),
(gst_caps_load_thyself):
* gst/gstelement.c: (gst_element_pads_activate),
(gst_element_save_thyself), (gst_element_restore_thyself):
* gst/gstpad.c: (gst_pad_load_and_link), (gst_pad_save_thyself),
(gst_ghost_pad_save_thyself), (gst_pad_check_pull_range):
* gst/gstpad.h:
* gst/gstxml.c: (gst_xml_write), (gst_xml_parse_doc),
(gst_xml_parse_file), (gst_xml_parse_memory),
(gst_xml_get_element), (gst_xml_make_element):
* gst/indexers/gstfileindex.c: (gst_file_index_load),
(_file_index_id_save_xml), (gst_file_index_commit):
* gst/registries/gstlibxmlregistry.c: (read_string), (read_uint),
(read_enum), (load_pad_template), (load_feature), (load_plugin),
(load_paths):
* libs/gst/dataprotocol/dataprotocol.c: (gst_dp_packet_from_caps),
(gst_dp_packet_from_event), (gst_dp_caps_from_packet):
* tools/gst-complete.c: (main):
* tools/gst-compprep.c: (main):
* tools/gst-inspect.c: (print_element_properties_info):
* tools/gst-launch.c: (xmllaunch_parse_cmdline):
* tools/gst-xmlinspect.c: (print_element_properties):
GCC 4 fixen.
2005-05-04 21:29:44 +00:00
Thomas Vander Stichele 5da40820c5 work with debug disabled
Original commit message from CVS:
work with debug disabled
2005-04-10 21:42:32 +00:00
Wim Taymans aa00eb872d gst/: More work on the generic source base class, implement seeking, query.
Original commit message from CVS:
* gst/base/README:
* gst/base/gstbasesrc.c: (gst_basesrc_get_type),
(gst_basesrc_init), (gst_basesrc_get_formats), (gst_basesrc_query),
(gst_basesrc_get_event_mask), (gst_basesrc_do_seek),
(gst_basesrc_event_handler), (gst_basesrc_get_range_unlocked),
(gst_basesrc_check_get_range), (gst_basesrc_loop),
(gst_basesrc_unlock), (gst_basesrc_get_size), (gst_basesrc_start),
(gst_basesrc_stop), (gst_basesrc_activate),
(gst_basesrc_change_state), (basesrc_find_peek),
(basesrc_find_suggest), (gst_basesrc_type_find):
* gst/base/gstbasesrc.h:
* gst/elements/gstfilesrc.c: (gst_filesrc_base_init),
(gst_filesrc_class_init), (gst_filesrc_init),
(gst_filesrc_finalize), (gst_filesrc_set_location),
(gst_filesrc_set_property), (gst_filesrc_get_property),
(gst_filesrc_free_parent_mmap), (gst_filesrc_map_region),
(gst_filesrc_map_small_region), (gst_filesrc_create_mmap),
(gst_filesrc_create_read), (gst_filesrc_create),
(gst_filesrc_get_size), (gst_filesrc_start), (gst_filesrc_stop):
* gst/elements/gstfilesrc.h:
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_lost_state), (gst_element_pads_activate):
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_peer_set_active),
(gst_pad_set_checkgetrange_function), (gst_pad_check_pull_range),
(gst_pad_pull_range):
* gst/gstpad.h:
More work on the generic source base class, implement seeking,
query.
Make filesrc extend the base source class.
Added gst_pad_set_checkgetrange_function to GstPad.
2005-04-06 17:30:48 +00:00
Wim Taymans bb1be5f509 gst/: Simplify pad activation.
Original commit message from CVS:
* gst/base/Makefile.am:
* gst/base/README:
* gst/base/gstbasesink.c: (gst_basesink_get_type),
(gst_basesink_base_init), (gst_basesink_class_init),
(gst_basesink_pad_getcaps), (gst_basesink_init),
(gst_basesink_activate), (gst_basesink_change_state):
* gst/base/gstbasesink.h:
* gst/base/gstbasetransform.c: (gst_base_transform_get_type),
(gst_base_transform_base_init), (gst_base_transform_finalize),
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_proxy_getcaps), (gst_base_transform_setcaps),
(gst_base_transform_event), (gst_base_transform_getrange),
(gst_base_transform_chain), (gst_base_transform_handle_buffer),
(gst_base_transform_set_property),
(gst_base_transform_get_property),
(gst_base_transform_sink_activate),
(gst_base_transform_src_activate),
(gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/elements/gstidentity.c: (gst_identity_finalize),
(gst_identity_class_init), (gst_identity_init),
(gst_identity_event), (gst_identity_check_perfect),
(gst_identity_transform), (gst_identity_set_property),
(gst_identity_get_property), (gst_identity_change_state):
* gst/elements/gstidentity.h:
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_lost_state), (gst_element_pads_activate):
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_peer_set_active),
(gst_pad_check_pull_range), (gst_pad_pull_range):
* gst/gstpad.h:
Simplify pad activation.
Added function to check if pull_range can be performed.
Error out when pulling inactive or flushing pads.
Removed const from refcounted types as it does not make sense.
Simplify pad templates in basesink
Added base class for simple 1-to-1 transforms.
Make identity subclass the base transform.
2005-03-29 16:18:12 +00:00