Commit graph

68 commits

Author SHA1 Message Date
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 7b1c29b05e Fix compilation and fix event serialization.
Original commit message from CVS:
* check/gst-libs/gdp.c: (GST_START_TEST):
* gst/elements/gstfakesink.c: (gst_fake_sink_event):
Fix compilation and fix event serialization.
2005-07-27 18:47:48 +00:00
Thomas Vander Stichele b1f9462791 patch from Edgard to properly suppress these warnings
Original commit message from CVS:
patch from Edgard to properly suppress these warnings
2005-07-20 17:15:19 +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 3d531c895e check/gst/gstbin.c: Remove bogus test.
Original commit message from CVS:
* check/gst/gstbin.c: (GST_START_TEST):
Remove bogus test.
2005-07-17 22:44:00 +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
Thomas Vander Stichele b6df31811d add a suppression from Edgard
Original commit message from CVS:
add a suppression from Edgard
2005-07-13 13:14:57 +00:00
Thomas Vander Stichele 262d43af5b move two testsuite apps over to the check dir
Original commit message from CVS:

* testsuite/caps/Makefile.am:
* testsuite/caps/value_compare.c:
* testsuite/caps/value_intersect.c:
* check/gst/gstvalue.c: (GST_START_TEST), (gst_value_suite):
move two testsuite apps over to the check dir
2005-07-13 13:10:18 +00:00
Thomas Vander Stichele 232b0ba690 fix refcounting of warning and error messages
Original commit message from CVS:
fix refcounting of warning and error messages
2005-07-12 16:28:36 +00:00
Thomas Vander Stichele 3915dc69c3 re-enable leak checking :)
Original commit message from CVS:
re-enable leak checking :)
2005-07-12 13:26:22 +00:00
Thomas Vander Stichele cf6ce7f3c2 check/Makefile.am: add per-test valgrind targets
Original commit message from CVS:

* check/Makefile.am:
add per-test valgrind targets
* check/gst-libs/gdp.c: (GST_START_TEST),
(gst_data_protocol_suite), (main):
clean up
2005-07-12 12:20:01 +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 0794b693d9 check/Makefile.am: add two more tests for valgrinding
Original commit message from CVS:
* check/Makefile.am:
add two more tests for valgrinding
* check/gst/gstvalue.c: (GST_START_TEST):
test refcount of deserialized buffer, found a leak
* docs/gst/gstreamer-docs.sgml:
* docs/gst/gstreamer-sections.txt:
* docs/gst/gstreamer.types:
* docs/gst/tmpl/gstminiobject.sgml:
add miniobject to docs
* gst/gstminiobject.c:
add some docs
* gst/gstvalue.c: (gst_value_deserialize_buffer),
(gst_string_unwrap):
fix a hard-to-find invalid write for one of the tests
fix a leak for deserialized buffers
2005-07-11 18:41:49 +00:00
Thomas Vander Stichele 02df189e5c don't valgrind as part of make check for now
Original commit message from CVS:
don't valgrind as part of make check for now
2005-07-11 15:41:07 +00:00
Thomas Vander Stichele dff586d6f8 specify tool
Original commit message from CVS:
specify tool
2005-07-11 15:22:24 +00:00
Thomas Vander Stichele a59215bb4e valgrind unit tests as check-local; add gst_deinit
Original commit message from CVS:
valgrind unit tests as check-local; add gst_deinit
2005-07-11 15:10:40 +00:00
Thomas Vander Stichele 3127459e22 gst/gstelement.c: add debug
Original commit message from CVS:

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

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

* check/gst/gstbin.c: (START_TEST), (gst_bin_suite):
add test for state change message on a bin
* check/gst/gstelement.c: (START_TEST), (gst_element_suite):
add another test
* gst/gstbin.c: (gst_bin_init):
* gst/gstbus.c: (gst_bus_init), (gst_bus_post):
* gst/gstelement.c: (gst_element_post_message),
(gst_element_set_state):
* gst/gstelementfactory.c: (gst_element_factory_create):
* gst/gstmessage.c: (gst_message_new):
* gst/gstscheduler.c:
various debugging additions and cleanups
2005-07-09 15:18:53 +00:00
Thomas Vander Stichele 240c8e10cf adding tests for elements
Original commit message from CVS:
adding tests for elements
2005-07-08 16:41:45 +00:00
Thomas Vander Stichele 48cef19743 adding an element test
Original commit message from CVS:
adding an element test
2005-07-07 11:59:37 +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 d7a711c35f check/gst/gstpad.c: Only set explicit caps on pads.
Original commit message from CVS:
2005-07-04  Andy Wingo  <wingo@pobox.com>

* check/gst/gstpad.c: Only set explicit caps on pads.
2005-07-04 09:22:51 +00:00
Thomas Vander Stichele 2f2a020111 ignore more
Original commit message from CVS:
ignore more
2005-06-30 10:23:16 +00:00
Thomas Vander Stichele 9f6391390a go back to the circular dependency for now
Original commit message from CVS:
go back to the circular dependency for now
2005-06-30 10:22:15 +00:00
Thomas Vander Stichele 27dbc7672c drop circular reference
Original commit message from CVS:
drop circular reference
2005-06-30 07:45:55 +00:00
Thomas Vander Stichele a30e9069d1 add A GST_PLUGIN_PATH_ONLY env var; if it is set, it will only scan the GST_PLUGIN_PATH locations, and not add system...
Original commit message from CVS:

* check/Makefile.am:
* gst/gst.c: (add_path_func), (init_pre):
* gst/gstregistry.c: (gst_registry_add_path):
add A GST_PLUGIN_PATH_ONLY env var; if it is set, it will
only scan the GST_PLUGIN_PATH locations, and not add
system locations
2005-06-29 12:25:05 +00:00
Andy Wingo f8e79bdf86 *.c: Don't cast to GST_OBJECT when reffing or unreffing. Large source-munging commit!!!
Original commit message from CVS:
2005-06-28  Andy Wingo  <wingo@pobox.com>

* *.c: Don't cast to GST_OBJECT when reffing or unreffing. Large
source-munging commit!!!
2005-06-28 09:59:01 +00:00
Andy Wingo f2cf753b17 gst/base/gsttypefindhelper.c (gst_type_find_helper): Unref any remaining buffer.
Original commit message from CVS:
2005-06-27  Andy Wingo  <wingo@pobox.com>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* check/gst/gstghostpad.c (test_ghost_pads): More refcount checks.
To be modified when unlink drops the internal pad.
2005-06-27 18:35:05 +00:00
Wim Taymans 849bfaf419 check/states/sinks.c: Have to check for completion now...
Original commit message from CVS:
* check/states/sinks.c: (START_TEST), (gst_object_suite):
Have to check for completion now...
2005-06-25 19:14:51 +00:00
Thomas Vander Stichele e6b233bb4d remove gst_strtoll completely, since it didn't actually do anything more than what g_ascii_strtoull already does.
Original commit message from CVS:
* check/gst/gstvalue.c: (START_TEST), (gst_value_suite):
* gst/gstvalue.c: (gst_value_deserialize_int_helper):
remove gst_strtoll completely, since it didn't actually do
anything more than what g_ascii_strtoull already does.
check for range errors when deserializing
do a cast for the unsigned cases; but further fixing needs
a decision on what the interpretation of "(int)" and
deserialization should be for values that fall outside the
type's boundaries (ie, refuse, or interpret as casting)
2005-06-23 11:25:29 +00:00
Wim Taymans 1cda8197e9 Added support for live sources and other elements that cannot do preroll.
Original commit message from CVS:
Added support for live sources and other elements that
cannot do preroll.
Updated design docs, added live-source design doc.
Implemented live source functionality in basesrc
Fix error condition in _bin_get_state()
Implement live source handling in -launch.
Added check for live sources.
Fixed case in GstBin where elements were changed state
multiple times.
2005-06-23 10:37:09 +00:00
Andy Wingo b8d13efa9d check/gst/gstpad.c (test_get_allowed_caps, test_refcount): Fix borken refcounting.
Original commit message from CVS:
2005-06-23  Andy Wingo  <wingo@pobox.com>

* check/gst/gstpad.c (test_get_allowed_caps, test_refcount): Fix
borken refcounting.
2005-06-23 09:59:33 +00:00
Thomas Vander Stichele 80d247aa59 make sure capslist.h gets disted
Original commit message from CVS:
make sure capslist.h gets disted
2005-06-22 19:57:12 +00:00
Thomas Vander Stichele c3efeeb64c check/: copy over from 0.8, and add two with bitmasks specified with (int) 0xFF...
Original commit message from CVS:
* check/Makefile.am:
* check/gst/capslist.h:
copy over from 0.8, and add two with bitmasks specified with
(int) 0xFF...
* check/gst/gstcaps.c: (START_TEST), (gst_caps_suite):
add test to parse everything from capslist.h
* check/gst/gststructure.c: (START_TEST), (gst_value_suite),
(main):
add test for structure deserialization
* check/gst/gstvalue.c: (START_TEST), (gst_value_suite):
add tests for deserialization of strings to int types
* gst/gststructure.c: (gst_structure_nth_field_name):
* gst/gststructure.h:
add a way to get the name of a field referenced by index
* gst/gstvalue.c: (gst_value_deserialize_int_helper):
instead of checking if the resulting long long lies between
min and max, we check if the long long would fit into
a number of bytes for the final type.
This fixes cases where a string represents 2^32 - 1, which
when cast to int would be the (valid) -1, but is bigger than
G_MAXINT
2005-06-22 19:22:34 +00:00
Thomas Vander Stichele bdc643ddb9 return long long, not int, so gint64 deserialization actually works. Is there any flag that makes the compiler check...
Original commit message from CVS:

* check/gst/gstvalue.c: (START_TEST):
* gst/gstvalue.c: (gst_value_deserialize):
return long long, not int, so gint64 deserialization actually
works.  Is there any flag that makes the compiler check this ?
Fixes #308559
2005-06-22 10:52:18 +00:00
Thomas Vander Stichele 02b3212e25 check/gst/: add a test deserializing int64, and comment part out because it fails, yay !
Original commit message from CVS:
* check/gst/.cvsignore:
* check/gst/gstvalue.c: (START_TEST), (gst_value_suite):
add a test deserializing int64, and comment part out because
it fails, yay !
2005-06-21 17:41:35 +00:00
Thomas Vander Stichele e0a32b9252 commit a file I forgot
Original commit message from CVS:
commit a file I forgot
2005-06-21 16:53:14 +00:00
Thomas Vander Stichele e7ed161f16 move over a value_serialize test
Original commit message from CVS:
move over a value_serialize test
2005-06-21 16:48:46 +00:00
Wim Taymans dfe3f7f6f5 check/gst/gstcaps.c: Testcase to show error in buffer-on-caps serialisation.
Original commit message from CVS:
* check/gst/gstcaps.c: (START_TEST), (gst_caps_suite):
Testcase to show error in buffer-on-caps serialisation.
2005-06-20 15:14:58 +00:00
Thomas Vander Stichele d10d12dbcb check/Makefile.am: add gsttag
Original commit message from CVS:

* check/Makefile.am:
add gsttag
* check/gst/gsttag.c: (check_tags), (START_TEST), (gst_tag_suite),
(main):
move over from testsuite dir and clean up
* configure.ac:
* gst/gsttag.c:
* testsuite/Makefile.am:
* testsuite/tags/.cvsignore:
* testsuite/tags/Makefile.am:
* testsuite/tags/merge.c:
remove testsuite/tags
2005-06-19 11:32:42 +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
Thomas Vander Stichele dd9cc6adb7 ignore more
Original commit message from CVS:
ignore more
2005-06-17 09:12:33 +00:00
Thomas Vander Stichele 8a3824efac ignore more; fix README
Original commit message from CVS:
ignore more; fix README
2005-06-17 08:59:41 +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
Thomas Vander Stichele 034ae2139d check/: ignore more
Original commit message from CVS:
* check/gst-libs/.cvsignore:
* check/gst/.cvsignore:
* check/pipelines/.cvsignore:
ignore more
* check/pipelines/cleanup.c: (setup_pipeline), (run_pipeline),
(START_TEST), (cleanup_suite), (main):
add some tests related to cleanup after running pipelines
2005-06-08 14:00:21 +00:00
Thomas Vander Stichele 4ec7c9ad59 add a GstBuffer unit test
Original commit message from CVS:
add a GstBuffer unit test
2005-06-08 13:57:13 +00:00
Thomas Vander Stichele d282f08209 add a 'plugins' dir to the PLUGIN_PATH in the uninstalled script to drop random other plugin-having projects in
Original commit message from CVS:
add a 'plugins' dir to the PLUGIN_PATH in the uninstalled script to drop random other plugin-having projects in
2005-06-08 13:42:52 +00:00