Commit graph

52 commits

Author SHA1 Message Date
Tim-Philipp Müller 0ef9a5f5b1 Makefile.am: Add check-exports target and run it as part of 'make check' (see #499140 and #493983).
Original commit message from CVS:
* Makefile.am:
Add check-exports target and run it as part of 'make check'
(see #499140 and #493983).
* gst/gst_private.h:
* gst/gstelementfactory.h:
* gst/gstghostpad.c: (gst_proxy_pad_class_init):
* gst/gstinfo.c: (_priv_gst_in_valgrind), (_gst_debug_init),
(_priv_gst_in_valgrind):
* gst/gstinfo.h: (GstLogFunction):
* gst/gsttypefind.c: (type_find_debug), (GST_CAT_DEFAULT),
(gst_type_find_register):
* gst/gsttypefindfactory.c: (type_find_debug), (GST_CAT_DEFAULT),
(gst_type_find_factory_get_type):
* libs/gst/controller/gstcontroller.c: (GST_CAT_DEFAULT),
(GST_CAT_DEFAULT), (parent_class), (priv_gst_controller_key),
(gst_controller_new_valist), (gst_controller_new_list),
(_gst_controller_dispose), (_gst_controller_class_init):
* libs/gst/controller/gstcontrolsource.c: (GST_CAT_DEFAULT):
* libs/gst/controller/gsthelper.c: (GST_CAT_DEFAULT),
(GST_CAT_DEFAULT), (gst_object_uncontrol_properties),
(gst_object_get_controller), (gst_object_set_controller),
(gst_object_suggest_next_sync), (gst_object_sync_values),
(gst_object_set_control_source), (gst_object_get_control_source),
(gst_object_get_value_arrays), (gst_object_get_value_array),
(gst_object_get_control_rate), (gst_object_set_control_rate):
* libs/gst/controller/gstinterpolation.c: (GST_CAT_DEFAULT):
* libs/gst/controller/lib.c: (GST_CAT_DEFAULT):
Make some functions that should be static static; rename some
private symbols so that they don't get exported; add some FIXME
comments so we can move accidentally exported functions into
our private section in 0.11.
* win32/common/libgstreamer.def:
Add gst_utils_get_timestamp().
2007-12-12 23:20:00 +00:00
Étienne Noreau-Hébert 8aff242e77 gst/gstghostpad.c: Add peer and direction in the XML serialisation of ghostpads.
Original commit message from CVS:
Patch by: Étienne Noreau-Hébert <etienne at deepunder dot org>
* gst/gstghostpad.c: (gst_proxy_pad_save_thyself):
Add peer and direction in the XML serialisation of ghostpads.
Fixes #449226.
2007-06-27 09:34:01 +00:00
Wim Taymans 60212ff197 Make the ghostpad a parent of the internal pad again for better backward compatibility. Don't write code that relies ...
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
* gst/gstghostpad.c: (gst_ghost_pad_dispose),
(gst_ghost_pad_new_full):
Make the ghostpad a parent of the internal pad again for better backward
compatibility. Don't write code that relies on this however.
* gst/gstpad.c: (gst_pad_activate_pull), (gst_pad_activate_push),
(gst_pad_link_check_hierarchy):
Require that parents should be GstElements in the hierarchy check.
2007-02-20 18:02:50 +00:00
Wim Taymans d772c87442 Do not set the internal pad as a parent anymore so we can avoid hierarchy linking errors when the ghostpad has no par...
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
* gst/gstghostpad.c: (gst_ghost_pad_class_init),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_dispose),
(gst_ghost_pad_new_full), (gst_ghost_pad_set_target):
Do not set the internal pad as a parent anymore so we can avoid
hierarchy linking errors when the ghostpad has no parent yet. This also
fixes failed activation because of unlinked internal pads, which in
turn fixes the impossible case where you have to activate a pad before
you can add it to a running element.
Also fix the docs.
* gst/gstpad.c: (pre_activate), (post_activate),
(gst_pad_set_active), (gst_pad_activate_pull),
(gst_pad_activate_push), (gst_pad_check_pull_range):
Add some more debug info.
Mark activation mode in pre_activate so that we don't try to activate in
endless loops. Fixes #385084.
2007-02-20 10:16:27 +00:00
Wim Taymans 1affbe8e9f gst/: Set pads to FLUSHING when they are created. Check, warn and fix when a demuxer adds an inactive pad to itself w...
Original commit message from CVS:
* gst/gstelement.c: (gst_element_add_pad):
* gst/gstghostpad.c: (gst_ghost_pad_new_full):
* gst/gstpad.c: (gst_pad_init):
Set pads to FLUSHING when they are created. Check, warn and fix when a
demuxer adds an inactive pad to itself when running. Fixes #339326.
2006-12-15 16:01:58 +00:00
Tim-Philipp Müller c8fcab5cf5 gst/gstghostpad.c: Log ghostpad debug stuff to the GST_PADS category as well rather than just to the default category.
Original commit message from CVS:
* gst/gstghostpad.c:
Log ghostpad debug stuff to the GST_PADS category as well rather
than just to the default category.
2006-12-13 11:05:20 +00:00
Wim Taymans 6dc97edc2f gst/gstghostpad.c: Make acceptcaps return TRUE when we don't have a target, just like setcaps does.
Original commit message from CVS:
* gst/gstghostpad.c: (gst_proxy_pad_do_acceptcaps),
(gst_ghost_pad_new_full):
Make acceptcaps return TRUE when we don't have a target, just like
setcaps does.
2006-10-27 16:31:15 +00:00
mrcgran bae90f5955 gst/gstghostpad.c: Filter the proxied caps against the padtemplate if we have one.
Original commit message from CVS:
Patch by: mrcgran <mrc.gran at gmail dot com>
* gst/gstghostpad.c: (gst_proxy_pad_do_getcaps):
Filter the proxied caps against the padtemplate if we have one.
* gst/gstquery.c: (gst_query_new_segment):
Add include for gstinfo.h so that compilation with
-DGST_DISABLE_GST_DEBUG works again. Fixes #358436.
2006-10-02 10:06:17 +00:00
Tim-Philipp Müller 3d9910ecb9 gst/gstghostpad.c: Don't forget to release proxy lock when there's an error.
Original commit message from CVS:
* gst/gstghostpad.c: (gst_ghost_pad_set_target):
Don't forget to release proxy lock when there's an error.
2006-09-22 10:17:15 +00:00
Wim Taymans 2c5cdfe01f gst/gstghostpad.c: Also set template on the internal pad so that a getcaps from the target pad returns the template c...
Original commit message from CVS:
* gst/gstghostpad.c: (gst_ghost_pad_new_full):
Also set template on the internal pad so that a getcaps from the target
pad returns the template caps.
2006-09-18 13:56:26 +00:00
Wim Taymans 1b623c3230 gst/gstghostpad.c: More cleanups.
Original commit message from CVS:
* gst/gstghostpad.c: (gst_proxy_pad_do_event),
(gst_proxy_pad_do_bufferalloc), (gst_proxy_pad_do_chain),
(gst_proxy_pad_do_getrange), (gst_proxy_pad_do_checkgetrange),
(gst_proxy_pad_set_target_unlocked), (gst_ghost_pad_parent_set),
(gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_init), (gst_ghost_pad_dispose),
(gst_ghost_pad_new_full), (gst_ghost_pad_new_no_target),
(gst_ghost_pad_new), (gst_ghost_pad_new_from_template),
(gst_ghost_pad_new_no_target_from_template),
(gst_ghost_pad_get_target), (gst_ghost_pad_set_target):
More cleanups.
Avoid needless typechecking in macros.
Since the internal pad is always present and never changes, there is
no need to locking or ref when retrieving it.
Improve debugging a bit.
Handle link errors when setting the target. Fixes #341029.
2006-09-01 10:33:03 +00:00
Wim Taymans 47e5ba2f15 docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
Edward Hervey ce6e126d47 Refactored *_new() functions.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstghostpad.c: (gst_proxy_pad_do_getcaps),
(gst_proxy_pad_do_setcaps), (gst_proxy_pad_set_target_unlocked),
(gst_proxy_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_new_no_target), (gst_ghost_pad_new),
(gst_ghost_pad_new_from_template),
(gst_ghost_pad_new_no_target_from_template):
* gst/gstghostpad.h:
Refactored *_new() functions.
Templates are now used as a g_object_new() parameter.
Use template in _do_getcaps() if we don't have a target.
Small documentation cleanups.
Added two new constructors:
gst_ghost_pad_new_from_template()
gst_ghost_pad_new_no_target_from_template()
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Added tests for new ghostpad instanciation functions.
API additions: gst_ghost_pad_new_from_template,
gst_ghost_pad_new_no_target_from_template
2006-08-31 10:59:11 +00:00
Edward Hervey 2d6d262e86 gst/gstghostpad.c: Unlinking from a pad without a target is now a perfectly valid case which should NOT raise an asse...
Original commit message from CVS:
* gst/gstghostpad.c: (gst_ghost_pad_do_unlink):
Unlinking from a pad without a target is now a perfectly valid case
which should NOT raise an assertion.
This case would happen if a linked ghostpad its target set to NULL after
it was previously linked.
2006-08-08 16:24:58 +00:00
Edward Hervey 2f9ca83c94 gst/gstghostpad.c: GhostPad no longer implicitely use the padtemplates of the targets.
Original commit message from CVS:
* gst/gstghostpad.c: (gst_proxy_pad_set_target_unlocked):
GhostPad no longer implicitely use the padtemplates of the targets.
Fixes #347384
2006-07-13 10:47:00 +00:00
Edward Hervey 4f9d5adb40 gst/gstbin.c: (de)activate src pads before calling state_change on the childs.
Original commit message from CVS:
* gst/gstbin.c: (activate_pads),
(iterator_activate_fold_with_resync), (gst_bin_src_pads_activate),
(gst_bin_change_state_func):
(de)activate src pads before calling state_change on the childs.
This is to avoid the case where a src ghostpad is blocked (holding the
stream lock), which would block the deactivation of the ghostpad's
target pad.
* gst/gstghostpad.c: (gst_proxy_pad_do_query_type),
(gst_proxy_pad_do_event), (gst_proxy_pad_do_query),
(gst_proxy_pad_do_internal_link), (gst_proxy_pad_do_bufferalloc),
(gst_proxy_pad_do_chain), (gst_proxy_pad_do_getrange),
(gst_proxy_pad_do_checkgetrange), (gst_proxy_pad_do_getcaps),
(gst_proxy_pad_do_acceptcaps), (gst_proxy_pad_do_fixatecaps),
(gst_proxy_pad_do_setcaps), (gst_proxy_pad_set_target_unlocked),
(gst_proxy_pad_set_target), (gst_proxy_pad_get_internal),
(gst_proxy_pad_dispose), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_class_init),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_no_target),
(gst_ghost_pad_new), (gst_ghost_pad_set_target):
GhostPads now create their internal GstProxyPad at creation (and not
when they're linked, as it was being done previously).
The internal and target pads are linked straight away.
The data will also travel through the other pad in order to make
pad blocking and probes non-hackish (the probe/block now really happens
on the GhostPad and not on the target).
* gst/gstpad.c: (gst_pad_set_blocked_async),
(gst_pad_link_prepare), (gst_pad_push_event):
Remove previous ghostpad cruft.
* 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):
Remove previous ghost pad cruft.
Added more detailed debug statements.
* tests/check/gst/gstghostpad.c: (GST_START_TEST):
Fix the testsuite for refcounting changes.
The comments about who has references were correct, but the refcount
being checked wasn't the same (!?!).
2006-07-11 16:20:09 +00:00
Maciej Katafiasz 2f67d7fc87 Small typo in docs (#340625)
Original commit message from CVS:
Small typo in docs (#340625)
2006-05-05 12:53:33 +00:00
Michael Smith 6c40c7595e gst/gstpad.c: Use g_value_get_object() instead of g_value_dup_gst_object(), to avoid double-reffing the pad template ...
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_set_property):
Use g_value_get_object() instead of g_value_dup_gst_object(),
to avoid double-reffing the pad template (which we then sink,
so this worked previously if (and only if) the pad template
was floating.

* gst/gstpadtemplate.c: (gst_pad_template_init),
(gst_pad_template_pad_created):
Never return floating references to pad templates, create
them as initially-sunken.

Document an extra function (and make this stop sinking our
pad template, since that is now guaranteed to do nothing,
since we created it sunken).

* gst/gstghostpad.c:
Fix docs typo.
2006-04-06 15:07:12 +00:00
Edward Hervey ac377b0cdc Series of fixes for dereferenced pointers that gcc 4.1 complains about.
Original commit message from CVS:
reviewed by: <delete if not using a buddy>
* gst/gstbin.c: (gst_bin_dispose), (gst_bin_provide_clock_func),
(gst_bin_handle_message_func):
* gst/gstclock.c: (gst_clock_dispose), (gst_clock_set_master):
* gst/gstelement.c: (gst_element_set_clock), (gst_element_dispose),
(gst_element_set_bus_func):
* gst/gstghostpad.c: (gst_proxy_pad_dispose):
* gst/gstminiobject.c: (gst_value_set_mini_object),
(gst_value_take_mini_object):
* gst/gstpad.c: (gst_pad_set_pad_template):
* gst/gstpipeline.c: (gst_pipeline_dispose),
(gst_pipeline_use_clock), (gst_pipeline_auto_clock):
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_pop),
(gst_collect_pads_chain):
* libs/gst/net/gstnettimeprovider.c:
(gst_net_time_provider_set_property):
Series of fixes for dereferenced pointers that gcc 4.1 complains about.
It's in fact all issues with gst_*object_replace().
2006-03-21 14:14:49 +00:00
Julien Moutte a365129ba7 gst/gstghostpad.c: Set pad functions unconditionally. Fixes #329105.
Original commit message from CVS:
2006-01-29  Julien MOUTTE  <julien@moutte.net>

* gst/gstghostpad.c: (gst_proxy_pad_set_target_unlocked):
Set pad functions unconditionally. Fixes #329105.
2006-01-29 17:37:08 +00:00
Thomas Vander Stichele 288f61d21f expand tabs
Original commit message from CVS:
expand tabs
2005-12-06 19:29:15 +00:00
Tim-Philipp Müller 696cf53af5 gst/gstghostpad.c: Don't ref NULL target pad (#322751). Improve docs.
Original commit message from CVS:
* gst/gstghostpad.c: (gst_proxy_pad_get_target):
Don't ref NULL target pad (#322751). Improve docs.
2005-11-29 13:10:38 +00:00
Andy Wingo 19858fd9f0 gst/gstevent.h (gst_event_new_new_segment) (gst_event_parse_new_segment, gst_event_new_buffer_size)
Original commit message from CVS:
2005-11-22  Andy Wingo  <wingo@pobox.com>

* gst/gstevent.h (gst_event_new_new_segment)
(gst_event_parse_new_segment, gst_event_new_buffer_size)
(gst_event_parse_buffer_size, gst_ghost_pad_new_no_target):
Renamed from *_newsegment, *_buffersize, *_notarget.

* scripts/update-funcnames: New script, performs the changes
listed above.
2005-11-22 11:48:58 +00:00
Andy Wingo 44c548b205 *.*: Ran scripts/update-macros. Oh yes. gst/gstobject.h (GST_OBJECT_GET_LOCK, GST_OBJECT_LOCK)
Original commit message from CVS:
2005-11-21  Andy Wingo  <wingo@pobox.com>

* *.h:
* *.c: Ran scripts/update-macros. Oh yes.

* gst/gstobject.h (GST_OBJECT_GET_LOCK, GST_OBJECT_LOCK)
(GST_OBJECT_TRYLOCK, GST_OBJECT_UNLOCK): Renamed from
GST_GET_LOCK, etc.

* scripts/update-macros: New script. Run it on your files to
change GST_LOCK to GST_OBJECT_LOCK, and the same for UNLOCK as
well.
2005-11-21 16:34:26 +00:00
Stefan Kost dff771f1b7 gst/: docs fixes
Original commit message from CVS:
* gst/gstcaps.c:
* gst/gstghostpad.c:
* gst/gsttrace.c:
* gst/gstvalue.c:
* gst/gstvalue.h:
docs fixes
2005-11-18 16:04:28 +00:00
Stefan Kost 1d176e0439 more section docs
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gsterror.c:
* gst/gstghostpad.c:
* gst/gstobject.h:
* gst/gstxml.c:
more section docs
2005-11-14 15:15:43 +00:00
Wim Taymans 8bf3884cbb check/gst/gstghostpad.c: Added check for bug #317341
Original commit message from CVS:
* check/gst/gstghostpad.c: (GST_START_TEST), (gst_ghost_pad_suite):
Added check for bug #317341

* gst/gstbuffer.c:
* gst/gstbuffer.h:
Some more spiffifying.

* gst/gstghostpad.c: (gst_ghost_pad_do_link):
Call peer linkfunction if we are a source pad. Totally fixes
#317341

* gst/gstpad.c:
Update docs, source pads should call the peer linkfunction
so they can atomically perform the pad link.
2005-11-10 09:19:12 +00:00
Tim-Philipp Müller fc387bfd46 gst/: Use GST_DEBUG_FUNCPTR() more extensively.
Original commit message from CVS:
* gst/base/gstcollectpads.c: (gst_collectpads_add_pad):
* gst/elements/gstfilesink.c: (gst_file_sink_init):
* gst/elements/gsttypefindelement.c: (gst_type_find_element_init):
* gst/gstghostpad.c: (gst_ghost_pad_set_internal),
(gst_ghost_pad_init), (gst_ghost_pad_new_notarget):
* gst/gstpad.c: (gst_pad_init):
Use GST_DEBUG_FUNCPTR() more extensively.
2005-11-09 17:55:13 +00:00
Thomas Vander Stichele bef56ce78d various style fixes
Original commit message from CVS:
various style fixes
2005-10-15 16:01:57 +00:00
Thomas Vander Stichele 2dd1598c56 whitespace fixes
Original commit message from CVS:
whitespace fixes
2005-10-15 15:30:24 +00:00
Wim Taymans 45867cc853 gst/gstghostpad.c: Activating a ghostpad with no internal pad in push mode is ok.
Original commit message from CVS:
* gst/gstghostpad.c: (gst_ghost_pad_get_internal),
(gst_ghost_pad_do_activate_push):
Activating a ghostpad with no internal pad in push mode
is ok.
2005-10-07 12:52:15 +00:00
Thomas Vander Stichele f22af4c0bb gst/gstghostpad.c: add push activation of sink ghost pads.
Original commit message from CVS:
2005-10-06  Thomas Vander Stichele  <thomas at apestaart dot org>

* gst/gstghostpad.c: (gst_ghost_pad_internal_do_activate_push):
add push activation of sink ghost pads.
Andye, please verify
2005-10-06 07:13:01 +00:00
Andy Wingo 9d28c696bd docs/design/part-gstghostpad.txt: Add a note about activation of proxy pads outside of ghost pads.
Original commit message from CVS:
2005-10-03  Andy Wingo  <wingo@pobox.com>

* docs/design/part-gstghostpad.txt: Add a note about activation of
proxy pads outside of ghost pads.

* gst/gstghostpad.c: Implement the ghost pad activation design.
2005-10-02 23:20:26 +00:00
Wim Taymans e32e0a17ed gst/gstbin.c: Make state change function use 3 queues again, we were adding elements in the wrong order.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_change_state):
Make state change function use 3 queues again, we were
adding elements in the wrong order.

* gst/gstghostpad.c: (gst_ghost_pad_do_unlink):
Some debug info,

* gst/gstpad.c: (gst_pad_dispose):
Added some debug info first.
2005-09-26 17:46:27 +00:00
Stefan Kost c253951dcd more docs inlined
Original commit message from CVS:
* docs/gst/gstreamer-docs.sgml:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstghostpad.sgml:
* docs/gst/tmpl/gstiterator.sgml:
* docs/gst/tmpl/gstmacros.sgml:
* docs/gst/tmpl/gstrealpad.sgml:
* docs/gst/tmpl/gstregistry.sgml:
* docs/gst/tmpl/gstregistrypool.sgml:
* docs/gst/tmpl/gststructure.sgml:
* docs/gst/tmpl/gstsystemclock.sgml:
* docs/gst/tmpl/gsttrace.sgml:
* gst/gstghostpad.c:
* gst/gstmacros.h:
* gst/gstmemchunk.c:
* gst/gstmemchunk.h:
* gst/gstqueue.c:
* gst/gstregistry.c:
* gst/gstregistrypool.c:
* gst/gststructure.c:
* gst/gstsystemclock.c:
more docs inlined
2005-09-02 16:17:23 +00:00
Wim Taymans 8513b4767e gst/gstghostpad.c: Actually implement (re)setting the target on a ghostpad as described in the docs.
Original commit message from CVS:
* gst/gstghostpad.c: (gst_proxy_pad_set_target_unlocked),
(gst_proxy_pad_set_target), (gst_proxy_pad_get_target),
(gst_proxy_pad_dispose), (gst_ghost_pad_do_activate_push),
(gst_ghost_pad_do_link), (gst_ghost_pad_set_internal),
(gst_ghost_pad_new_notarget), (gst_ghost_pad_get_target),
(gst_ghost_pad_set_target):
Actually implement (re)setting the target on a ghostpad
as described in the docs.
2005-08-11 14:24:58 +00:00
Wim Taymans afbe734024 check/gst/gstghostpad.c: Added test for removing an element with ghostpad from a bin.
Original commit message from CVS:
* check/gst/gstghostpad.c: (GST_START_TEST), (gst_ghost_pad_suite):
Added test for removing an element with ghostpad from a bin.
Fixed test as current implementation does the right thing.

* gst/gstghostpad.c: (gst_proxy_pad_class_init),
(gst_proxy_pad_do_query_type), (gst_proxy_pad_do_event),
(gst_proxy_pad_do_query), (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_do_bufferalloc), (gst_proxy_pad_do_activate),
(gst_proxy_pad_do_activatepull), (gst_proxy_pad_do_activatepush),
(gst_proxy_pad_do_chain), (gst_proxy_pad_do_getrange),
(gst_proxy_pad_do_checkgetrange), (gst_proxy_pad_do_getcaps),
(gst_proxy_pad_do_acceptcaps), (gst_proxy_pad_do_fixatecaps),
(gst_proxy_pad_do_setcaps), (gst_proxy_pad_set_target),
(gst_proxy_pad_get_target), (gst_proxy_pad_init),
(gst_proxy_pad_dispose), (gst_proxy_pad_finalize),
(gst_ghost_pad_class_init), (gst_ghost_pad_do_activate_push),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_set_internal), (gst_ghost_pad_dispose),
(gst_ghost_pad_new_notarget), (gst_ghost_pad_new),
(gst_ghost_pad_get_target), (gst_ghost_pad_set_target):
* gst/gstghostpad.h:
Clean up ghostpads, remove properties for internal stuff.
Make threadsafe.
Fix refcounting.
Prepare for switching targets, not all use cases work yet.
2005-07-29 19:22:28 +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 f89689b7e6 check/gst/gstbin.c: Make elements silent as the deep_notify refs the parent, which might make the test fail.
Original commit message from CVS:
* check/gst/gstbin.c: (GST_START_TEST):
Make elements silent as the deep_notify refs the
parent, which might make the test fail.

* gst/gstghostpad.c: (gst_ghost_pad_do_activate_push):
Don't hold the lock for too long.
2005-07-16 13:50:37 +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
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
Andy Wingo 6da6bc4530 gst/gstghostpad.c (gst_ghost_pad_do_activate_push): Proxy activate_push down to the internal pad as well.
Original commit message from CVS:
2005-06-30  Andy Wingo  <wingo@pobox.com>

* gst/gstghostpad.c (gst_ghost_pad_do_activate_push): Proxy
activate_push down to the internal pad as well.
2005-06-30 11:39:34 +00:00
Wim Taymans d0616cd459 gst/gstghostpad.c: Correctly proxy the check_pull_range function.
Original commit message from CVS:
* gst/gstghostpad.c: (gst_proxy_pad_do_bufferalloc),
(gst_proxy_pad_do_checkgetrange), (gst_proxy_pad_do_acceptcaps),
(gst_proxy_pad_do_fixatecaps):
Correctly proxy the check_pull_range function.
2005-06-28 13:40:12 +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 57d529de3a gst/gstghostpad.c: Call wrapper function instead of just calling the function pointers. This takes care of any lockin...
Original commit message from CVS:
* gst/gstghostpad.c: (gst_proxy_pad_do_bufferalloc),
(gst_proxy_pad_do_getrange), (gst_proxy_pad_do_checkgetrange),
(gst_proxy_pad_do_getcaps), (gst_proxy_pad_do_acceptcaps),
(gst_proxy_pad_do_fixatecaps):
Call wrapper function instead of just calling the function
pointers. This takes care of any locking and whatmore.
2005-06-28 10:37:24 +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 1b02b1d741 gst/gstghostpad.c (gst_proxy_pad_do_activate): Don't proxy activate.
Original commit message from CVS:
2005-06-28  Andy Wingo  <wingo@pobox.com>

* gst/gstghostpad.c (gst_proxy_pad_do_activate): Don't proxy
activate.
2005-06-28 08:41:43 +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 2d63826a90 gst/gstghostpad.c: At least get the chain function correct, needs more fixing.
Original commit message from CVS:
* gst/gstghostpad.c: (gst_proxy_pad_do_chain):
At least get the chain function correct, needs more
fixing.
2005-06-25 19:53:02 +00:00
Andy Wingo 57bfdb30e4 gst/gstghostpad.c (on_int_notify): Catches notify::caps on the internal pad, and hacks accordingly. Doesn't do it on ...
Original commit message from CVS:
2005-06-23  Andy Wingo  <wingo@pobox.com>

* gst/gstghostpad.c (on_int_notify): Catches notify::caps on the
internal pad, and hacks accordingly. Doesn't do it on the target
pad because we change its caps. Probably catches all cases of
interest tho.
(gst_ghost_pad_set_property): Connect to notify::caps as
appropritate.
2005-06-23 14:18:15 +00:00