Commit graph

532 commits

Author SHA1 Message Date
Thomas Vander Stichele 8b739d91e7 whitespace, doc and debug fixing/additions
Original commit message from CVS:
whitespace, doc and debug fixing/additions
2005-08-26 11:19:22 +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
Thomas Vander Stichele 31e37fe64c add docs
Original commit message from CVS:
add docs
2005-08-25 18:54:00 +00:00
Wim Taymans 1e40e471d9 check/generic/states.c: Make sure all tasks are stopped.
Original commit message from CVS:
* check/generic/states.c: (GST_START_TEST):
Make sure all tasks are stopped.

* check/gst/gstbin.c: (GST_START_TEST):
Unref after usage for proper valgrinding.

* gst/gstpad.c: (gst_pad_finalize), (gst_pad_stop_task):
Really wait for the task to stop before destroying the
mutex.

* gst/gstqueue.c: (gst_queue_sink_activate_push),
(gst_queue_src_activate_push):
Small cleanups. Don't stop the task when we did not start
it.

* gst/gsttask.c: (gst_task_get_type), (gst_task_init),
(gst_task_func), (gst_task_cleanup_all), (gst_task_set_lock),
(gst_task_get_state), (gst_task_start), (gst_task_pause),
(gst_task_join):
* gst/gsttask.h:
Protect the stream lock with the object lock.
Disallow setting the stream lock when running.
Add cleanup_all to wait for the threadpool to finish.
Remove code to autoallocate a mutex if none was provided.
Add _join() to wait for a task to stop.
Protect the thread pool with a global lock.
2005-08-24 20:49:53 +00:00
Andy Wingo b2c0b3a162 gst/gstpad.c (gst_pad_fixate_caps): Check if the caps is fixed already.
Original commit message from CVS:
2005-08-24  Andy Wingo  <wingo@pobox.com>

* gst/gstpad.c (gst_pad_fixate_caps): Check if the caps is fixed
already.
2005-08-24 11:36:49 +00:00
Thomas Vander Stichele 4b0a255e95 gst/gstbuffer.c: some debugging
Original commit message from CVS:

* gst/gstbuffer.c: (gst_buffer_new_and_alloc):
some debugging
* gst/gstcaps.h:
whitespace fixes
* gst/gstpad.c: (gst_pad_activate_push), (gst_pad_alloc_buffer):
more debugging
* gst/gststructure.c: (gst_caps_structure_fixate_field_boolean):
* gst/gststructure.h:
add a fixate function for booleans; add a FIXME that these func
names should probably be gst_structure_fixate_*
2005-08-23 11:38:28 +00:00
Thomas Vander Stichele e5afa8a31b check/Makefile.am: clean up environment for when registry gets built versus when actual tests are run; valgrind seems...
Original commit message from CVS:

* check/Makefile.am:
clean up environment for when registry gets built versus
when actual tests are run; valgrind seems to not report
leaks if GST_PLUGIN_PATH is set to some specific values
* check/gst/gstbin.c: (GST_START_TEST):
add more refcounting checks; maybe this exposes a
preroll lock bug ?
* common/check.mak:
* gst/base/gstbasesink.c: (gst_base_sink_handle_object):
* gst/check/gstcheck.h:
* gst/gstbin.c: (bin_element_is_semi_sink), (gst_bin_get_state),
(gst_bin_change_state):
* gst/gstpad.c: (gst_pad_activate_push), (gst_pad_chain):
add/fix debugging/whitespace
2005-08-21 15:01:18 +00:00
Thomas Vander Stichele 088fed6d36 check/Makefile.am: set GST_TOOLS_DIR
Original commit message from CVS:

* check/Makefile.am:
set GST_TOOLS_DIR
* gst/check/gstcheck.c: (gst_check_message_error):
* gst/check/gstcheck.h:
add a fail_unless_equals_int
add fail_unless for error messages
2005-08-20 20:15:53 +00:00
Jan Schmidt 8377afc0ba check/: I wrote a test!
Original commit message from CVS:
* check/Makefile.am:
* check/gst/gstevents.c: (GST_START_TEST), (event_probe),
(test_event), (timediff), (gstevents_suite), (main):
I wrote a test!

* docs/design/part-seeking.txt:
Spelling correction

* docs/gst/tmpl/gstevent.sgml:
Docs updates.

* gst/base/gstbasesink.c: (gst_base_sink_handle_object):
Treat a buffer-without-newsegment the same as a receiving
a newsegment not in time format, and disable syncing to the clock
with a warning.

* gst/gstbus.c: (gst_bus_set_sync_handler):
Assert if anyone tries to replace the existing sync_handler for bus,
as only the owner should be setting it.

* gst/gstevent.h:
Have a fixed set of custom event enums with events identified by
their structure name (as in 0.8), rather than a free-for-all
allowing collisions between enum values from different plugins.

* gst/gstpad.c: (gst_pad_class_init):
Docs change.

* gst/gstqueue.c: (gst_queue_handle_sink_event):
Handle out-of-band downstream events from the sending thread.
2005-08-18 15:31:28 +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
Wim Taymans 49de56dd1f docs/design/part-gstghostpad.txt: Small update.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Small update.

* gst/gstbin.c: (unlink_pads), (gst_bin_add_func),
(gst_bin_remove_func):
Unlinking pads while holding the bin LOCK is not a good
idea.

* gst/gstpad.c: (gst_pad_class_init),
(gst_pad_link_check_hierarchy), (gst_pad_get_caps_unlocked),
(gst_pad_accept_caps), (gst_pad_set_caps), (gst_pad_send_event):
No prob setting template after creating the pad.
2005-07-29 19:19:29 +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 8de129adc4 gst/gstpad.c: Implement default fixation once again, so that gst_pad_fixate() actually does anything at all. This pro...
Original commit message from CVS:
* gst/gstpad.c: (fixate_value), (gst_pad_default_fixate),
(gst_pad_fixate_caps):
Implement default fixation once again, so that gst_pad_fixate()
actually does anything at all. This probably needs to be some
sort of a last resort, and use profile-based fixation first, but
since that doesn't exist yet, this is the best we have. Fixes
visualization in Totem.
2005-07-25 12:31:08 +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 9ace74670e gst/gstcaps.c: Remove debug info.
Original commit message from CVS:
* gst/gstcaps.c: (gst_caps_do_simplify):
Remove debug info.

* gst/gsterror.h:
Define error for stream stopped.

* gst/gstghostpad.c: (gst_proxy_pad_do_bufferalloc),
(gst_proxy_pad_do_chain), (gst_proxy_pad_do_getrange):
Do proper return values.

* gst/gstpad.c: (gst_pad_get_caps_unlocked), (gst_pad_accept_caps),
(gst_pad_set_caps), (gst_pad_chain), (gst_pad_push),
(gst_pad_get_range):
Better return values.

* gst/gstpad.h:
Reorganise return values, add macro to check for fatal errors.

* gst/gstqueue.c: (gst_queue_chain):
Return proper GstFlowReturn values,
2005-07-14 18:10:04 +00:00
Wim Taymans f7c0c25d58 gst/base/gstbasetransform.c: Added more debug info in the negotiate process.
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_setcaps):
Added more debug info in the negotiate process.

* gst/gstmessage.h:
Prepare for segment playback.

* gst/gstpad.c: (gst_pad_accept_caps), (gst_pad_set_caps):
Better debugging.

* gst/gstutils.c:
Some more docs.

* tools/gst-launch.c: (main):
NULL pipeline on errors.
2005-07-12 17:17:34 +00:00
Thomas Vander Stichele b7e7148a4c check/Makefile.am: instate more valgrindable tests
Original commit message from CVS:
2005-07-12  Thomas Vander Stichele  <thomas at apestaart dot org>

* check/Makefile.am:
instate more valgrindable tests
* check/elements/gstfakesrc.c: (chain_func), (event_func),
(GST_START_TEST), (fakesrc_suite):
* check/gst/gstpad.c: (GST_START_TEST):
* check/gst/gststructure.c: (GST_START_TEST):
fix test leaks
* docs/gst/tmpl/gstminiobject.sgml:
* gst/gstpad.c: (gst_pad_finalize):
fix the static mutex leak
2005-07-12 09:41:00 +00:00
Thomas Vander Stichele 7d8c811095 fix caps leak in both cases
Original commit message from CVS:
fix caps leak in both cases
2005-07-09 23:52:07 +00:00
Thomas Vander Stichele 351230b554 duh, remove unused var
Original commit message from CVS:
duh, remove unused var
2005-07-09 23:48:45 +00:00
Thomas Vander Stichele 84caeeb557 fix a caps leak
Original commit message from CVS:
fix a caps leak
2005-07-09 23:47:23 +00:00
Wim Taymans 7ce828ba3a gst/gstpad.c: Implement the fixate function.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_fixate_caps), (gst_pad_accept_caps):
Implement the fixate function.
Clean up acceptcaps.
2005-07-06 13:20:47 +00:00
Thomas Vander Stichele b9f6a4d4ee if pad has no parent, return NULL as list of internal links
Original commit message from CVS:

* check/gst/gstpad.c:
* check/gstcheck.c:
* gst/gstpad.c: (gst_pad_get_internal_links_default):
if pad has no parent, return NULL as list of internal links
2005-07-06 11:31:57 +00:00
Andy Wingo 83a7075f8a check/: Application message API change.
Original commit message from CVS:
2005-07-05  Andy Wingo  <wingo@pobox.com>

* check/gst/gstbus.c (pound_bus_with_messages):
* check/gst/gstmessage.c (START_TEST):
* check/pipelines/simple_launch_lines.c (got_handoff): Application
message API change.

* gst/base/gstbasetransform.c (gst_base_transform_setcaps): More
logic weaks here: always run transform_caps, trying passthrough
operation only if the original caps intersects with the transform.

* gst/gstpad.c (gst_pad_link_check_compatible_unlocked): Debug
source and sink caps.

* gst/base/gstbasetransform.c (gst_base_transform_getcaps):
Intersect the peer caps with the pad template before going into
transform_caps.
(gst_base_transform_transform_caps): More debugging.

* gst/gstmessage.h (gst_message_new_application): Take a GstObject
src argument.
2005-07-05 08:47:40 +00:00
Andy Wingo c1d34b8acf tests/network-clock.scm: Commentary update.
Original commit message from CVS:
2005-07-01  Andy Wingo  <wingo@pobox.com>

* tests/network-clock.scm: Commentary update.

* gst/elements/gstidentity.c (PROP_DUPLICATE): Gone daddy gone.
Didn't really make sense, not implementable with basetransform,
etc.
(gst_identity_transform): Unref inbuf via make_writable. Feeble
attempt at implementing the sync property, needs an unlock method.

* gst/base/gstbasetransform.c (gst_base_transform_transform_caps):
New func, by default returns the same caps (the identity
transformation).
(gst_base_transform_getcaps): Uses transform_caps to return
something sensible.
(gst_base_transform_setcaps): Complicated logic to get caps on
both pads, even if they are different, and to call set_caps once
for every time both pads get their caps set.
(gst_base_transform_handle_buffer): Give the ref to the transform
function. Allows in-place modification of the buffer.

* gst/base/gstbasetransform.h (transform_caps): New class method.
Given caps on one side, what can I do on the other.
(set_caps): Take two caps, one for each side of the element.

* gst/gstpad.h:
* gst/gstpad.c (gst_pad_fixate_caps): Change prototype to modify
caps in place. This is safe because we can check the mutability of
the caps, and a good idea because fixate functions are just called
as a matter of last resort. (Not actually implemented.)
(gst_pad_set_caps): If the caps we're setting is actually the same
as the existing pad caps, just update the pointer without calling
setcaps. Assert that caps is either NULL or fixed, as per the
docs.

* gst/gstghostpad.c: Update for fixate changes.
2005-07-01 16:46:59 +00:00
Jan Schmidt e762446852 gst/gstpad.c: Put the mini_object into GValue as a mini_object, not a gpointer.
Original commit message from CVS:
2005-07-02  Jan Schmidt  <thaytan@mad.scientist.com>

* gst/gstpad.c: (gst_pad_emit_have_data_signal):
Put the mini_object into GValue as a mini_object,
not a gpointer.
2005-07-01 14:36:12 +00:00
Wim Taymans 092745b46d gst/: Removed atomic operations, use existing LOCK.
Original commit message from CVS:
* gst/gstpad.c: (_gst_do_pass_data_accumulator),
(default_have_data), (gst_pad_class_init), (gst_pad_init),
(gst_pad_emit_have_data_signal), (gst_pad_chain), (gst_pad_push),
(gst_pad_check_pull_range), (gst_pad_get_range),
(gst_pad_pull_range), (gst_pad_push_event), (gst_pad_send_event):
* gst/gstpad.h:
* gst/gstutils.c: (gst_atomic_int_set), (gst_pad_add_data_probe),
(gst_pad_add_event_probe), (gst_pad_add_buffer_probe),
(gst_pad_remove_data_probe), (gst_pad_remove_event_probe),
(gst_pad_remove_buffer_probe):
Removed atomic operations, use existing LOCK.
Move exception handling out of main code path.
2005-06-30 09:23:54 +00:00
Ronald S. Bultje a220106c57 gst/gstpad.c: Fix accumulator, add default value by using _emitv() instead of _emit() for signal emission.
Original commit message from CVS:
* gst/gstpad.c: (_gst_do_pass_data_accumulator),
(silly_return_true_function), (gst_pad_class_init),
(gst_pad_emit_have_data_signal), (gst_pad_chain), (gst_pad_push),
(gst_pad_get_range), (gst_pad_pull_range), (gst_pad_push_event),
(gst_pad_send_event):
Fix accumulator, add default value by using _emitv() instead
of _emit() for signal emission.
2005-06-29 19:20:07 +00:00
Ronald S. Bultje af3acddad9 Add probe example.
Original commit message from CVS:
* docs/manual/advanced-dataaccess.xml:
* examples/manual/Makefile.am:
Add probe example.
* gst/gstpad.c: (_gst_do_pass_data_accumulator):
Make work (??).
2005-06-29 16:57:59 +00:00
Ronald S. Bultje d13478b357 Remove old probes, add new g-signal-based probes and some utility functions.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstprobe.sgml:
* gst/Makefile.am:
* gst/gstpad.c: (_gst_do_pass_data_accumulator),
(gst_pad_class_init), (gst_pad_init), (gst_pad_chain),
(gst_pad_push), (gst_pad_get_range), (gst_pad_pull_range),
(gst_pad_push_event), (gst_pad_send_event):
* gst/gstpad.h:
* gst/gstutils.c: (gst_pad_add_data_probe),
(gst_pad_add_event_probe), (gst_pad_add_buffer_probe),
(gst_pad_remove_data_probe), (gst_pad_remove_event_probe),
(gst_pad_remove_buffer_probe):
* gst/gstutils.h:
Remove old probes, add new g-signal-based probes and some utility
functions.
2005-06-29 15:51:25 +00:00
Wim Taymans 06ab4b7831 gst/base/gstbasesink.c: Small debug line.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_change_state):
Small debug line.

* gst/gstclock.h:
map SIGNAL and BROADCAST to the right function.

* gst/gstobject.h:
Remove redundant braces.

* gst/gstpad.c: (gst_pad_set_caps):
Don't call setcaps function when reseting caps to NULL.

* gst/gstsystemclock.c: (gst_system_clock_dispose),
(gst_system_clock_async_thread), (gst_system_clock_id_wait_async),
(gst_system_clock_id_unschedule):
Use BROADCAST as this is what we do.
2005-06-29 11:10:44 +00:00
Wim Taymans de3be844ec gst/: The deprecated pad loop function is removed now.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_basesink_set_pad_functions),
(gst_basesink_preroll_queue_flush):
* gst/base/gstbasesrc.c: (gst_basesrc_set_dataflow_funcs):
* gst/elements/gsttee.c: (gst_tee_update_pad_functions):
* gst/gstghostpad.c: (gst_proxy_pad_do_bufferalloc),
(gst_proxy_pad_do_acceptcaps), (gst_proxy_pad_do_fixatecaps),
(gst_proxy_pad_set_property):
* gst/gstpad.c:
* gst/gstpad.h:
* gst/gstqueue.c: (gst_queue_init):
The deprecated pad loop function is removed now.
2005-06-28 11:36:43 +00:00
Wim Taymans 9a6500143f gst/gstpad.*: CONNECTED -> LINKED.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_alloc_buffer), (gst_pad_push),
(gst_pad_pull_range):
* gst/gstpad.h:
CONNECTED -> LINKED.
2005-06-28 10:28:31 +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 7fda2039b3 shut up gcc3
Original commit message from CVS:
shut up gcc3
2005-06-27 18:39:41 +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
Wim Taymans d56ab76d57 gst/: No unsafe task pausing please.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_event_default):
* gst/gstqueue.c: (gst_queue_loop):
No unsafe task pausing please.
2005-06-23 17:09:21 +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
Andy Wingo 678bb923f1 commit the file
Original commit message from CVS:
commit the file
2005-06-23 09:41:41 +00:00
Wim Taymans 5d66b9af57 gst/gstpad.c: Small doc updates.
Original commit message from CVS:
* gst/gstpad.c:
Small doc updates.

* gst/gstvalue.c: (gst_value_compare_buffer),
(gst_value_serialize_buffer), (gst_value_deserialize_buffer),
(gst_value_compare_flags), (gst_value_serialize_flags),
(gst_value_deserialize_flags), (_gst_value_initialize):
Fix serialisation of buffers, they are not boxed types anymore
2005-06-20 15:18:17 +00:00
Thomas Vander Stichele 4ae0c46b63 check/gstcheck.h: add macros for checking refcounts on objects and caps
Original commit message from CVS:

* check/gstcheck.h:
add macros for checking refcounts on objects and caps
* check/gst/gstpad.c: (START_TEST), (gst_pad_suite):
add some more unit tests
* gst/gstpad.c: (gst_pad_link_check_compatible_unlocked),
(gst_pad_link_prepare), (gst_pad_link), (gst_pad_get_allowed_caps):
fix leaked refcounts (I hope :)) so unittest works
* gst/gstpad.h:
whitespace removal
2005-06-19 00:52:31 +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 d3edbe1718 gst/: Bufferalloc: return GstFlowReturn to more accuratly report why allocation failed.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_basesink_pad_buffer_alloc),
(gst_base_sink_buffer_alloc), (gst_basesink_preroll_queue_push),
(gst_basesink_activate):
* gst/base/gstbasesink.h:
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_link_prepare),
(gst_pad_link), (gst_pad_accept_caps), (gst_pad_alloc_buffer),
(gst_pad_query), (gst_pad_start_task):
* gst/gstpad.h:
* gst/gstqueue.c: (gst_queue_bufferalloc),
(gst_queue_handle_sink_event), (gst_queue_chain):
Bufferalloc: return GstFlowReturn to more accuratly report
why allocation failed.
2005-06-02 09:42:02 +00:00
Wim Taymans 0e1ad862de gst/gstpad.c: Propagate errors from _set_caps() in configure_src/sink functions instead of returning TRUE.
Original commit message from CVS:
* gst/gstpad.c: (gst_real_pad_init), (gst_pad_set_active),
(gst_pad_link_prepare), (gst_pad_link), (gst_pad_accept_caps),
(gst_pad_configure_sink), (gst_pad_configure_src),
(gst_pad_alloc_buffer), (gst_pad_query), (gst_pad_send_event),
(gst_pad_start_task):
Propagate errors from _set_caps() in configure_src/sink
functions instead of returning TRUE.
FLUSH events can travel up and downstream
2005-05-30 15:41:54 +00:00
Wim Taymans 61167c9097 gst/gstpad.c: A flushing pad cannot be used to alloc_buffer from.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_link_prepare),
(gst_pad_link), (gst_pad_accept_caps), (gst_pad_alloc_buffer),
(gst_pad_query), (gst_pad_send_event), (gst_pad_start_task):
A flushing pad cannot be used to alloc_buffer from.
2005-05-26 10:50:12 +00:00
Wim Taymans 56d9730d20 gst/: Fix state changes for non sinks. We now change sinks, then elements with unconnected srcpads, then the rest.
Original commit message from CVS:
* gst/gstbin.c: (bin_element_is_sink), (has_ancestor),
(bin_element_is_semi_sink), (append_child), (gst_bin_change_state):
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_link_prepare),
(gst_pad_link), (gst_pad_accept_caps), (gst_pad_query),
(gst_pad_send_event), (gst_pad_start_task):
* gst/gstqueue.c: (gst_queue_init), (gst_queue_locked_flush),
(gst_queue_handle_sink_event), (gst_queue_chain), (gst_queue_loop),
(gst_queue_sink_activate), (gst_queue_src_activate),
(gst_queue_change_state):
* gst/gstqueue.h:
Fix state changes for non sinks. We now change sinks, then elements
with unconnected srcpads, then the rest.
More efficient queue unlocking in flush and state changes.
Set the pad activate mode even if it does not have an activate
function.
2005-05-25 19:33:39 +00:00
Wim Taymans 25576cb626 gst/gstpad.c: Disable attempt at mode switching until it is figured out.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_link_prepare),
(gst_pad_link), (gst_pad_accept_caps), (gst_pad_query),
(gst_pad_send_event), (gst_pad_start_task):
Disable attempt at mode switching until it is figured out.
2005-05-25 13:59:18 +00:00
Wim Taymans add280cd10 gst/: Implement gst_pad_pause/start/stop_task(), take STREAM lock in task function.
Original commit message from CVS:
* gst/base/gstadapter.c: (gst_adapter_peek), (gst_adapter_flush):
* gst/base/gstbasesink.c: (gst_basesink_preroll_queue_push),
(gst_basesink_finish_preroll), (gst_basesink_chain),
(gst_basesink_loop), (gst_basesink_activate),
(gst_basesink_change_state):
* gst/base/gstbasesrc.c: (gst_basesrc_do_seek),
(gst_basesrc_get_range), (gst_basesrc_loop),
(gst_basesrc_activate):
* gst/elements/gsttee.c: (gst_tee_sink_activate):
* gst/gstpad.c: (gst_pad_dispose), (gst_real_pad_class_init),
(gst_real_pad_init), (gst_real_pad_set_property),
(gst_real_pad_get_property), (gst_pad_set_active),
(gst_pad_is_active), (gst_pad_get_query_types), (gst_pad_unlink),
(gst_pad_link_prepare), (gst_pad_link), (gst_pad_get_real_parent),
(gst_real_pad_get_caps_unlocked), (gst_pad_peer_get_caps),
(gst_pad_accept_caps), (gst_pad_get_peer), (gst_pad_realize),
(gst_pad_event_default_dispatch), (gst_pad_event_default),
(gst_pad_dispatcher), (gst_pad_query), (gst_real_pad_dispose),
(gst_pad_save_thyself), (handle_pad_block), (gst_pad_chain),
(gst_pad_push), (gst_pad_get_range), (gst_pad_pull_range),
(gst_pad_send_event), (gst_pad_start_task), (gst_pad_pause_task),
(gst_pad_stop_task):
* gst/gstpad.h:
* gst/gstqueue.c: (gst_queue_handle_sink_event), (gst_queue_chain),
(gst_queue_loop), (gst_queue_src_activate):
* gst/gsttask.c: (gst_task_init), (gst_task_set_lock),
(gst_task_get_state):
* gst/gsttask.h:
* gst/schedulers/threadscheduler.c:
(gst_thread_scheduler_task_start), (gst_thread_scheduler_func):
Implement gst_pad_pause/start/stop_task(), take STREAM lock
in task function.
Remove ACTIVE pad flag, use FLUSHING everywhere
Added _pad_chain(), _pad_get_range() to call chain/getrange
functions.
Add locks around IS_FLUSHING when reading.
Take STREAM lock in chain(), get_range() functions so plugins
don't need to take it anymore.
2005-05-25 11:50:11 +00:00
Wim Taymans 576b2181d8 gst/: Don't queue buffers in basesink when we are flushing.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_basesink_finish_preroll),
(gst_basesink_chain_unlocked), (gst_basesink_activate):
* gst/gstminiobject.c: (gst_mini_object_get_type),
(gst_mini_object_free):
* gst/gstpad.c: (gst_pad_accept_caps), (gst_pad_query),
(gst_pad_push), (gst_pad_push_event):
* gst/gstqueue.c: (gst_queue_change_state):
Don't queue buffers in basesink when we are flushing.
Unref buffer when flushing in basesink.
Flush queue when going to READY
Unref buffer when _push() returns an error.
Don't free MiniObject instance when refcount is incremented
in _finalize() so that we can recover objects.
2005-05-17 17:37:43 +00:00
Wim Taymans 8b61f54757 gst/: Clear queue when going to READY.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_accept_caps), (gst_pad_set_caps),
(gst_pad_alloc_buffer), (gst_pad_query), (gst_pad_push):
* gst/gstqueue.c: (gst_queue_change_state):
Clear queue when going to READY.
Remove IN_SETCAPS flag too.
2005-05-17 14:11:32 +00:00
Wim Taymans e70ec7b807 gst/: Implement accept_caps.
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_proxy_getcaps),
(gst_base_transform_event):
* gst/gstpad.c: (gst_pad_accept_caps), (gst_pad_query):
Implement accept_caps.
Fix silly lock/unlock mismatch in base class.
2005-05-09 14:47:15 +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
Andy Wingo 328ddd7363 gst/gstiterator.h: Add some includes.
Original commit message from CVS:
2005-05-09  Andy Wingo  <wingo@pobox.com>

* gst/gstiterator.h: Add some includes.

* gst/gstqueryutils.h: Include more headers.

* gst/gstpad.h:
* gst/gstpad.c (gst_pad_query_position): New routine, replaces
some uses of gst_pad_query.

* gst/gstqueryutils.c: Build fixes. Make parse functions ignore
NULL out parameters.
(gst_query_new_position): New proc, allocates a new position
query.

* gst/Makefile.am (libgstreamer_@GST_MAJORMINOR@_la_SOURCES): Add
gstqueryutils.c to the build.

* gst/gststructure.c (gst_structure_set_valist): Implement with
the generic G_VALUE_COLLECT.
2005-05-09 06:21:10 +00:00
Andy Wingo 8970bda4ba gst/gstquery.h
Original commit message from CVS:
2005-05-06  Andy Wingo  <wingo@pobox.com>

* gst/gstquery.h
* gst/gstquery.c (_gst_query_initialize): Extend GstQuery from
GstData, init a memchunk.
(standard_definitions): Add a few query types, deprecate a few.
(gst_query_get_type): New proc.
(_gst_query_copy, _gst_query_free, gst_query_new): GstData
implementation.
(gst_query_new_application, gst_query_get_structure): New public
procs.

* docs/design/draft-query.txt: Removed LINKS from the query types,
because all the rest can be dispatched to other pads -- seemed
ugly to have a query that couldn't be dispatched. internal_links
is fine as a pad method.

* gst/gstpad.h: Add query2 as a pad method, add the new functions
in gstpad.c, but maintain binary compatibility for the moment.
Will fix before 0.9 is out.

* gst/gstqueryutils.c:
* gst/gstqueryutils.h: New files, implement 3 methods for each
query type: parse_query, parse_response, and set. Probably need an
allocator as well.

* gst/gst.h: Add gstquery.h and gstqueryutils.h to the list.

* gst/elements/gstfilesink.c (gst_filesink_query2):
* gst/base/gstbasesrc.c (gst_basesrc_query2): Replace old query,
query_types, and formats methods.

* gst/gstpad.c (gst_pad_query2, gst_pad_query2_default)
(gst_pad_set_query2_function): New functions.
(gst_real_pad_init): Set query2_default as the default query2
function. Basically just dispatches to internally linked pads.

Needs review!

* gst/gstdata_private.h (_GST_DATA_INIT): Set data->refcount to 1
without using the atomic operations. Only one thread can possibly
be accessing the data at this point. Changed so as to avoid
gst_atomic operations.
2005-05-06 21:41:22 +00:00
Wim Taymans 1185aabed9 gst/gstpad.c: Also set caps if we use the fallback buffer alloc.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_alloc_buffer), (gst_pad_push):
Also set caps if we use the fallback buffer alloc.
2005-05-06 19:50:23 +00:00
Wim Taymans d7b231e6d1 gst/: Fix gst_pad_peer_get_caps(), make it return NULL if no peer.
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_proxy_getcaps):
* gst/elements/gstcapsfilter.c: (gst_capsfilter_getcaps):
* gst/gstpad.c: (gst_pad_peer_get_caps):
* gst/gstqueue.c: (gst_queue_init), (gst_queue_getcaps),
(gst_queue_bufferalloc), (gst_queue_handle_sink_event),
(gst_queue_src_activate), (gst_queue_change_state):
* gst/gstqueue.h:
* gst/gstutils.c: (gst_element_get_compatible_pad_template),
(intersect_caps_func):
Fix gst_pad_peer_get_caps(), make it return NULL if no peer.
Always take QUEUE_LOCK after STREAM_LOCK or we might deadlock.
Some fixes for the peer_get_caps() change.
2005-05-06 17:10:49 +00:00
Andy Wingo e33d96ba60 final cruft fixage
Original commit message from CVS:
final cruft fixage
2005-05-05 21:59:53 +00:00
Andy Wingo e19563e43e revert accidental commit of cruft -- doh
Original commit message from CVS:
revert accidental commit of cruft -- doh
2005-05-05 21:37:34 +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
Wim Taymans 50b44cdd16 gst/: Remove gst_library_load as it does more harm than good with the new g_module flags.
Original commit message from CVS:
* 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_link_prepare),
(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/gstplugin.c: (gst_plugin_load):
* gst/gstplugin.h:
Remove gst_library_load as it does more harm than good with
the new g_module flags.
Revert bogus caps template check in pad linking, pad caps
are important when linking not the template, which is more
general than the current caps.
2005-04-25 13:00:47 +00:00
Wim Taymans f494f49acd gst/gstpad.*: Added stubs for unimplemented functions.
Original commit message from CVS:
* 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_static_pad_template_get_caps),
(gst_pad_start_task), (gst_pad_pause_task), (gst_pad_stop_task):
* gst/gstpad.h:
Added stubs for unimplemented functions.
2005-04-25 09:45:35 +00:00
David Schleef 01c25dc75f check/gst/gstpad.c: Oh yeah, it's always nice to make the regressions tests work. Remove some code that is no longer...
Original commit message from CVS:
* check/gst/gstpad.c: (START_TEST): Oh yeah, it's always nice to
make the regressions tests work.  Remove some code that is no
longer true.
* gst/gstpad.c: (gst_pad_link_check_templates_compatible_unlocked):
Disable warning for pads without templates.
2005-04-24 22:44:13 +00:00
David Schleef 65dd8e9726 gst/gstpad.c: Remove handling of filtered caps. Fix/merge functions that handle filtered links.
Original commit message from CVS:
* gst/gstpad.c: Remove handling of filtered caps.  Fix/merge
functions that handle filtered links.
* gst/gstpad.h: Remove 'appfilter' field and prototypes of
removed functions.
* gst/gstutils.c: Fix/remove utility functions that handle
filtered caps.
* gst/gstutils.h:
* gst/gstvalue.c: Add serialization/deserialization of caps
* gst/parse/grammar.y: Ignore filtered caps when linking.  This
requires fixing so that the filter caps notation creates
a capsfilter element and sets the filter_caps property.  I
think everyone probably wants to keep the shorthand notation.
* docs/gst/tmpl/gstelement.sgml: updates for API changes.
* docs/gst/tmpl/gstpad.sgml:
* gst/elements/gstelements.c: Register capsfilter element.
* gst/Makefile.am: fix spacing
* docs/random/ds/0.9-suggested-changes: random
2005-04-24 21:16:45 +00:00
Wim Taymans ee13415b38 gst/: Make gst_caps_replace() work like other _replace() functions.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_basesink_base_init),
(gst_basesink_pad_getcaps), (gst_basesink_init),
(gst_basesink_chain_unlocked):
* gst/base/gsttypefindhelper.c: (helper_find_suggest),
(gst_type_find_helper):
* gst/elements/gsttypefindelement.c:
(gst_type_find_element_have_type), (gst_type_find_element_init),
(stop_typefinding), (gst_type_find_element_handle_event),
(find_suggest), (gst_type_find_element_chain),
(gst_type_find_element_checkgetrange),
(gst_type_find_element_getrange), (do_typefind),
(gst_type_find_element_activate):
* gst/gstbuffer.c: (_gst_buffer_sub_free),
(gst_buffer_default_free), (gst_buffer_default_copy),
(gst_buffer_set_caps):
* gst/gstcaps.c: (gst_caps_ref), (gst_caps_unref),
(gst_caps_replace):
* gst/gstmessage.c: (gst_message_new),
(gst_message_new_state_changed):
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_peer_set_active),
(gst_pad_set_checkgetrange_function),
(gst_pad_link_prepare_filtered), (gst_pad_relink_filtered),
(gst_pad_set_caps), (gst_pad_check_pull_range),
(gst_pad_pull_range), (gst_static_pad_template_get_caps):
* gst/gstpad.h:
* gst/gsttypefind.c: (gst_type_find_register):
Make gst_caps_replace() work like other _replace() functions.
Use _caps_replace() where possible.
Make sure _message_new() initialises its field.
Add gst_static_pad_template_get_caps()
2005-04-20 09:10:42 +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 3cfdcab18b gst/: Added rate to the discont event to prepare for variable speed and reverse playback.
Original commit message from CVS:
* gst/gstevent.c: (gst_event_new_discontinuous_valist),
(gst_event_new_discontinuous), (gst_event_discont_get_value):
* gst/gstevent.h:
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_peer_set_active),
(gst_pad_pull_range):
Added rate to the discont event to prepare for variable speed
and reverse playback.
2005-03-31 09:46:28 +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
Wim Taymans 326d36b8d8 Added state change code.
Original commit message from CVS:
Added state change code.
Added/updated docs.
Added sink base class, make fakesink extend the base class.
Small cleanups in GstPipeline.
2005-03-28 14:54:33 +00:00
Ronald S. Bultje 8eb4bb6a51 gst/gstbin.c: Add default event/set_manager handlers. The set_manager handler takes care that the manager is distribu...
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_class_init), (gst_bin_set_manager),
(gst_bin_send_event):
Add default event/set_manager handlers. The set_manager handler
takes care that the manager is distributed over kids that were
already in the bin before the manager was set. The event handler
is a utility virtual function that sends the event over all sinks,
so that gst_element_send_event (bin, event); has the expected
behaviour.
* gst/gstpad.c: (gst_pad_event_default):
Re-install default event handling for discontinuities, so that
seeking works without requiring hacks in applications or extra
code in sinks.
* gst/gstpipeline.c: (gst_pipeline_class_init),
(gst_pipeline_send_event):
Half hack, half utility: set a pipeline to PAUSED for seek events,
since that is the only way we can guarantee a/v sync. Means that
you can do gst_element_seek (pipeline, method, pos); on a pipeline
and it "just works".
2005-03-25 09:57:42 +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 e82e7b604a Fix _pad_get_direction wrt ghostpads.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_get_direction),
(_gst_pad_default_fixate_foreach), (gst_pad_collectv),
(gst_pad_collect_valist):
* testsuite/bins/interface.c: (main):
* testsuite/caps/audioscale.c: (test_caps):
* testsuite/caps/caps.c: (test1), (test2), (test3):
* testsuite/caps/deserialize.c: (main):
* testsuite/caps/enumcaps.c: (main):
* testsuite/caps/filtercaps.c: (main):
* testsuite/caps/intersect2.c: (main):
* testsuite/caps/random.c: (main):
* testsuite/caps/renegotiate.c: (my_fixate), (main):
* testsuite/caps/sets.c: (check_caps):
* testsuite/caps/simplify.c: (check_caps), (main):
* testsuite/caps/subtract.c: (check_caps):
Fix _pad_get_direction wrt ghostpads.
Fix caps testsuite.
2005-03-09 17:28:52 +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 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
Thomas Vander Stichele 0080630b1a unref data when probe function returns FALSE. Fixes #166362
Original commit message from CVS:
unref data when probe function returns FALSE.  Fixes #166362
2005-02-07 15:39:40 +00:00
Ronald S. Bultje 77bf6d8c0f gst/gstbin.c: Remove a piece of code that could never be reached.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_child_state_change_func):
Remove a piece of code that could never be reached.
* docs/gst/gstreamer-sections.txt:
* gst/gstpad.c: (gst_pad_push), (gst_pad_pull),
(gst_pad_call_get_function):
* gst/gstpad.h:
* testsuite/pad/Makefile.am:
Fix #150546, enable tests.
2005-01-31 17:39:31 +00:00
Ronald S. Bultje f861881c6c gst/gstpad.c: Oops, revert previous commit, broke testsuite...
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_push):
Oops, revert previous commit, broke testsuite...
2005-01-29 17:32:15 +00:00
Ronald S. Bultje d8e67497f9 gst/gstpad.c: Add check that the pad on which the push is performed is not a get-based pad (#150546).
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_push):
Add check that the pad on which the push is performed is not a
get-based pad (#150546).
2005-01-29 13:38:44 +00:00
Ronald S. Bultje 28f58530fe Add gst_pad_set_active_recursive().
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/gstpad.sgml:
* gst/gstpad.c: (gst_pad_set_active_recursive):
* gst/gstpad.h:
Add gst_pad_set_active_recursive().
2005-01-11 00:40:13 +00:00
Ronald S. Bultje df7ac68e78 gst/gstpad.c: Do query on realized pad, similar to how convert/send_event handle this. Also makes sense, since this p...
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_query):
Do query on realized pad, similar to how convert/send_event handle
this. Also makes sense, since this pad belongs to the function to
which this query will be sent. Fixes #158163.
2004-12-16 23:44:34 +00:00
David Schleef 7569c4e6ee gst/gstpad.c: Allow caps to be NULL (bug #160220).
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_set_explicit_caps): Allow caps to
be NULL (bug #160220).
2004-12-14 06:25:25 +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
Benjamin Otte bb7d6621fd gst/gstelement.c: simplify
Original commit message from CVS:
* gst/gstelement.c: (gst_element_dispose):
simplify
* gst/gstpad.c: (gst_pad_call_chain_function):
don't create loads of events due to bad macro usage
2004-04-17 03:26:46 +00:00
David Schleef ac0fd9c5bf gst/: (_gst_value_initialize): Create a new function gst_type_is_fixed() to indicate types that are fixed wrt caps or...
Original commit message from CVS:
* gst/gstcaps.c: (gst_caps_is_fixed_foreach):
* gst/gstpad.c: (_gst_pad_default_fixate_foreach):
* gst/gstvalue.c: (gst_value_serialize_buffer),
(gst_value_deserialize_buffer), (gst_type_is_fixed),
(_gst_value_initialize): Create a new function gst_type_is_fixed()
to indicate types that are fixed wrt caps or not.  Switching to
this function fixes (bug #140298).
* gst/gstvalue.h:
2004-04-17 02:21:54 +00:00
Benjamin Otte 266cff34c7 gst/gstpad.c: implement enforcing discont events before buffers are passed. This allows state changes of only some el...
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_link_new),
(gst_pad_link_free), (gst_pad_link_try), (_invent_event),
(gst_pad_pull):
implement enforcing discont events before buffers are passed. This
allows state changes of only some elements and later correctly going
on where they left off (or in short: you can now set audio sinks to
NULL to release the device when the pipeline is paused)
* gst/gstpad.c: (gst_pad_call_chain_function),
(gst_pad_call_get_function):
* gst/gstpad.h:
add gst_pad_call_chain_function and gst_pad_call_get_function for
scheduler interaction. They are required because of the changes
above.
* gst/schedulers/entryscheduler.c: (get_buffer),
(gst_entry_scheduler_chain_wrapper),
(gst_entry_scheduler_get_wrapper),
(gst_entry_scheduler_state_transition),
(gst_entry_scheduler_pad_link):
* gst/schedulers/gstbasicscheduler.c:
(gst_basic_scheduler_chain_wrapper),
(gst_basic_scheduler_src_wrapper),
(gst_basic_scheduler_chainhandler_proxy),
(gst_basic_scheduler_gethandler_proxy),
(gst_basic_scheduler_cothreaded_chain),
(gst_basic_scheduler_chain_elements):
* gst/schedulers/gstoptimalscheduler.c:
(get_group_schedule_function), (pad_clear_queued),
(gst_opt_scheduler_pad_link):
use the new functions instead of calling get/chain-functions
directly.
2004-04-16 01:36:37 +00:00
David Schleef 26663bbf1c gst/gstbuffer.c: (gst_buffer_free_chunk): Added gst_buffer_get_type() and changed to using it.
Original commit message from CVS:
* gst/gstbuffer.c: (_gst_buffer_initialize), (gst_buffer_get_type),
(gst_buffer_free_chunk): Added gst_buffer_get_type() and changed
to using it.
* gst/gstbuffer.h: Changed GST_BUFFER_TYPE to gst_buffer_get_type()
* gst/gstcaps.c: (gst_caps_is_fixed_foreach): Buffer is a fixed type
* gst/gstpad.c: (_gst_pad_default_fixate_foreach): same
* gst/gststructure.c: (gst_structure_set_valist),
(gst_structure_from_abbr), (gst_structure_to_abbr): Add vararg
support for buffers.
* gst/gsttag.c: (gst_tag_register): Constify a prototype that was
intended to be const.
* gst/gsttag.h: same
* gst/gstvalue.c: (gst_value_serialize_buffer),
(gst_value_deserialize_buffer), (_gst_value_initialize):  Add code
to (de)serialize buffers.
* testsuite/caps/Makefile.am:  Add a bit of buffer testing
* testsuite/caps/string-conversions.c: (main):
* testsuite/caps/value_serialize.c: add new test
2004-04-13 02:22:02 +00:00
Benjamin Otte 3147797afb gst/: don't use memchunks for these objects, use malloc instead
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_get_type):
* gst/gstclock.c: (gst_clock_get_type):
* gst/gstindex.c: (gst_index_get_type):
* gst/gstobject.c: (gst_object_get_type),
(gst_signal_object_get_type):
* gst/gstpad.c: (gst_pad_get_type), (gst_real_pad_get_type),
(gst_pad_template_get_type), (gst_ghost_pad_get_type):
* gst/gstpluginfeature.c: (gst_plugin_feature_get_type):
* gst/gstqueue.c: (gst_queue_get_type):
* gst/gstregistry.c: (gst_registry_get_type):
* gst/gstsystemclock.c: (gst_system_clock_get_type):
* gst/gstthread.c: (gst_thread_get_type):
don't use memchunks for these objects, use malloc instead
2004-04-09 19:05:03 +00:00
Thomas Vander Stichele 4e2a0b01e9 better debug info
Original commit message from CVS:
better debug info
2004-04-07 10:42:16 +00:00
Benjamin Otte 6e56b1be99 gst/elements/gstbufferstore.c: when the buffer is complete, don't check if other buffers are needed
Original commit message from CVS:
* gst/elements/gstbufferstore.c: (gst_buffer_store_get_buffer):
when the buffer is complete, don't check if other buffers are needed
* gst/elements/gstfilesrc.c: (gst_filesrc_srcpad_event):
check that the offset is >0 so we don't try to read before the
beginning of the file
* gst/gstpad.c: (gst_pad_set_pad_template):
sink the template, so we don't end up with 130k pad templates
2004-04-06 23:46:37 +00:00
Benjamin Otte dad31c5578 gst/gstpad.c: fix uninitialized variable warning
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_collect_valist):
fix uninitialized variable warning
* gst/schedulers/entryscheduler.c: (schedule_forward):
fix shadowed variable
2004-04-04 03:02:43 +00:00
Benjamin Otte ac5674b03b gst/: implement gst_pad_collect as replacement for gst_pad_select.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_collect_array), (gst_pad_collectv),
(gst_pad_collect), (gst_pad_collect_valist), (gst_pad_selectv),
(gst_pad_select):
* gst/gstpad.h:
* gst/gstscheduler.c: (gst_scheduler_pad_select),
(gst_scheduler_lock_element), (gst_scheduler_unlock_element):
* gst/gstscheduler.h:
implement gst_pad_collect as replacement for gst_pad_select.
deprecate gst_pad_select and gst_scheduler_(un)lock_element
add new flag GST_SCHEDULER_FLAG_NEW_API for API that implements the
new pad_select, lock and unlock calls.
* gst/cothreads.c: (cothread_destroy), (cothread_switch):
* gst/cothreads.h:
* gst/schedulers/cothreads_compat.h:
* gst/schedulers/gthread-cothreads.h:
remove unused cothread_lock and cothread_unlock calls
* gst/schedulers/entryscheduler.c:
(gst_entry_scheduler_class_init), (gst_entry_scheduler_init),
(_can_schedule_loop), (gst_entry_scheduler_get_handler),
(gst_entry_scheduler_pad_select):
update to new API
* gst/schedulers/gstbasicscheduler.c:
(gst_basic_scheduler_class_init), (gst_basic_scheduler_init),
(gst_basic_scheduler_pad_select):
remove useless lock and unlock calls, update pad_select to new API
(untested)
* gst/schedulers/gstoptimalscheduler.c:
(gst_opt_scheduler_class_init):
remove useless select, lock and unlock function calls
* gst/elements/gstaggregator.c: (gst_aggregator_loop):
use gst_pad_collect instead of gst_pad_select
2004-04-04 02:36:12 +00:00
Thomas Vander Stichele 456bfef89d some more debuggin
Original commit message from CVS:
some more debuggin
2004-04-01 13:20:52 +00:00
Thomas Vander Stichele 0a602d04e0 more doc fixes
Original commit message from CVS:
more doc fixes
2004-03-30 09:15:47 +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
Benjamin Otte 097dc18c80 gst/gstpad.c: print caps in debugging output when setting caps failed
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_set_explicit_caps):
print caps in debugging output when setting caps failed
* gst/schedulers/entryscheduler.c: (COTHREADS_TYPE),
(schedule_next_element), (get_buffer), (run_chainhandler),
(element_may_start), (gst_entry_scheduler_chain_handler),
(gst_entry_scheduler_get_handler),
(gst_entry_scheduler_state_transition),
(gst_entry_scheduler_pad_link):
make this scheduler a testcase for mandatory
discont-before-first-buffer which is needed if we want to allow apps
to release the sound device.
add SCHED_ASSERT macro to print scheduler state before an assertion
triggers.
2004-03-29 16:20:45 +00:00
Thomas Vander Stichele 7baa6c18e7 don't mix tabs and spaces
Original commit message from CVS:
don't mix tabs and spaces
2004-03-15 19:27:17 +00:00
Thomas Vander Stichele a967370df5 gst-indent run on core
Original commit message from CVS:
gst-indent run on core
2004-03-13 15:27:01 +00:00
Thomas Vander Stichele 27d587b023 better debug info
Original commit message from CVS:
better debug info
2004-03-09 13:23:14 +00:00
Thomas Vander Stichele 083e451238 more debugging
Original commit message from CVS:
more debugging
2004-03-08 17:47:52 +00:00
Thomas Vander Stichele 53bd79574d remove \n
Original commit message from CVS:
remove \n
2004-03-08 17:13:35 +00:00
Thomas Vander Stichele 97f89b5365 make signals use dashes in the names
Original commit message from CVS:
make signals use dashes in the names
2004-03-04 20:06:02 +00:00
Andy Wingo bc13ad8a9e gst/gstpad.c (gst_pad_link_prepare): Re-add gst_pad_link_prepare. Please email the list with specific reasons for rev...
Original commit message from CVS:
2004-02-25  Andy Wingo  <wingo@pobox.com>

* gst/gstpad.c (gst_pad_link_prepare): Re-add
gst_pad_link_prepare. Please email the list with specific reasons
for reverting.

----------------------------------------------------------------------
2004-02-25 14:16:24 +00:00
Andy Wingo 3f5a8814d5 gst/gstelement.c (gst_element_dispose): Protect against multiple invocations.
Original commit message from CVS:
2004-02-24  Andy Wingo  <wingo@pobox.com>

* gst/gstelement.c (gst_element_dispose): Protect against multiple
invocations.

* gst/schedulers/gstoptimalscheduler.c
I added a mess of prototypes at the top of the file by way of
documentation. Some of the operations on chains and groups were
re-organized.

(create_group): Added a type argument so if the group is enabled,
the setup_group_scheduler knows what to do.
(group_elements): Added a type argument here, too, to be passed on
to create_group.
(group_element_set_enabled): If an unlinked PLAYING element is
added to a bin, we have to create a new group to hold the element,
and this function will be called before the group is added to the
chain. Thus we have a valid case for group->chain==NULL. Instead
of calling chain_group_set_enabled, just set the flag on the group
(the chain's status will be set when the group is added to it).
(gst_opt_scheduler_state_transition, chain_group_set_enabled):
Setup the group scheduler when the group is enabled, not
specifically when an element goes PAUSED->PLAYING. This means
PLAYING elements can be added, linked, and scheduled into a
PLAYING pipeline, as was intended.
(add_to_group): Don't ref the group twice. I don't know when this
double-ref got in here. Removing it has the potential to cause
segfaults if other parts of the scheduler are buggy. If you find
that the scheduler is segfaulting for you, put in an extra ref
here and see if that hacks over the underlying issue. Of course,
then find out what code is unreffing a group it doesn't own...
(create_group): Make the extra refcount floating, and remove it
after adding the element. This means that...
(unref_group): Destroy when the refcount reaches 0, not 1, like
every other refcounted object in the known universe.
(remove_from_group): When a group becomes empty, set it to be not
active, and remove it from its chain. Don't unref it again,
there's no floating reference any more.
(destroy_group): We have to remove the group from the chain in
remove_from_group (rather than here) to break refcounting cycles
(the chain always has a ref on the group). So assert that
group->chain==NULL.
(ref_group_by_count): Removed, it was commented out anyway.
(merge_chains): Use the remove_from_chain and add_to_chain
primitives to do the reparenting, instead of rolling our own
implementation.
(add_to_chain): The first non-disabled group in the chain's group
list will be the entry point for the chain. Because buffers can
accumulate in loop elements' peer bufpens, we preferentially
schedule loop groups before get groups to avoid unnecessary
execution of get-based groups when the bufpens are already full.
(gst_opt_scheduler_schedule_run_queue): Debug fixes.
(get_group_schedule_function): Ditto.
(loop_group_schedule_function): Ditto.
(gst_opt_scheduler_loop_wrapper): Ditto.
(gst_opt_scheduler_iterate): Ditto.

I understand the opt scheduler now, yippee!

* gst/gstpad.c: All throughout, added FIXMEs to look at for 0.9.
(gst_pad_get_name, gst_pad_set_chain_function)
(gst_pad_set_get_function, gst_pad_set_event_function)
(gst_pad_set_event_mask_function, gst_pad_get_event_masks)
(gst_pad_get_event_masks_default, gst_pad_set_convert_function)
(gst_pad_set_query_function, gst_pad_get_query_types)
(gst_pad_get_query_types_default)
(gst_pad_set_internal_link_function)
(gst_pad_set_formats_function, gst_pad_set_link_function)
(gst_pad_set_fixate_function, gst_pad_set_getcaps_function)
(gst_pad_set_bufferalloc_function, gst_pad_unlink)
(gst_pad_renegotiate, gst_pad_set_parent, gst_pad_get_parent)
(gst_pad_add_ghost_pad, gst_pad_proxy_getcaps)
(gst_pad_proxy_pad_link, gst_pad_proxy_fixate)
(gst_pad_get_pad_template_caps, gst_pad_check_compatibility)
(gst_pad_get_peer, gst_pad_get_allowed_caps)
(gst_pad_alloc_buffer, gst_pad_push, gst_pad_pull)
(gst_pad_selectv, gst_pad_select, gst_pad_template_get_caps)
(gst_pad_event_default_dispatch, gst_pad_event_default)
(gst_pad_dispatcher, gst_pad_send_event, gst_pad_convert_default)
(gst_pad_convert, gst_pad_query_default, gst_pad_query)
(gst_pad_get_formats_default, gst_pad_get_formats): Better
argument checks, and some doc fixes.

(gst_pad_custom_new_from_template): Um, does anyone
use these functions? Actually make a custom pad instead of a
normal one.
(gst_pad_try_set_caps): Transpose some checks.
(gst_pad_try_set_caps_nonfixed): Same, and use a macro to check if
the pad is in negotiation.
(gst_pad_try_relink_filtered): Use pad_link_prepare.

* gst/gstelement.c: Remove prototypes also defined in gstclock.h.

* gst/gstelement.h:
* gst/gstclock.h: Un-deprecate the old clocking API, as discussed
on the list.
2004-02-25 13:16:12 +00:00
Thomas Vander Stichele 79f5d87041 better debugging
Original commit message from CVS:
better debugging
2004-02-25 10:01:31 +00:00
Benjamin Otte 5a34cd92ed gst/gstpad.c: revert last patch from Andy, it makes gst_pad_can_link_filtered much too noisy
Original commit message from CVS:
2004-02-22  Benjamin Otte  <otte@gnome.org>

* gst/gstpad.c:
revert last patch from Andy, it makes gst_pad_can_link_filtered much
too noisy
* gst/gsttag.c: (_gst_tag_initialize):
* gst/gsttag.h:
add GST_TAG_ALBUM_VOLUME_{COUNT,NUMBER}
* libs/gst/control/dparam.c: (gst_dparam_attach):
* libs/gst/control/dparammanager.c: (gst_dpman_attach_dparam):
check that types for attached dparams match
2004-02-22 15:09:20 +00:00
Andy Wingo cded585aa2 gst/: Debugging tweaks.
Original commit message from CVS:
2004-02-20  Andy Wingo  <wingo@pobox.com>

* gst/gstbin.c:
* gst/gstbuffer.c:
* gst/gstplugin.c:
* gst/registries/gstxmlregistry.c:
* gst/schedulers/gstoptimalscheduler.c: Debugging tweaks.

* gst/gstelement.c (gst_element_set_scheduler): Debugging fixes.
(gst_element_add_pad): DEBUG->INFO, some fixes.
(gst_element_get_compatible_pad_template): Just see if the
templates' caps intersect, not if one is a strict subset of the
other. This conforms more to what gst_pad_link_intersect() does.
(gst_element_class_add_pad_template): Don't memcpy the pad
template, just ref it.
(gst_element_get_compatible_pad_filtered): Clean up debug messages

* gst/gstpad.c (gst_pad_can_link_filtered): Debug a true result.
(gst_pad_link_filtered): Debug changes.
(gst_pad_link_prepare): New function, consolidated from
can_link_filtered and link_filtered.

* gst/parse/grammar.y (gst_parse_perform_link): Made INFO output
look more like that of the functions in gstelement.c

* gst/gstinfo.c (gst_debug_print_object): Put a space before the
object, and return the empty string if object is NULL.

* gst/parse/parse.l: Remove trailing newlines when calling PRINT.
* gst/parse/grammar.y (YYFPRINTF): Log bison debugging info via
LOG, not DEBUG. We still get flex info on debug.

* gst/registries/gstxmlregistry.c (gst_xml_registry_load): Make
debug string more verbose.
(plugin_times_older_than): DEBUG->LOG.
2004-02-20 13:18:32 +00:00
David Schleef 67455089a4 gst/elements/gstmultifilesrc.c: Use G_TYPE_STRING in signal prototype instead of G_TYPE_POINTER.
Original commit message from CVS:
* gst/elements/gstmultifilesrc.c: (gst_multifilesrc_class_init):
Use G_TYPE_STRING in signal prototype instead of G_TYPE_POINTER.
* gst/elements/gsttypefind.c: (gst_type_find_element_class_init):
Use GST_TYPE_CAPS in signal prototype.
* gst/gstcaps.c: (_gst_caps_initialize), (gst_caps_copy_conditional):
Convert GST_TYPE_CAPS to boxed.
* gst/gstelement.c: (gst_element_class_init):
Use GST_TYPE_TAG_LIST in signal prototype.
* gst/gstindex.c: (gst_index_class_init):
* gst/gstindex.h:
Add GST_TYPE_INDEX_ENTRY type.
* gst/gstmarshal.list:
Add necessary marshal types.
* gst/gstpad.c: (gst_real_pad_class_init),
(_gst_real_pad_fixate_accumulator), (gst_pad_link_fixate),
(gst_pad_recover_caps_error):
Use GST_TYPE_CAPS in signal prototypes.  Fix some debugging strings.
* gst/gststructure.c: (_gst_structure_initialize),
(gst_structure_copy), (_gst_structure_copy_conditional):
* gst/gststructure.h:
Convert GST_TYPE_STRUCTURE to boxed.
* gst/gsttag.c: (gst_tag_list_get_type):
* gst/gsttag.h:
Add GST_TYPE_TAG_LIST type.
2004-02-18 05:26:59 +00:00
Julien Moutte 6aeaab9643 gst/gstpad.c: Reverting my change according to what we agreed with david.
Original commit message from CVS:
2004-02-17  Julien MOUTTE  <julien@moutte.net>

* gst/gstpad.c: (gst_pad_try_set_caps): Reverting my change according
to what we agreed with david.
* gst/gstpad.h: adding GST_PAD_IS_NEGOTIATING macro.
2004-02-17 22:55:26 +00:00
Julien Moutte 47a11ddf79 gst/gstpad.c: We are nice people. Return silently when the pad is negotiating.
Original commit message from CVS:
2004-02-17  Julien MOUTTE  <julien@moutte.net>

* gst/gstpad.c: (gst_pad_try_set_caps): We are nice people. Return
silently when the pad is negotiating.
2004-02-16 23:40:32 +00:00
Andy Wingo d0c8e3a921 gst/gstpad.c (gst_pad_custom_new): Add a FIXME, this is a hacky way to do inheritance.
Original commit message from CVS:
2004-02-10  Andy Wingo  <wingo@pobox.com>

* gst/gstpad.c (gst_pad_custom_new): Add a FIXME, this is a hacky
way to do inheritance.
(gst_pad_get_event_masks, gst_pad_get_event_masks_default)
(gst_pad_get_query_types, gst_pad_get_query_types_default):
Routine docs.
(gst_pad_set_link_function, gst_pad_set_fixate_function)
(gst_pad_set_getcaps_function): Doc from Dave's negotation random
doc.
(gst_pad_unlink, gst_pad_is_linked): Docs.
(gst_pad_renegotiate): A brief description of capsnego.
(gst_pad_try_set_caps): Document.
(gst_pad_try_set_caps_nonfixed): Document.
(gst_pad_can_link_filtered, gst_pad_link_filtered): Doc fixes.
(gst_pad_set_parent): Deprecated (although not out of the API).
(gst_pad_get_parent): Deprecated, although many plugins use this.
(gst_pad_add_ghost_pad, gst_pad_remove_ghost_pad): Doc that these
are private and will go away in 0.9.
(gst_pad_perform_negotiate): Doc.
(gst_pad_link_unnegotiate): I think this is meant to be static.
(gst_pad_get_negotiated_caps, gst_pad_get_pad_template_caps)
(gst_pad_template_get_caps_by_name, gst_pad_check_compatibility)
(gst_pad_get_peer): Doc updates.
(gst_pad_caps_change_notify): Doc.
(gst_pad_alloc_buffer, gst_pad_push, gst_static_pad_template_get)
(gst_ghost_pad_new): Doc fixes.

* gst/gstobject.c (gst_object_get_parent, gst_object_unparent)
(gst_object_check_uniqueness):

* gst/gstelement.c (gst_element_add_pad)
(gst_element_add_ghost_pad, gst_element_remove_pad)
(gst_element_remove_ghost_pad, gst_element_get_pad)
(gst_element_get_static_pad, gst_element_get_pad_list)
(gst_element_class_get_pad_template_list)
(gst_element_class_get_pad_template): Work on the docs.
(gst_element_get_pad_template_list): Uses the class method.
(gst_element_get_compatible_pad_template): Docs, and consolidate
some test conditions.
(gst_element_get_pad_from_template): New static function.
(gst_element_request_compatible_pad): Docs, and work with
non-request compatible templates.
(gst_element_get_compatible_pad_filtered): Docs and remove
redundant checks.
(gst_element_get_compatible_pad, gst_element_link_pads_filtered)
(gst_element_link_filtered, gst_element_link_many)
(gst_element_link, gst_element_link_pads)
(gst_element_unlink_many): Docs.

2004-02-05  Andy Wingo  <wingo@pobox.com>

* gst/gstpad.c (_gst_real_pad_fixate_accumulator):
s/pointer/boxed/.

* gst/gstmarshal.list (VOID:BOXED, BOXED:BOXED): New marshallers.

* gst/gstpad.c (gst_real_pad_class_init): Use a BOXED:BOXED
marshaller for ::fixate, and VOID:BOXED for ::caps-nego-failed,
with the type=GST_TYPE_CAPS. This allows language bindings to know
what kind of data they're dealing with.

* gst/gstcaps.c (_gst_caps_value_init): GBoxed values initialize
to NULL when g_value_init is called. GstCaps, which rolls its own
type implementation, now does the same instead of allocating empty
caps.
(_gst_caps_initialize, _gst_caps_collect_value,
_gst_caps_lcopy_value): Provide collect_value and lcopy_value type
table methods. This allows G_VALUE_COLLECT to work.

2004-02-05  Andy Wingo  <wingo@pobox.com>

* configure.ac:
* testsuite/Makefile.am (SUBDIRS):
* testsuite/ghostpads/Makefile.am:
* testsuite/ghostpads/ghostpads.c: A new test for ghost pads.

* gst/gstpad.c (gst_pad_add_ghost_pad, gst_pad_remove_ghost_pad):
These two routines are the only ones that set
GST_GPAD_REALPAD(gpad), the ghost pad list, and the ghost pad's
pad template. They should be made static, depending on ABI needs.
(gst_real_pad_dispose): Handle the case of ghost pads without a
parent. Assert after dealing with ghost pads that the ghost pad
list is empty.
(gst_ghost_pad_class_init): New property added, ::real-pad. Can be
set after creation.
(gst_ghost_pad_dispose): Set ::real-pad to NULL.
(gst_ghost_pad_set_property, gst_ghost_pad_get_property): New
functions. set_property will call add_ghost_pad/remove_ghost_pad
as appropriate.
(gst_ghost_pad_new): All the work is offloaded to g_object_new.

* gst/gstelement.c (gst_element_add_pad): Handle ghost pads as well.
(gst_element_add_ghost_pad): Remove code duplicated from _add_pad.
(gst_element_remove_pad): Handle ghost pads as well.
(gst_element_remove_ghost_pad): Deprecated (could be removed,
depending on API-stability needs).

2004-02-05  Andy Wingo  <wingo@pobox.com>

* gst/gstbin.[ch]: (gst_bin_get_by_interface): GTypes are scalars,
of course they're const
2004-02-11 13:26:04 +00:00
David Schleef 4d762b1504 gst/gstpad.c: Fix format strings for GST_PTR_FORMAT.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_link_intersect), (gst_pad_link_fixate),
(gst_pad_try_set_caps): Fix format strings for GST_PTR_FORMAT.
2004-02-11 08:28:54 +00:00
Benjamin Otte f3c9c3493d gst/: put reverted patch back in
Original commit message from CVS:
2004-02-06  Benjamin Otte  <in7y118@public.uni-hamburg.de>

* gst/gstcaps.h:
* gst/gstelement.c: (gst_element_base_class_init),
(gst_element_class_set_details), (gst_element_clear_pad_caps):
* gst/gstpad.c: (gst_pad_link_intersect), (gst_pad_link_fixate),
(gst_pad_try_set_caps), (gst_pad_can_link_filtered),
(gst_real_pad_dispose):
* gst/gststructure.c: (gst_structure_free),
(gst_structure_from_string):
put reverted patch back in
* gst/gstelement.c: (gst_element_remove_pad):
free explicit caps if they're set
* gst/gstpad.c: (_gst_pad_default_fixate_func):
copy the structure when fixating
2004-02-05 23:46:13 +00:00
David Schleef ec7cb937da gst/: Revert POINTER->BOXED change in signal marshaller.
Original commit message from CVS:
* gst/gstmarshal.list:
* gst/gstpad.c: (gst_real_pad_class_init),
(_gst_real_pad_fixate_accumulator):
Revert POINTER->BOXED change in signal marshaller.
2004-02-05 18:59:42 +00:00