Commit graph

1351 commits

Author SHA1 Message Date
Thijs Vermeir bb3dfba3f5 Be sure that we have a new copy of the caps and not reffed caps from a template
Original commit message from CVS:
* gst/gstpad.c:
* tests/check/gst/gstpad.c:
Be sure that we have a new copy of the caps and not
reffed caps from a template
2008-02-04 14:14:42 +00:00
Sebastian Dröge 86e45df860 gst/: Make it possible (and recommended) to set element details and add pad templates in the class_init functions by ...
Original commit message from CVS:
* gst/gstelement.c: (gst_element_base_class_init),
(gst_element_class_add_pad_template):
* gst/gstpadtemplate.c:
Make it possible (and recommended) to set element details and add
pad templates in the class_init functions by copying the details/pad
templates in GstElement's base_init.
Also make it possible to replace existing pad templates by adding
a new one with the same name. This was done in a hackish fashion
in same elements before already.
Don't reference pad templates that are added a second time. A
new pad template has a refcount of one and is not floating anymore
and to be owned by the element's class. Make this more explicit by
mentioning it in the docs of gst_element_class_add_pad_template().
These changes are backwards compatible. Fixes bug #491501.
* tests/check/gst/gstelement.c:
Add unit test for setting element details, adding pad templates and
replacing them in a subclass.
2008-02-03 10:48:01 +00:00
Tim-Philipp Müller 22cf61b56e gst/gstplugin.c: Fix old-style static plugins via GST_PLUGIN_DEFINE_STATIC again, which I broke two commits ago when ...
Original commit message from CVS:
* gst/gstplugin.c: (_gst_plugin_initialize):
Fix old-style static plugins via GST_PLUGIN_DEFINE_STATIC
again, which I broke two commits ago when changing the API
of gst_plugin_register_static(): the g_list_foreach() in
_gst_plugin_register_static still assumed the old function
signature and would therefore fail (re-fixes #510187).
* gst/gstplugin.c: (_num_static_plugins), (_static_plugins),
(_gst_plugin_register_static), (gst_plugin_register_static):
Revert the (technically correct) change to call g_thread_init() from
the pre-main() constructor. This will break programs which call
g_thread_init() without an if (!g_thread_supported()) guard in their
main function. We could just blame it on GLib or the application, but
it's probably best to just avoid this altogether and simply not use
any GLib functions here and use plain old malloc() with a simple
array to store the plugins to register later when gst_init() is
finally called (re-fixes #510187).
* tests/check/gst/gstplugin.c: (GST_GNUC_CONSTRUCTOR_DEFINED),
(GST_GNUC_CONSTRUCTOR_DEFINED), (plugin_init_counter),
(plugin1_init), (plugin2_init), (plugin3_init), (GST_START_TEST),
(GST_START_TEST), (gst_plugin_suite):
Dumb unit test to make sure the old GST_PLUGIN_DEFINE_STATIC still
works.
2008-01-20 15:04:33 +00:00
Tim-Philipp Müller 33cd142292 gst/: Change API of gst_plugin_register_static() to not take a GstPluginDesc, but rather just take all the arguments ...
Original commit message from CVS:
* gst/gst.c: (init_post):
* gst/gstplugin.c: (_gst_plugin_register_static),
(gst_plugin_register_static), (_gst_plugin_initialize):
* gst/gstplugin.h: (GstPluginFilter):
Change API of gst_plugin_register_static() to not take
a GstPluginDesc, but rather just take all the arguments
in a GstPluginDesc directly. This is more intuitive and
avoids certain mistakes when porting code from
GST_PLUGIN_DEFINE_STATIC to gst_plugin_register_static().
Fixes #510187.
* tests/check/gst/gstplugin.c:
Fix up for changed API.
2008-01-17 22:17:15 +00:00
Jan Schmidt f2c36159ef gst/gst.c: _gst_trace_on is already provided by gsttrace.h, no need to declare it ourselves.
Original commit message from CVS:
* gst/gst.c:
_gst_trace_on is already provided by gsttrace.h, no need to declare
it ourselves.
* docs/libs/gstreamer-libs-sections.txt:
Add 'buffers', 'check_cond' and 'check_mutex' from libgstcheck
and remove strange tcase_add_test which is outputting a warning.
* libs/gst/check/gstcheck.c:
* libs/gst/check/gstcheck.h:
Properly declare 'buffers', 'check_cond', 'check_mutex' extern
and define them in gstcheck.c instead of having every .c file whcih
includes gstcheck.h be defining its own copy and relying on symbol
interposing to marry them all, which doesn't work on Solaris.
* tests/check/elements/identity.c: (GST_START_TEST):
Don't define 'buffers' locally, it comes from libgstcheck.
* tests/check/generic/sinks.c: (send_buffer):
Fix type of variable (GstFlowReturn, not GstStateChangeReturn)
* tests/check/gst/gststructure.c: (GST_START_TEST):
* tests/check/gst/gstsystemclock.c: (GST_START_TEST):
* tests/check/gst/gstutils.c: (GST_START_TEST):
* tests/check/gst/gstvalue.c: (GST_START_TEST):
Add a bunch of casts to make various constants fit the types
they're being assigned to.
2008-01-12 20:22:30 +00:00
Tim-Philipp Müller 4a3f163052 API: add gst_plugin_register_static() and deprecate
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gst.c: (init_post):
* gst/gstplugin.c: (_gst_plugin_register_static),
(gst_plugin_register_static), (_gst_plugin_initialize),
(gst_plugin_register_func):
* gst/gstplugin.h: (GST_PLUGIN_DEFINE_STATIC):
API: add gst_plugin_register_static() and deprecate
GST_PLUGIN_DEFINE_STATIC, since it's not portable
(#498924).
Also, in _gst_plugin_register_static(), make sure to call
g_thread_init() before calling GLib functions such as
g_list_append() if we're not initialised yet, since that
may lead to random crashes with older GSlice/GLib versions.
* tests/check/gst/gstplugin.c:
Adapt unit test to above changes.
2008-01-09 18:23:39 +00:00
Wim Taymans f473d72719 libs/gst/base/gstbasesrc.c: Don't update the last_stop position in do_seek, that's the position we did a seek to.
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c: (gst_base_src_default_do_seek),
(gst_base_src_loop):
Don't update the last_stop position in do_seek, that's the position we
did a seek to.
Read backwards when we have a negative rate.
* tests/check/elements/filesrc.c: (event_func), (wait_eos),
(setup_filesrc), (cleanup_filesrc), (GST_START_TEST),
(filesrc_suite):
Add check for reverse reading.
2008-01-07 11:23:00 +00:00
Alexis Ballier 91a59d5af5 tests/check/: Decide which header to include based on the userland ABI target and not the kernel/cpu. Fix up structur...
Original commit message from CVS:
Patch by: Alexis Ballier <aballier at gentoo org>
* tests/check/gst/gstabi.c:
* tests/check/gst/struct_ppc64.h:
* tests/check/libs/libsabi.c:
* tests/check/libs/struct_ppc64.h:
Decide which header to include based on the userland ABI target
and not the kernel/cpu. Fix up structure sizes of ppc64 header
for 64-bit userland (#503590).  Might need something similar for
x86 too.
2008-01-07 09:47:49 +00:00
Tim-Philipp Müller 34cdb9b9d2 tests/check/generic/sinks.c: Put back the tcase_set_timeout(), apparently it's needed after all; fix it up in a way t...
Original commit message from CVS:
* tests/check/generic/sinks.c: (gst_sinks_suite):
Put back the tcase_set_timeout(), apparently it's needed after
all; fix it up in a way that makes things work with valgrind too.
2007-12-30 13:31:17 +00:00
Tim-Philipp Müller dd739adfa7 tests/check/generic/sinks.c: Fix leak in unit test (bus sync handler must unref the message if it returns GST_BUS_DRO...
Original commit message from CVS:
* tests/check/generic/sinks.c: (async_done_func),
(async_done_eos_func):
Fix leak in unit test (bus sync handler must unref the message
if it returns GST_BUS_DROP). Don't fiddle with the default test
timeout, this is smaller than the current preconfigured value
via CK_DEFAULT_TIMEOUT, and also breaks things with valgrind
because it overrides the value specified in CK_DEFAULT_TIMEOUT.
2007-12-28 13:57:05 +00:00
Tim-Philipp Müller 55d6032d53 tests/check/: Don't use GST_PLUGIN_DEFINE_STATIC, it is not portable and is going to be deprecated (see #498924).
Original commit message from CVS:
* tests/check/libs/controller.c:
* tests/check/libs/typefindhelper.c:
* tests/check/pipelines/parse-launch.c:
Don't use GST_PLUGIN_DEFINE_STATIC, it is not portable and is
going to be deprecated (see #498924).
2007-12-21 21:17:32 +00:00
Wim Taymans 96d28a501f gst/gstpad.c: Really unlink the peer pad instead of setting the peer pointer to NULL when we dispose the pad.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_dispose):
Really unlink the peer pad instead of setting the peer pointer to NULL
when we dispose the pad.
This correctly calls the unlink functions and makes sure that the peer
does not have a handle to invalid memory. See #504671.
* tests/check/gst/gstpad.c: (GST_START_TEST), (gst_pad_suite):
Add testsuite for above case.
2007-12-21 13:54:07 +00:00
Wim Taymans b0076d395d libs/gst/base/gstbasesrc.c: Allow sending EOS to the source to make it send out an EOS event from the streaming thread.
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c: (gst_base_src_send_event),
(gst_base_src_get_range), (gst_base_src_pad_get_range),
(gst_base_src_loop), (gst_base_src_set_flushing),
(gst_base_src_change_state):
Allow sending EOS to the source to make it send out an EOS event from
the streaming thread.
Update docs and deprecate the old NULL/READY shutdown method.
* tests/check/libs/basesrc.c: (GST_START_TEST),
(gst_basesrc_suite):
Add unit test for controlled shutdown.
2007-12-19 17:49:38 +00:00
Wim Taymans a332964e6c docs/design/part-synchronisation.txt: Small updates.
Original commit message from CVS:
* docs/design/part-synchronisation.txt:
Small updates.
* gst/gstsegment.c: (gst_segment_set_seek),
(gst_segment_set_newsegment_full), (gst_segment_to_stream_time),
(gst_segment_to_running_time):
The seek format can be different from the segment format when the start
and stop values are not to be updated, when we only do a rate change for
example.
* tests/check/gst/gstsegment.c: (GST_START_TEST),
(gst_segment_suite):
Add a testcase for the rate-only seeks, checking that the format is
correctly ignored when start and stop are not updated.
2007-12-19 12:48:18 +00:00
Stefan Kost 42e6f9e77c tests/check/gst/gstbin.c: Adjust the test to the refcount change two days ago.
Original commit message from CVS:
* tests/check/gst/gstbin.c:
Adjust the test to the refcount change two days ago.
2007-12-15 14:42:25 +00:00
Tim-Philipp Müller cf86e1a0a0 gst/gststructure.c: Don't crash in _from_string() if the structure name is not valid (fixes #501560). Allow structur...
Original commit message from CVS:
* gst/gststructure.c: (gst_structure_validate_name),
(gst_structure_new_valist), (gst_structure_parse_value),
(gst_structure_from_string):
Don't crash in _from_string() if the structure name is not valid
(fixes #501560).  Allow structure names to start with a number
again (this apparently broke the ubuntu codec installer).
* tests/check/gst/gststructure.c: (GST_START_TEST), (GST_START_TEST),
(GST_START_TEST):
Add unit test for the crash; update unit tests for new behaviour.
2007-12-08 12:54:53 +00:00
Sebastian Dröge 3d4291cca0 tests/check/Makefile.am: Don't forget to dist {gst,libs}/struct_hppa.h.
Original commit message from CVS:
* tests/check/Makefile.am:
Don't forget to dist {gst,libs}/struct_hppa.h.
2007-12-02 20:33:49 +00:00
Wim Taymans 0e0caaf16a Start merging in the easy bits of #361155, the monotonic clock patch.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstclock.h:
* tests/check/gst/gstsystemclock.c: (GST_START_TEST),
(gst_systemclock_suite):
Start merging in the easy bits of #361155, the monotonic clock patch.
This one adds a few handy macros with docs and a testsuite.
2007-11-28 10:58:39 +00:00
Stefan Kost d8e77f9bf8 gst/gstevent.c: Little documentation improvment.
Original commit message from CVS:
* gst/gstevent.c:
Little documentation improvment.
* gst/gstpreset.c:
More TODO cleanups. Remove c++ comments.
* libs/gst/controller/gstcontroller.c:
Add TODO and use quark from static string.
* tests/check/gst/gstmessage.c:
* tests/check/gst/gststructure.c:
Use quark from static string.
2007-11-17 17:50:21 +00:00
Wim Taymans c28238d8fe gst/gstsegment.c: Also accumulate time correctly when doing reverse playback. Fixes #488201,
Original commit message from CVS:
* gst/gstsegment.c: (gst_segment_set_newsegment_full),
(gst_segment_to_stream_time), (gst_segment_to_running_time):
Also accumulate time correctly when doing reverse playback. Fixes
#488201,
When converting to running and stream time, use default values for
start/stop/time/accum when comparing different formats. Fixes #494245.
* libs/gst/base/gstbasesink.c: (gst_base_sink_get_sync_times):
Do running/stream time in TIME format.
* tests/check/gst/gstsegment.c: (GST_START_TEST),
(gst_segment_suite):
2 new unit tests for segment accumulation.
2007-11-09 11:56:41 +00:00
Wim Taymans 9e50fa303e libs/gst/base/gstbasesink.c: Don't try to report a 0 position when we don't know, return -1 and FALSE instead. This m...
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_get_sync_times),
(gst_base_sink_do_sync), (gst_base_sink_preroll_object),
(gst_base_sink_event), (gst_base_sink_get_position_last),
(gst_base_sink_get_position_paused), (gst_base_sink_get_position),
(gst_base_sink_change_state):
Don't try to report a 0 position when we don't know, return -1 and FALSE
instead. This mostly happens when we are prerolling.
Make sure we can report the right position before we post the ASYNC_DONE
message so that a message handler can query position without races.
* tests/check/generic/sinks.c: (send_eos), (GST_START_TEST),
(async_done_handoff), (async_done_func), (send_buffer),
(async_done_eos_func), (gst_sinks_suite):
Add two tests for the above.
2007-11-06 10:33:22 +00:00
Jan Schmidt b1ad4a6772 tests/check/gst/gstobject.c: Disable silly racy test that always fails on this combination of CPU and kernel.
Original commit message from CVS:
* tests/check/gst/gstobject.c:
Disable silly racy test that always fails on this combination of CPU
and kernel.
2007-11-06 00:59:54 +00:00
Tim-Philipp Müller 56d428073e tests/check/elements/tee.c: Simplify, simplify, simplify - or not. Rewrite unit test not to use gst_parse_launch(); ...
Original commit message from CVS:
* tests/check/elements/tee.c: (test_num_buffers):
Simplify, simplify, simplify - or not.  Rewrite unit test
not to use gst_parse_launch(); allow N sub-streams. Increasing
the number of sub-streams seems to reproduce #474823 more easily.
2007-11-01 19:19:10 +00:00
Tim-Philipp Müller 26f2316b27 tests/examples/metadata/read-metadata.c: Use _KEEP as merge mode rather than _KEEP_ALL, so tags arriving in a second ...
Original commit message from CVS:
* tests/examples/metadata/read-metadata.c: (message_loop):
Use _KEEP as merge mode rather than _KEEP_ALL, so tags
arriving in a second or third tag message are added to
the tag list as well.
2007-10-31 18:08:21 +00:00
Jan Schmidt f37e97764b plugins/elements/gstmultiqueue.c: Make it so that pads are considered linked until a buffer is pushed and discovered ...
Original commit message from CVS:
* plugins/elements/gstmultiqueue.c: (gst_multi_queue_set_property),
(gst_multi_queue_request_new_pad), (gst_single_queue_flush),
(gst_multi_queue_loop), (gst_multi_queue_sink_activate_push):
Make it so that pads are considered linked until a buffer is pushed
and discovered otherwise. This avoids problems with decodebin2 hanging
after a seek in the filesrc ! decodebin2 name=d ! fakesink d. ! fakesink
case.
Make sure we lock the multiqueue when updating the max-size properties.
Fix a crash on Solaris in a debug statement in get_request_pad that
passes a NULL string to GST_DEBUG.
* tests/check/elements/multiqueue.c: (mq_dummypad_chain),
(run_output_order_test):
Fix the test to allow the first buffer on not-linked pads to come out
of sequence while multiqueue discovers that they are not-linked.
2007-10-25 15:14:02 +00:00
Jan Schmidt d7cbd5de33 Use a custom export symbol regex for libgstcheck, as it needs to export symbols that don't match the standard GStream...
Original commit message from CVS:
* configure.ac:
* libs/gst/check/Makefile.am:
Use a custom export symbol regex for libgstcheck, as it needs
to export symbols that don't match the standard GStreamer gst_*
pattern, and  --export-dynamic is not portable (only works on
GNU ld)
* libs/gst/check/gstcheck.c: (gst_check_setup_src_pad),
(gst_check_setup_sink_pad):
Make sure to pass a message parameter to the fail_* macros.
* tests/check/gst/gstinfo.c: (GST_START_TEST):
Fix some compiler warnings.
2007-10-25 14:50:48 +00:00
Tim-Philipp Müller bff7cbd845 tests/check/gst/gststructure.c: Disable test that checks that white spaces are not allowed in structure names or fiel...
Original commit message from CVS:
* tests/check/gst/gststructure.c: (test_to_string):
Disable test that checks that white spaces are not allowed
in structure names or field names, since we need to
support that for now for backwards compatibility reasons.
2007-10-25 14:41:01 +00:00
Edgard Lima 0e3a0fdf35 Added GstStructure to gst_value_table and its related functions.
Original commit message from CVS:

* gst/gstcaps.c: (gst_caps_to_string),
(gst_caps_from_string_inplace):
* gst/gststructure.c: (gst_structure_get_abbrs),
(gst_structure_to_string), (gst_structure_from_string):
* gst/gstvalue.c: (gst_value_set_structure),
(gst_value_get_structure), (gst_value_serialize_structure),
(gst_value_deserialize_structure), (_gst_value_initialize):
* gst/gstvalue.h:
* tests/check/gst/gststructure.c: (GST_START_TEST),
(gst_structure_suite):
* tests/check/gst/gstvalue.c: (GST_START_TEST):
Added GstStructure to gst_value_table and its related functions.
Changed gst_structure_to_string to print ';' in the end.
Changed gst_caps_to_string to not print ';' beteween its
fields (structures) anymore and remove the lastes ';' from latest
structure. Now it is possible to have nested structures.
In addition, backward compatibilty is assured by accepting '\0' as
end delimiter. Fixes: #487969.
API: add gst_value_set_structure()
API: add gst_value_get_structure()
2007-10-22 08:53:26 +00:00
Tim-Philipp Müller 13c6e89d6c API: add gst_bus_pop_filtered
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstbus.c:
* gst/gstbus.h:
API: add gst_bus_pop_filtered
API: add gst_bus_timed_pop_filtered
Two new functions for waiting for specific message types on the
bus for a specified amount of time without iterating any main
loops or main contexts.
* tests/check/gst/gstbus.c:
Some tests for the new functions.
2007-10-16 20:30:13 +00:00
Stefan Kost 2b4644f737 Revert serialisation change and constrain structure-names after consensus on irc. Update api documentation to reflect...
Original commit message from CVS:
* gst/gststructure.c:
* tests/check/gst/gststructure.c:
Revert serialisation change and constrain structure-names after
consensus on irc. Update api documentation to reflect the change.
2007-10-16 13:58:43 +00:00
Stefan Kost 38cdd26ec8 gst/gststructure.c: Improve serialization and fix tests.
Original commit message from CVS:
* gst/gststructure.c:
Improve serialization and fix tests.
* tests/check/gst/gststructure.c:
Add another test that covers why I actually did the previous structure
change.
2007-10-16 06:32:07 +00:00
Tim-Philipp Müller 653cd3d701 tests/check/gst/gststructure.c: Add unit test for escaping of structure name when serialising and deserialising to/fr...
Original commit message from CVS:
* tests/check/gst/gststructure.c:
Add unit test for escaping of structure name when serialising
and deserialising to/from strings.
2007-10-15 11:58:16 +00:00
Wim Taymans de5d9793d7 libs/gst/base/gstbasesink.c: When we received EOS and are waiting for when to post the EOS message, our state is prer...
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_preroll_queue_flush),
(gst_base_sink_queue_object_unlocked),
(gst_base_sink_queue_object), (gst_base_sink_event),
(gst_base_sink_needs_preroll), (gst_base_sink_chain_unlocked):
When we received EOS and are waiting for when to post the EOS message,
our state is prerolled and we should not return ASYNC.
Reorganize some code paths to implement this behavior.
* tests/check/generic/sinks.c: (send_eos), (GST_START_TEST),
(gst_sinks_suite):
Add unit test to verify above EOS fix.
2007-10-08 17:05:06 +00:00
Wim Taymans a2e299f3ef tests/check/pipelines/simple-launch-lines.c: Fix compilation again.
Original commit message from CVS:
* tests/check/pipelines/simple-launch-lines.c: (run_pipeline):
Fix compilation again.
2007-10-05 11:52:39 +00:00
Stefan Kost d53883c35e tests/check/pipelines/cleanup.c: Print message name and not just number.
Original commit message from CVS:
* tests/check/pipelines/cleanup.c:
Print message name and not just number.
2007-10-03 15:05:30 +00:00
Stefan Kost de65ce3486 tests/check/pipelines/simple-launch-lines.c: Print message name and not just number.
Original commit message from CVS:
* tests/check/pipelines/simple-launch-lines.c:
Print message name and not just number.
2007-10-03 14:51:03 +00:00
Stefan Kost 1120543704 tests/check/generic/states.c: Improved state change unit test.
Original commit message from CVS:
* tests/check/generic/states.c:
Improved state change unit test.
2007-09-20 10:36:23 +00:00
Stefan Kost 0873492be6 gst/gstbin.h: Move priv to the right place.
Original commit message from CVS:
* gst/gstbin.h:
Move priv to the right place.
* gst/gstsystemclock.c:
Add FIXME: and improve log.
* tests/check/Makefile.am:
* tests/examples/manual/Makefile.am:
Work with all types of registries.
2007-09-20 07:42:35 +00:00
Stefan Kost 78d79cae12 Ignore registries in any format.
Original commit message from CVS:
* .cvsignore:
* tests/examples/manual/.cvsignore:
Ignore registries in any format.
2007-09-19 18:07:18 +00:00
Sebastian Dröge b598394d3b tests/check/libs/controller.c: Use fail_unless_equals_int(a, b) instead of fail_unless_equals (a == b) to get better ...
Original commit message from CVS:
* tests/check/libs/controller.c: (GST_START_TEST):
Use fail_unless_equals_int(a, b) instead of
fail_unless_equals (a == b) to get better output on failures.
2007-09-13 08:36:37 +00:00
Tim-Philipp Müller 362d7872dd tests/check/gst/gsturi.c: Also check for the other file URI variant on win32.
Original commit message from CVS:
* tests/check/gst/gsturi.c:
Also check for the other file URI variant on win32.
2007-09-12 16:35:48 +00:00
Tim-Philipp Müller 3f967a8b04 gst/gsturi.c: If there's no hostname, we want to return 'c:/foo/bar.txt' and not '/c:/foo/bar.txt' on Windows. Fixes ...
Original commit message from CVS:
* gst/gsturi.c: (gst_uri_get_location):
If there's no hostname, we want to return 'c:/foo/bar.txt'
and not '/c:/foo/bar.txt' on Windows. Fixes #469402.
* tests/check/gst/gsturi.c:
Unit test for the above and a few more things.
2007-09-12 12:36:51 +00:00
Stefan Kost 33f966fede tests/check/gst/gstsystemclock.c: Cleanup the test a little (use gst-logging and not g_message). Improve test to chec...
Original commit message from CVS:
* tests/check/gst/gstsystemclock.c:
Cleanup the test a little (use gst-logging and not g_message). Improve
test to check if a wait reached the target.
2007-09-11 13:43:53 +00:00
Wim Taymans a0274c10a7 gst/gststructure.c: Fix fraction list fixation code. Take the fraction with the smallest difference with the target i...
Original commit message from CVS:
* gst/gststructure.c:
(gst_structure_fixate_field_nearest_fraction):
Fix fraction list fixation code. Take the fraction with the smallest
difference with the target instead of the first one in the list.
* tests/check/gst/gststructure.c: (GST_START_TEST),
(gst_structure_suite):
Added test to verify correct fraction list fixation behaviour.
2007-09-05 01:00:50 +00:00
Jan Schmidt e2b34e1551 tests/check/gst/gstbin.c: Fix leaks in the new unit test.
Original commit message from CVS:
* tests/check/gst/gstbin.c: (GST_START_TEST):
Fix leaks in the new unit test.
2007-08-24 14:55:46 +00:00
Wim Taymans ebf770154f gst/gstbin.c: Improve debugging.
Original commit message from CVS:
* gst/gstbin.c: (is_eos), (gst_bin_add_func),
(bin_handle_async_start), (gst_bin_handle_message_func):
Improve debugging.
When adding elements, insert messages into the bus of the newly added
element and make sure the element is the source of the message. This
allows the parent bin to intercept the message and do the
right thing. It also avoids us posting ASYNC_START and CLOCK_PROVIDE
messages to the app (which is not allowed).
Update some docs.
* tests/check/gst/gstghostpad.c: (GST_START_TEST):
Fix testsuite so that is does not work around messages that should not
have been posted in the first place.
2007-08-16 11:04:40 +00:00
Wim Taymans 5059e9f8bd gst/gstbin.c: Fix annoying bug in the sorted iterator where a sink that is not really a sink (when it has downstream ...
Original commit message from CVS:
* gst/gstbin.c: (add_to_queue), (remove_from_queue), (clear_queue),
(update_degree), (gst_bin_sort_iterator_next):
Fix annoying bug in the sorted iterator where a sink that is not really
a sink (when it has downstream links) screwed up the iterator.
* tests/check/gst/gstbin.c: (GST_START_TEST), (gst_bin_suite):
Unit test to verify the fix.
2007-08-16 10:27:16 +00:00
Wim Taymans 9b24336ce5 gst/gstbin.c: Always change the state of a NO_PREROLL element even if it has ASYNC elements inside (in case of a bin).
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_element_set_state):
Always change the state of a NO_PREROLL element even if it has ASYNC
elements inside (in case of a bin).
* tests/check/generic/sinks.c: (GST_START_TEST), (gst_sinks_suite):
Unit test for this case.
2007-08-14 13:37:16 +00:00
Sebastian Dröge b47469722f libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
Jan Schmidt 6dd78d6bed tests/check/elements/.cvsignore: Add file to cvsignore as commanded.
Original commit message from CVS:
* tests/check/elements/.cvsignore:
Add file to cvsignore as commanded.
2007-07-16 16:44:31 +00:00
Jan Schmidt 4fb00301dd tests/check/elements/multiqueue.c: Use a GStaticMutex to protect all cases where libcheck fail_if/fail_unless macros ...
Original commit message from CVS:
* tests/check/elements/multiqueue.c: (mq_dummypad_chain),
(mq_dummypad_event), (run_output_order_test):
Use a GStaticMutex to protect all cases where libcheck
fail_if/fail_unless macros might be called from multiple threads
simultaneously to avoid errors like:
"check_pack.c:107: :-1081725400:Bad message type arg"
2007-07-16 16:04:49 +00:00
Jan Schmidt 54eb646c3e tests/check/pipelines/stress.c: Make sure we set the pipeline back to the NULL state before dropping our final refere...
Original commit message from CVS:
* tests/check/pipelines/stress.c: (GST_START_TEST):
Make sure we set the pipeline back to the NULL state before
dropping our final reference.
2007-07-16 15:19:06 +00:00
Jan Schmidt 615cc36296 tests/check/elements/tee.c: Make the tee stress-test a little less stressful so it doesn't just time out on slow-mach...
Original commit message from CVS:
* tests/check/elements/tee.c: (GST_START_TEST):
Make the tee stress-test a little less stressful so it doesn't just
time out on slow-machines, and remove a small race when it's starting
up by adding a get_state() call.
2007-07-16 14:55:26 +00:00
Tim-Philipp Müller cf8abdf3a3 gst/gststructure.c: When deserialising foo=bar without a type cast, check if it's a boolean before falling back to a ...
Original commit message from CVS:
* gst/gststructure.c: (gst_structure_parse_value):
When deserialising foo=bar without a type cast, check if it's a
boolean before falling back to a string type, otherwise things like
audiotestsrc ! audio/x-raw-int,signed=true ! fakesink won't work,
because the filtercaps end up having a signed=(string)true field,
which causes problems later when intersection caps.
* tests/check/gst/gststructure.c: (GST_START_TEST):
Add a unit test for this.
2007-07-08 14:11:53 +00:00
Sebastian Dröge 286cd75855 libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
Wim Taymans 4cc7b818fd plugins/elements/gsttee.c: Be a lot smarter when deciding what srcpad to use for proxying the buffer_alloc. Also hand...
Original commit message from CVS:
* plugins/elements/gsttee.c: (gst_tee_base_init),
(gst_tee_request_new_pad), (gst_tee_release_pad),
(gst_tee_find_buffer_alloc), (gst_tee_buffer_alloc),
(gst_tee_do_push), (clear_pads), (gst_tee_handle_buffer),
(gst_tee_chain):
Be a lot smarter when deciding what srcpad to use for proxying
the buffer_alloc. Also handle pad added/removed when doing so.
Fixes #357959.
Keep track of what pads we already pushed on in case we have pads
added/removed while pushing. Fixes #374639
* tests/check/Makefile.am:
* tests/check/elements/tee.c: (handoff), (GST_START_TEST),
(tee_suite):
Added unit test for pad resync.
2007-07-03 16:26:29 +00:00
Jan Schmidt afebd394fa plugins/elements/gstmultiqueue.*: Take the multiqueue lock when updating the fill level so we don't get confused.
Original commit message from CVS:
* plugins/elements/gstmultiqueue.c: (gst_multi_queue_init),
(gst_single_queue_flush), (apply_segment), (apply_buffer),
(gst_single_queue_push_one), (gst_multi_queue_loop),
(gst_multi_queue_sink_activate_push), (gst_multi_queue_sink_event),
(gst_multi_queue_src_activate_push), (wake_up_next_non_linked),
(compute_high_id), (gst_single_queue_new):
* plugins/elements/gstmultiqueue.h:
Take the multiqueue lock when updating the fill level so we don't get
confused.
After applying a buffer or event on the src pad segment, make sure to
call gst_data_queue_limits_changed() to get the data queue to unblock
and check the filled state again.
Rework the not-linked pad handling so the logic is that not-linked
pads can push as fast as they like, but only so they never get
ahead of any linked pads.
* tests/check/elements/multiqueue.c: (mq_sinkpad_to_srcpad),
(mq_dummypad_getcaps), (mq_dummypad_chain), (mq_dummypad_event),
(run_output_order_test), (GST_START_TEST), (multiqueue_suite):
Add a test to check that not-linked pads always stay behind
linked pads.
2007-06-26 14:45:15 +00:00
Andy Wingo 4e1c9c226a tests/check/pipelines/simple-launch-lines.c
Original commit message from CVS:
2007-06-19  Andy Wingo  <wingo@pobox.com>

* tests/check/pipelines/simple-launch-lines.c
(test_state_change_returns): Enable pull-mode tests now that
basesink has been fixed.

* libs/gst/base/gstbasesink.c (gst_base_sink_needs_preroll):
Changed from gst_base_sink_is_prerolled, reversing the sense of
the return value. Returns FALSE also if the sink is in pull mode,
in which case it needs no preroll.
(gst_base_sink_query, gst_base_sink_change_state): Update for
needs_preroll change.
(gst_base_sink_change_state): Add a case for READY_TO_PAUSED after
chaining up, in which we return SUCCESS directly if we activated
in pull mode instead of ASYNC. Involves countering an async_start
message sent before chaining up; not sure if this is correct, in
an ideal world we only send async-start when activating in push
mode.
2007-06-19 21:58:30 +00:00
Andy Wingo b0c2d05640 tests/check/pipelines/simple-launch-lines.c
Original commit message from CVS:
2007-06-19  Andy Wingo  <wingo@pobox.com>

* tests/check/pipelines/simple-launch-lines.c
(test_state_change_returns): New test, partially disabled until
basesink is fixed.
2007-06-19 21:28:54 +00:00
Wim Taymans 0b3153873b gst/gstbin.*: Immediatly commit the toplevel bin state when receiving an async-done message. This enables us to avoid...
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_init), (gst_bin_add_func),
(gst_bin_remove_func), (gst_bin_get_state_func),
(gst_bin_element_set_state), (gst_bin_continue_func),
(bin_push_state_continue), (bin_handle_async_start),
(bin_handle_async_done), (gst_bin_handle_message_func):
* gst/gstbin.h:
Immediatly commit the toplevel bin state when receiving an async-done
message. This enables us to avoid spawning a thread to commit the state
in some common cases and it also avoids some races.
Avoid spawning a state thread when adding/removing async elements to a
toplevel bin. Instead we immediatly update the bin state.
Get rid of iterating all the children when getting the state in the bin
because it is now always up-to-date.
Fix bug where locked elements would always return _SUCCESS even it they
returned NO_PREROLL before being locked.
Fix the order of the state_change, async-start/done messages that was
sometimes incorrect.
Mark the state_dirty field as deprecated, we don't need it anymore as we
are always up-to-date.
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_continue_state):
Small debug inprovements.
Return the previous element state return when nothing is pending instead
of blindly returning SUCCESS.
* tests/check/generic/sinks.c: (GST_START_TEST), (pad_blocked_cb),
(gst_sinks_suite):
Add a whole bunch of new testcases.
2007-06-18 15:12:28 +00:00
Wim Taymans 3d4e515e77 Improve debugging.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_push_event), (gst_pad_send_event):
* libs/gst/base/gstbasesrc.c: (gst_base_src_query_latency),
(gst_base_src_default_query), (gst_base_src_get_range),
(gst_base_src_start):
* tests/check/pipelines/parse-launch.c: (setup_pipeline):
Improve debugging.
2007-06-15 10:43:51 +00:00
Tim-Philipp Müller 9dc9602829 API: add fail_unless_equals_float() and assert_equals_float().
Original commit message from CVS:
* docs/libs/gstreamer-libs-sections.txt:
* libs/gst/check/gstcheck.h:
API: add fail_unless_equals_float() and assert_equals_float().
Add documentation for some of the macros.
* tests/check/libs/controller.c: (GST_START_TEST):
Use newly-added asserts.
2007-06-14 11:56:44 +00:00
Sebastian Dröge bdcc0329ef libs/gst/controller/: Protect against values larger or smaller than the minimum or maximum allowed value for the prop...
Original commit message from CVS:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_new):
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstinterpolation.c:
(gst_controlled_property_find_control_point_node),
(interpolate_none_get), (interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(interpolate_trigger_get),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
Protect against values larger or smaller than the minimum or maximum
allowed value for the property when using values that can be compared.
Optimize trigger interpolator a bit by taking the last requested value
into account instead of always looping through the complete list.
Fix coding style a bit, everywhere else we use "return foo" instead
of "return (foo)".
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
Add unit test for the protection against too large or too small
values.
2007-06-09 16:58:30 +00:00
Stefan Kost 3b43fd8d3c tests/examples/controller/audio-example.c: Improve comment and test commit mail sending.
Original commit message from CVS:
* tests/examples/controller/audio-example.c:
Improve comment and test commit mail sending.
2007-06-07 14:12:07 +00:00
Tim-Philipp Müller 2a3d26e66e Fix multiqueue leaking buffers and events when downstream or the queue are flushing. Make refcounting assumptions exp...
Original commit message from CVS:
* libs/gst/base/gstdataqueue.c:
* libs/gst/base/gstdataqueue.h:
* plugins/elements/gstmultiqueue.c: (gst_single_queue_push_one),
(gst_multi_queue_item_new), (gst_multi_queue_chain),
(gst_multi_queue_sink_event):
* tests/check/elements/multiqueue.c: (multiqueue_suite):
Fix multiqueue leaking buffers and events when downstream or the
queue are flushing. Make refcounting assumptions explicit and
document them (shouldn't break existing code that uses it other than
maybe leak miniobjects, but that already happens anyway). Add unit
test for the most common flushing case. Fixes #423700.
2007-06-06 18:11:10 +00:00
Sebastian Dröge c478fb4813 libs/gst/controller/: Factor out the 'set' logic into gst_controller_set_unlocked for the gst_controller_set and gst_...
Original commit message from CVS:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_set_interpolation_mode),
(gst_controlled_property_prepend_default),
(gst_controlled_property_new), (gst_controller_set_unlocked),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all):
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstinterpolation.c:
Factor out the 'set' logic into gst_controller_set_unlocked for the
gst_controller_set and gst_controller_set_from_list functions.
To make life of the interpolators easier always add a control point
at timestamp zero with the default value.
In the linear interpolator make things more obvious by better variable
naming (slope).
Implement cubic interpolation mode (by using a natural cubic spline)
and map the quadratic interpolation mode to this too (as quadratic
doesn't make much sense, see discussion on the list).
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
Add unit test for the cubic interpolation mode and check everywhere
if the interpolation mode could be set as expected.
2007-06-06 14:01:56 +00:00
Tim-Philipp Müller 505f3889ca API: add GstParamSpecFraction, so elements can have fraction properties without lots of painful string parsing (#4446...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/Makefile.am:
* gst/gst.c:
* gst/gst.h:
* gst/gstparamspecs.c: (_gst_param_fraction_init),
(_gst_param_fraction_set_default), (_gst_param_fraction_validate),
(_gst_param_fraction_values_cmp),
(gst_param_spec_fraction_get_type), (gst_param_spec_fraction):
* gst/gstparamspecs.h:
* gst/gstvalue.c:
* tests/check/Makefile.am:
* tests/check/gst/.cvsignore:
* tests/check/gst/gstparamspecs.c: (gst_dummy_obj_base_init),
(gst_dummy_obj_class_init), (gst_dummy_obj_init),
(gst_dummy_obj_set_property), (gst_dummy_obj_get_property),
(GST_START_TEST), (gst_param_spec_suite):
API: add GstParamSpecFraction, so elements can have fraction
properties without lots of painful string parsing (#444648).
2007-06-06 11:18:12 +00:00
Wim Taymans 74fb9f0fe2 tests/check/gst/gstbin.c: Allow refcount of 3 and 4 because some state thread might still be busy with it.
Original commit message from CVS:
* tests/check/gst/gstbin.c: (GST_START_TEST):
Allow refcount of 3 and 4 because some state thread might still be busy
with it.
2007-05-24 11:50:47 +00:00
Wim Taymans 20c719ae81 tests/check/gst/gstsystemclock.c: Improve test_async_order to also work when both timers are already expired when we ...
Original commit message from CVS:
* tests/check/gst/gstsystemclock.c: (store_callback),
(GST_START_TEST):
Improve test_async_order to also work when both timers are already
expired when we get scheduled to check it.
2007-05-23 13:56:25 +00:00
Tim-Philipp Müller e4ab657d95 plugins/: Use #ifdef for HAVE_XYZ for consistency.
Original commit message from CVS:
* plugins/elements/gstelements.c:
* plugins/elements/gstfilesink.c: (gst_file_sink_do_seek),
(gst_file_sink_get_current_offset):
* plugins/indexers/gstindexers.c: (plugin_init):
Use #ifdef for HAVE_XYZ for consistency.
* tests/check/Makefile.am:
* tests/check/elements/.cvsignore:
* tests/check/elements/filesink.c: (setup_filesink),
(cleanup_filesink), (GST_START_TEST), (filesink_suite):
Add some unit tests for filesink.
2007-05-22 11:55:33 +00:00
Sebastian Dröge 51424c0da5 libs/gst/controller/gstcontroller.*: Clarify the docs of gst_controller_get_value_array(): The array where the values...
Original commit message from CVS:
* libs/gst/controller/gstcontroller.c:
(gst_controller_get_value_array):
* libs/gst/controller/gstcontroller.h:
Clarify the docs of gst_controller_get_value_array(): The array where
the values should be written to must be allocated as there seems to be
no way to get the size of a random GType. This doesn't change any
behaviour. Also fix some typos all over the place and remove an unused,
commented function that is not necessary as g_object_set() could be
used instead.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
Add unit test for gst_controller_get_value_array().
2007-05-21 21:34:49 +00:00
Jan Schmidt 8482f46afe tests/check/gst/gstbuffer.c: Disable part of the gst_buffer_try_new_and_alloc test, because it can happily succeed on...
Original commit message from CVS:
* tests/check/gst/gstbuffer.c: (GST_START_TEST):
Disable part of the gst_buffer_try_new_and_alloc test, because
it can happily succeed on 64-bit systems where there's more address
space available.
2007-05-21 14:50:51 +00:00
Sebastian Dröge 375534ed10 tests/check/gst/gstpad.c: Add unit test for the improved caps checking from bug #421543.
Original commit message from CVS:
* tests/check/gst/gstpad.c: (GST_START_TEST), (gst_pad_suite):
Add unit test for the improved caps checking from bug #421543.
2007-05-21 12:05:56 +00:00
Sebastian Dröge b92d7dc076 libs/gst/controller/: Add a new private GstControlPoint struct which "inherits" from
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/gstcontroller.c: (gst_control_point_compare),
(gst_control_point_find), (gst_controlled_property_new),
(gst_control_point_free), (gst_controlled_property_free),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_sync_values):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstinterpolation.c:
(gst_controlled_property_find_control_point_node),
(interpolate_none_get), (interpolate_trigger_get):
Add a new private GstControlPoint struct which "inherits" from
GstTimedValue to allow different interpolators to store internal
values next to each control point. From the outside everything is
still a GstControlPoint so we don't loose binary compatibility.
Also fixup all the GValue handling to not leak GValues or list nodes.
* tests/check/libs/controller.c: (GST_START_TEST):
Free the list nodes and GValues in the controller_misc test.
2007-05-17 17:05:36 +00:00
Wim Taymans b50ecf0661 plugins/elements/gstqueue.*: Refactor an cleanup queue a bit.
Original commit message from CVS:
* plugins/elements/gstqueue.c: (gst_queue_init),
(gst_queue_finalize), (update_time_level), (apply_segment),
(apply_buffer), (gst_queue_locked_flush),
(gst_queue_locked_enqueue), (gst_queue_locked_dequeue),
(gst_queue_handle_sink_event), (gst_queue_chain),
(gst_queue_push_one), (gst_queue_loop):
* plugins/elements/gstqueue.h:
Refactor an cleanup queue a bit.
Do better time level calculations that also work when the srcpad is not
yet running.
Remove some unneeded debug lines.
* tests/check/elements/queue.c: (GST_START_TEST), (queue_suite):
Added testcase for time level measurement.
Try to make some stuff more racefree.
2007-05-12 15:35:40 +00:00
Tim-Philipp Müller 7f1acfb0c8 gst/gsturi.c: Don't leak plugin feature.
Original commit message from CVS:
* gst/gsturi.c: (gst_element_make_from_uri):
Don't leak plugin feature.
* tests/check/Makefile.am:
* tests/check/gst/.cvsignore:
* tests/check/gst/gsturi.c: (GST_START_TEST), (gst_uri_suite):
Add brain-dead unit test.
2007-05-11 14:46:10 +00:00
Peter Kjellerstedt f38b77d70b gst/: Maintain API and ABI when --disable-parse is used. Now that we have an appropriate error code, we can just retu...
Original commit message from CVS:
Based on patch by: Peter Kjellerstedt  <pkj at axis com>
* gst/Makefile.am:
* gst/gstparse.c: (gst_parse_launchv), (gst_parse_launch):
* gst/gstparse.h:
* gst/gstutils.c: (gst_parse_bin_from_description):
* gst/gstutils.h:
Maintain API and ABI when --disable-parse is used. Now that
we have an appropriate error code, we can just return NULL and the
appropriate error when gst_parse_launch() is used despite it having
been disabled (#342564).
* tests/check/Makefile.am:
* tests/check/pipelines/.cvsignore:
* tests/check/pipelines/parse-disabled.c:
Make sure these functions exist and return NULL plus a GError when
--disable-parse is used.
2007-05-09 16:32:07 +00:00
Tim-Philipp Müller cb67757934 tests/benchmarks/: Set a good example and don't leak messages.
Original commit message from CVS:
* tests/benchmarks/complexity.c: (main):
* tests/benchmarks/mass-elements.c: (main):
Set a good example and don't leak messages.
2007-05-09 10:01:35 +00:00
Tim-Philipp Müller 42651f72ff libs/gst/controller/: Don't crash if someone tries to set an interpolation mode that is invalid or that isn't support...
Original commit message from CVS:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_set_interpolation_mode):
* libs/gst/controller/gstinterpolation.c:
Don't crash if someone tries to set an interpolation mode that
is invalid or that isn't supported yet. Fixes #422295.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
Add a test case for the above.
2007-05-04 12:37:01 +00:00
Tim-Philipp Müller 2c5a8cdb31 API: add gst_buffer_try_new_and_alloc() plus unit test (#431940).
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstbuffer.c: (gst_buffer_try_new_and_alloc):
* gst/gstbuffer.h:
* tests/check/gst/gstbuffer.c: (GST_START_TEST),
(gst_buffer_suite):
API: add gst_buffer_try_new_and_alloc() plus unit test (#431940).
2007-04-26 10:00:49 +00:00
Stefan Kost dda5061b74 tests/benchmarks/: Total licensification.
Original commit message from CVS:
* tests/benchmarks/complexity.gnuplot:
* tests/benchmarks/complexity.scm:
* tests/benchmarks/mass-elements.gnuplot:
* tests/benchmarks/mass-elements.scm:
Total licensification.
2007-04-19 10:43:14 +00:00
Stefan Kost e4e5396411 tests/benchmarks/: Change licence to LGPL as granted by Benjamin and Andy.
Original commit message from CVS:
* tests/benchmarks/complexity.c:
* tests/benchmarks/mass-elements.c:
Change licence to LGPL as granted by Benjamin and Andy.
2007-04-19 08:40:33 +00:00
Jan Schmidt b9b5877a51 gst/gstelement.c: Don't output the same debug statement twice.
Original commit message from CVS:
* gst/gstelement.c: (gst_element_get_state_func):
Don't output the same debug statement twice.
* libs/gst/base/gstadapter.c: (gst_adapter_try_to_merge_up),
(gst_adapter_peek), (gst_adapter_take_buffer):
Optimise the case where we have buffers at the head of the queue that
can be joined quickly (because they're contiguous sub-buffers) by
merging them together rather than copying data out into new memory.
* gst/parse/grammar.y:
* tests/check/pipelines/parse-launch.c:
Fix a leak in an error path for parse_launch, and add a check
for it to the testsuite.
2007-04-13 11:53:00 +00:00
Wim Taymans 12c9334667 libs/gst/base/gstbasesink.c: Fix leak caused when refusing newsegment after EOS.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c:
(gst_base_sink_queue_object_unlocked), (gst_base_sink_event):
Fix leak caused when refusing newsegment after EOS.
* plugins/elements/gstfakesink.c: (gst_fake_sink_class_init),
(gst_fake_sink_init), (gst_fake_sink_set_property),
(gst_fake_sink_get_property), (gst_fake_sink_preroll),
(gst_fake_sink_render), (gst_fake_sink_change_state):
* plugins/elements/gstfakesink.h:
Add num-buffers property to make the element generate EOS after a
configurable amount of buffers.
API: fakesink::num-buffers property.
* tests/check/elements/fakesink.c: (GST_START_TEST),
(fakesink_suite):
Fix GstBus leak in test.
Test for fakesink num-buffers.
2007-04-05 11:16:09 +00:00
Wim Taymans cc82861367 libs/gst/base/gstbasesink.c: Don't accept anything after an EOS, return UNEXPECTED instead.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c:
(gst_base_sink_queue_object_unlocked), (gst_base_sink_event),
(gst_base_sink_change_state):
Don't accept anything after an EOS, return UNEXPECTED instead.
* tests/check/elements/fakesink.c: (GST_START_TEST),
(fakesink_suite):
Unit test for new EOS behaviour.
2007-04-05 10:10:08 +00:00
Tim-Philipp Müller df244cef04 plugins/elements/gstmultiqueue.c: Don't leak GCond.
Original commit message from CVS:
* plugins/elements/gstmultiqueue.c: (gst_single_queue_free):
Don't leak GCond.
* tests/check/Makefile.am:
* tests/check/elements/.cvsignore:
* tests/check/elements/multiqueue.c: (setup_multiqueue),
(GST_START_TEST), (multiqueue_suite):
Add some dead simple unit tests for the 'multiqueue' element
(some bits don't work yet and are disabled for now).
2007-03-28 18:38:11 +00:00
Wim Taymans 79e426d5f9 tests/check/gst/gstsystemclock.c: Unref some more to make valgrind happy.
Original commit message from CVS:
* tests/check/gst/gstsystemclock.c: (GST_START_TEST),
(mixed_thread), (mixed_async_cb), (gst_systemclock_suite):
Unref some more to make valgrind happy.
2007-03-22 12:31:54 +00:00
Wim Taymans 94054fc1b7 gst/gstsystemclock.c: Fix anoying regression that survived a few releases. When adding an async entry while blocking ...
Original commit message from CVS:
* gst/gstsystemclock.c: (gst_system_clock_id_wait_jitter_unlocked),
(gst_system_clock_id_wait_jitter),
(gst_system_clock_id_wait_async), (gst_system_clock_id_unschedule):
Fix anoying regression that survived a few releases. When adding an
async entry while blocking on a sync entry, the sync entry will unblock
but still be busy, so it should continue to wait instead of returning
_BUSY to the app.
Add some comments here and there.
* tests/check/gst/gstsystemclock.c: (mixed_thread),
(mixed_async_cb), (GST_START_TEST), (gst_systemclock_suite):
Add testcase for this.
2007-03-22 11:58:08 +00:00
Wim Taymans d14c4c4a67 docs/gst/gstreamer-sections.txt: Add new element field and method.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
Add new element field and method.
* gst/gstbin.c: (gst_bin_class_init), (gst_bin_init),
(bin_remove_messages), (gst_bin_add_func), (gst_bin_remove_func),
(gst_bin_recalc_state), (gst_bin_get_state_func),
(gst_bin_element_set_state), (gst_bin_change_state_func),
(gst_bin_continue_func), (bin_bus_handler),
(bin_push_state_continue), (bin_handle_async_start),
(bin_handle_async_done), (gst_bin_handle_message_func):
Make async state changes a bit smarter by using new ASYNC_START and
ASYNC_DONE messages. This reduces the number of times we run the state
recalculation thread.
Don't change state of element with a pending ASYNC_START message.
Deprecate STATE_DIRTY messages.
* gst/gstelement.c: (gst_element_init), (gst_element_send_event),
(gst_element_get_state_func), (gst_element_continue_state),
(gst_element_lost_state), (gst_element_set_state_func),
(gst_element_change_state):
* gst/gstelement.h:
Keep the state that was last set by the app in a new element field.
Don't allow state changes when handling an element event.
Post ASYNC_START and ASYNC_DONE messages.
Change lost_state so that we go to PAUSED and wait for the parent to set
us to PLAYING again (so latency calculation can be performed)
Export gst_element_change_state() method so that subclasses can use it.
API: gst_element_change_state()
API: GST_STATE_TARGET
* gst/gstpipeline.c: (gst_pipeline_class_init),
(reset_stream_time), (gst_pipeline_change_state),
(gst_pipeline_handle_message), (gst_pipeline_set_new_stream_time):
Using the new ASYNC_START message we can reset the base_time when
needed. This can then be used to implement base_time redistribution in
flushing seeks so that we can remove the explicit seek handling.
Perform latency query and configuration when going to PLAYING.
* libs/gst/base/gstbasesink.c: (gst_base_sink_commit_state),
(gst_base_sink_query), (gst_base_sink_change_state):
Post new ASYNC_START/ASYNC_DONE messages.
* tests/check/generic/sinks.c: (GST_START_TEST):
Fix test because the bin will not set the async element to PLAYING right
away.
* tests/check/gst/gstbin.c: (pop_async_done), (GST_START_TEST):
Make the message check a little stronger.
Handle ASYNC messages.
* tests/check/pipelines/cleanup.c: (GST_START_TEST):
* tests/check/pipelines/simple-launch-lines.c: (GST_START_TEST):
Expect ASYNC_DONE messages.
2007-03-19 10:47:56 +00:00
Wim Taymans b864edefbd libs/gst/base/gstbasesink.c: Improve latency query code.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_query_latency),
(gst_base_sink_queue_object_unlocked), (gst_base_sink_send_event),
(gst_base_sink_change_state):
Improve latency query code.
Don't leak latency events.
* tests/check/gst/gstbin.c: (GST_START_TEST):
Improve debugging.
2007-02-28 16:46:07 +00:00
Thomas Vander Stichele 7d42056b8e plug test leak
Original commit message from CVS:
plug test leak
2007-02-28 12:57:42 +00:00
Thomas Vander Stichele 85c1dc5c9d actually use the env var for tests
Original commit message from CVS:
actually use the env var for tests
2007-02-28 12:43:57 +00:00
Thomas Vander Stichele 155fa0066d tests/check/generic/states.c: Copy the current generic/states example from -base and adapt so we can use the exact sa...
Original commit message from CVS:
* tests/check/generic/states.c: (GST_START_TEST), (states_suite):
Copy the current generic/states example from -base and adapt so
we can use the exact same code everywhere.
Check a STATES_IGNORE_ELEMENTS env var which can be used
to ignore certain element factories for this test, which is
what is being done in -base
* tests/check/Makefile.am:
Mention this environment variable.
2007-02-28 12:40:45 +00:00
Wim Taymans 7553c996a4 API: gst_bus_timed_pop()
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstbus.c: (gst_bus_init), (gst_bus_dispose), (gst_bus_post),
(gst_bus_timed_pop), (gst_bus_pop):
* gst/gstbus.h:
API: gst_bus_timed_pop()
Implement gst_bus_timed_pop() to do a blocking timed wait for a
message to arrive on the bus.
* tests/check/gst/gstbus.c: (GST_START_TEST), (pop_thread),
(gst_bus_suite):
Two unit tests for new _timed_pop() function.
2007-02-27 17:22:07 +00:00
Wim Taymans 6f24e3101e tests/check/gst/gstevent.c: Improve debugging.
Original commit message from CVS:
* tests/check/gst/gstevent.c: (event_probe), (test_event),
(GST_START_TEST):
Improve debugging.
2007-02-15 08:40:38 +00:00
Wim Taymans e683477828 tests/check/gst/gstsegment.c: Fix check
Original commit message from CVS:
* tests/check/gst/gstsegment.c: (GST_START_TEST):
Fix check
2007-02-13 15:51:00 +00:00
Wim Taymans a25cedb415 docs/design/draft-latency.txt: Small update.
Original commit message from CVS:
* docs/design/draft-latency.txt:
Small update.
* docs/libs/gstreamer-libs-sections.txt:
* libs/gst/base/gstbasesink.c: (gst_base_sink_class_init),
(gst_base_sink_get_latency), (gst_base_sink_query_latency),
(gst_base_sink_wait_clock), (gst_base_sink_send_qos),
(gst_base_sink_perform_qos), (gst_base_sink_queue_object_unlocked),
(gst_base_sink_chain_unlocked), (gst_base_sink_send_event),
(gst_base_sink_get_position), (gst_base_sink_query),
(gst_base_sink_change_state):
* libs/gst/base/gstbasesink.h:
API: gst_base_sink_query_latency() to let subclasses query the upstream
latency.
API: gst_base_sink_get_latency() to let subclasses query the configured
latency in the sink.
Implement query and set latency.
Update some docs.
As spotted by Will Newton <will dot newton at gmail dot com>: Make sure we
don't continue preroll when we are flushing. Fixes #405284.
* tests/check/pipelines/stress.c: (change_state_timeout),
(quit_timeout), (GST_START_TEST), (stress_suite):
Test for #405284.
2007-02-12 11:32:22 +00:00
Andy Wingo d87ccbe0f4 tests/check/pipelines/simple-launch-lines.c
Original commit message from CVS:
2007-02-09  Andy Wingo  <wingo@pobox.com>

* tests/check/pipelines/simple-launch-lines.c
(simple_launch_lines_suite, test_tee): Disable tee test until I
have time to fix it :-(
2007-02-09 15:25:45 +00:00
Andy Wingo 96d9b88bbc tests/check/: Add ABI checks for PPC32.
Original commit message from CVS:
2007-02-09  Andy Wingo  <wingo@pobox.com>

* tests/check/Makefile.am (noinst_HEADERS):
* tests/check/libs/libsabi.c:
* tests/check/libs/struct_ppc32.h: Add ABI checks for PPC32.
* tests/check/gst/gstabi.c:
* tests/check/gst/struct_ppc32.h: Add ABI checks for PPC32.
2007-02-09 13:59:32 +00:00
Andy Wingo 1a95191ff5 tests/check/pipelines/simple-launch-lines.c (test_tee): Add tests for push and pull tee behavior.
Original commit message from CVS:
2007-02-09  Andy Wingo  <wingo@pobox.com>

* tests/check/pipelines/simple-launch-lines.c (test_tee): Add
tests for push and pull tee behavior.

* plugins/elements/gsttee.h:
* plugins/elements/gsttee.c: Describe has-sink-loop better, and
mark as deprecated as well as unimplemented. It was a crack idea.
Add support for tee operating in pull mode, off by default.
2007-02-09 13:45:27 +00:00
Sebastian Dröge e8f48c03f4 tests/check/elements/filesrc.c: Add unit test for the GstURIHandler interface in filesrc. This also tests the newly a...
Original commit message from CVS:
* tests/check/elements/filesrc.c: (GST_START_TEST),
(filesrc_suite):
Add unit test for the GstURIHandler interface in filesrc. This also
tests the newly added file://localhost/foo/bar support.
2007-02-05 08:15:26 +00:00
Tim-Philipp Müller 7cd0c45ee0 tests/check/: Add ABI structs for HPPA (see #393796).
Original commit message from CVS:
* tests/check/gst/gstabi.c:
* tests/check/gst/struct_hppa.h:
* tests/check/libs/libsabi.c:
* tests/check/libs/struct_hppa.h:
Add ABI structs for HPPA (see #393796).
2007-01-17 12:31:01 +00:00
Stefan Kost 5826d1676c tests/check/gst/gsttask.c: Fix header comment.
Original commit message from CVS:
* tests/check/gst/gsttask.c:
Fix header comment.
2007-01-15 14:51:09 +00:00
Tim-Philipp Müller 52a29f5bb4 tests/check/: Add minimal unit test for beforementioned GstTagSetter bug.
Original commit message from CVS:
* tests/check/Makefile.am:
* tests/check/gst/.cvsignore:
* tests/check/gst/gsttagsetter.c: (gst_dummy_enc_add_interfaces),
(gst_dummy_enc_base_init), (gst_dummy_enc_class_init),
(gst_dummy_enc_init), (tag_list_foreach), (tag_setter_list_length),
(GST_START_TEST), (gst_tag_setter_suite):
Add minimal unit test for beforementioned GstTagSetter bug.
2007-01-12 10:53:54 +00:00
Tim-Philipp Müller 4a911a8100 tests/check/gst/gstpad.c: Fix 'make check' too.
Original commit message from CVS:
* tests/check/gst/gstpad.c: (test_get_allowed_caps):
Fix 'make check' too.
2007-01-11 10:48:59 +00:00
Tim-Philipp Müller 2b63322224 tests/check/.cvsignore: Ignore test-registry.xml as well.
Original commit message from CVS:
* tests/check/.cvsignore:
Ignore test-registry.xml as well.
2007-01-09 14:38:11 +00:00
Tim-Philipp Müller 702fbf77e9 API: add gst_update_registry() (#391296).
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gst.c: (load_plugin_func), (scan_and_update_registry),
(init_post), (gst_deinit), (gst_update_registry):
* gst/gst.h:
API: add gst_update_registry() (#391296).
* tests/check/Makefile.am:
* tests/check/gst/gstregistry.c:
* tests/check/gst/.cvsignore:
Simple unit test for the above.
2007-01-08 20:30:12 +00:00
Tim-Philipp Müller 2991d5cd33 gst/gstregistry.c: Plugin extension on HP-UX is .sl, add that to the list of approved plugin extensions (see #393796).
Original commit message from CVS:
* gst/gstregistry.c: (gst_registry_scan_path_level):
Plugin extension on HP-UX is .sl, add that to the list of approved
plugin extensions (see #393796).
* tests/check/gst/gstpad.c: (GST_START_TEST):
ulong => gulong. Fixes compilation with HP-UX compiler.
* tests/check/pipelines/parse-launch.c: (GST_START_TEST):
Fix compilation if valgrind headers are not available.
2007-01-08 16:23:03 +00:00
Stefan Kost fcd5faf825 tests/check/Makefile.am: disable test again, as there seem to be still race problems
Original commit message from CVS:
* tests/check/Makefile.am:
disable test again, as there seem to be still race problems
2007-01-04 13:54:25 +00:00
Stefan Kost 6fe3fda99e tests/check/: enable queue test again, add tests for the leaky behaviour
Original commit message from CVS:
* tests/check/Makefile.am:
* tests/check/elements/queue.c: (queue_overrun), (queue_underrun),
(GST_START_TEST), (queue_suite):
enable queue test again, add tests for the leaky behaviour
2007-01-04 13:37:08 +00:00
Tim-Philipp Müller 40f4221ac5 Compile adapter test/example only if the required headers are available (fixes #391915).
Original commit message from CVS:
* configure.ac:
* tests/examples/Makefile.am:
Compile adapter test/example only if the required headers are
available (fixes #391915).
2007-01-02 17:01:33 +00:00
Stefan Kost 8bfabdfe1c tests/check/: sync .cvsignome and CLEANFILES
Original commit message from CVS:
* tests/check/.cvsignore:
* tests/check/Makefile.am:
sync .cvsignome and CLEANFILES
2006-12-21 15:54:06 +00:00
Stefan Kost 24d07724be tests/check/Makefile.am: fix distcheck
Original commit message from CVS:
* tests/check/Makefile.am:
fix distcheck
2006-12-21 15:32:00 +00:00
Stefan Kost 261abbb01e docs/design/part-states.txt: two tiny additional comments
Original commit message from CVS:
* docs/design/part-states.txt:
two tiny additional comments
* gst/gststructure.c:
doc fixing
* tests/check/Makefile.am:
* tests/check/elements/queue.c: (queue_overrun), (queue_underrun),
(GST_START_TEST):
disable test for now, unless it gets fixed
2006-12-21 15:00:08 +00:00
Stefan Kost a378db54fb tests/check/elements/queue.c: fix race in underrun test
Original commit message from CVS:
* tests/check/elements/queue.c: (queue_overrun), (queue_underrun),
(GST_START_TEST):
fix race in underrun test
2006-12-21 14:24:54 +00:00
Stefan Kost 63873698c3 tests/check/elements/.cvsignore: ignore more
Original commit message from CVS:
* tests/check/elements/.cvsignore:
ignore more
* tests/check/elements/queue.c: (queue_overrun), (queue_underrun),
(GST_START_TEST):
try to narrow test failure
2006-12-21 09:58:25 +00:00
Stefan Kost c9fbb589a0 libs/gst/check/gstcheck.c: do not automatically (de)activate pads
Original commit message from CVS:
* libs/gst/check/gstcheck.c: (gst_check_setup_src_pad),
(gst_check_teardown_src_pad), (gst_check_setup_sink_pad),
(gst_check_teardown_sink_pad):
do not automatically (de)activate pads
* tests/check/Makefile.am:
* tests/check/elements/queue.c: (queue_overrun), (queue_underrun),
(setup_queue), (cleanup_queue), (GST_START_TEST), (queue_suite):
add new, yet simple tests for queue
* tests/check/elements/fakesrc.c: (cleanup_fakesrc):
* tests/check/elements/fdsrc.c: (cleanup_fdsrc):
* tests/check/elements/filesrc.c: (cleanup_filesrc),
(GST_START_TEST):
* tests/check/elements/identity.c: (cleanup_identity):
consistent pad (de)activation
2006-12-21 08:12:28 +00:00
Edward Hervey f65a1d384e gst/gstsegment.c: Fine tune the cases where the segment start/stop values are really updated.
Original commit message from CVS:
* gst/gstsegment.c: (gst_segment_set_seek):
Fine tune the cases where the segment start/stop values are really
updated.
* tests/check/gst/gstsegment.c: (GST_START_TEST):
Add tests for the return values of gst_segment_set_seek().
2006-12-19 12:38:00 +00:00
Jan Schmidt 5a79cb9ede tests/check/gst/gstbin.c: It is acceptable to have a refcount of 2 or 3 at this point in the test, because the pipeli...
Original commit message from CVS:
* tests/check/gst/gstbin.c: (GST_START_TEST):
It is acceptable to have a refcount of 2 or 3 at this point in the
test, because the pipeline might be just posting its state_change
message. The next line then waits for that message to appear using
bus_poll, so that should be fine too.
2006-12-09 20:23:10 +00:00
René Stadler a258e87342 gst/gstclock.c: Make period ids add the interval to the origial requested time instead of the possibly updated time w...
Original commit message from CVS:
Patch by: René Stadler <mail at renestadler dot de>
* gst/gstclock.c: (gst_clock_id_wait):
Make period ids add the interval to the origial requested time instead
of the possibly updated time which can be wrong when there are multiple
waiters for the same id. Fixes #382592.
* gst/gstsystemclock.c: (gst_system_clock_async_thread),
(gst_system_clock_id_wait_jitter_unlocked),
(gst_system_clock_id_wait_jitter):
Fix restart in the async notify thread when an async entry is added to
the front of the list. Fixes #381492.
* tests/check/gst/gstsystemclock.c: (store_callback),
(notify_callback), (GST_START_TEST), (gst_systemclock_suite):
Added test for multiple async waits.
Added test for async wait order.
2006-12-07 10:51:36 +00:00
Wim Taymans f830f6f4ac gst/gstsegment.c: Fix boundary checking in to_running_time() and to_stream_time().
Original commit message from CVS:
* gst/gstsegment.c: (gst_segment_set_seek),
(gst_segment_set_newsegment_full), (gst_segment_to_stream_time),
(gst_segment_to_running_time):
Fix boundary checking in to_running_time() and to_stream_time().
Fixes #377183.
* tests/check/gst/gstsegment.c: (GST_START_TEST):
stream and running time can now be calculated for the complete
clipped segment.
2006-11-20 10:27:49 +00:00
Jan Schmidt ee1a56dff6 tests/examples/adapter/.cvsignore: Ignore build file as commanded by the build-bot
Original commit message from CVS:
* tests/examples/adapter/.cvsignore:
Ignore build file as commanded by the build-bot
2006-11-09 15:25:39 +00:00
Jan Schmidt e8d23be3ac tests/examples/adapter/: Add new files from the previous commit
Original commit message from CVS:
* tests/examples/adapter/Makefile.am:
* tests/examples/adapter/adapter_test.c: (run_test_take),
(run_test_take_buffer), (run_tests), (main):
Add new files from the previous commit
2006-11-09 14:38:59 +00:00
Jan Schmidt 6f363cd89b Do some optimisation work in GstAdapter to avoid copies in more cases.
Original commit message from CVS:
* Makefile.am:
* configure.ac:
* libs/gst/base/gstadapter.c: (gst_adapter_clear),
(gst_adapter_push), (gst_adapter_peek_into), (gst_adapter_peek),
(gst_adapter_flush), (gst_adapter_take), (gst_adapter_take_buffer):
* libs/gst/base/gstadapter.h:
* tests/check/libs/adapter.c: (create_and_fill_adapter),
(GST_START_TEST), (gst_adapter_suite):
* tests/examples/Makefile.am:
Do some optimisation work in GstAdapter to avoid copies in more cases.
It could still do slightly better by merging buffers when
gst_buffer_is_span_fast is true, but is already faster.
Also, avoid traversing a single-linked list to append each incoming
buffer inside the adapter.
Add simple test app that times the adapter behaviour in different
situations, and extend the unit test to check that bytes enter and
exit the adapter in their original order.
2006-11-09 14:37:38 +00:00
Tim-Philipp Müller 32e77c38a9 tests/examples/typefind/typefind.c: Make typefind element example work again (#371894); add a license header.
Original commit message from CVS:
* tests/examples/typefind/typefind.c: (type_found), (main):
Make typefind element example work again (#371894); add a
license header.
2006-11-08 02:03:48 +00:00
Stefan Kost 234221776e tests/check/gst/gsttag.c: relicence (okay with author=company)
Original commit message from CVS:
* tests/check/gst/gsttag.c:
relicence (okay with author=company)
2006-11-06 15:22:40 +00:00
Tim-Philipp Müller c7fc3dc0e8 gst/gststructure.c: If someone tries to set a non-UTF8 string field on a structure, don't just print a warning, but a...
Original commit message from CVS:
* gst/gststructure.c: (gst_structure_id_set_value):
If someone tries to set a non-UTF8 string field on a structure,
don't just print a warning, but also ignore the request and do
not change/add that field to the structure.
* tests/check/gst/gsttag.c: (GST_START_TEST), (gst_tag_suite):
Test for the above.
2006-10-26 08:49:52 +00:00
Tim-Philipp Müller db8e173590 libs/gst/controller/gstcontroller.c: Fix refcounting here too, just like we did for _new_valist() a few days ago (#35...
Original commit message from CVS:
* libs/gst/controller/gstcontroller.c: (gst_controller_new_list):
Fix refcounting here too, just like we did for _new_valist() a few
days ago (#357180) (thanks to René Stadler). Also remove all those
'Since: 0.9' from the gtk-doc blobs.
* tests/check/libs/controller.c: (controller_refcount_new_list),
(gst_controller_suite):
Unit test for the above.
2006-10-11 09:13:26 +00:00
Wim Taymans 0a53651b1f gst/gstevent.c: Rename some more @cur to @start to fix docs.
Original commit message from CVS:
* gst/gstevent.c: (gst_event_new_seek), (gst_event_parse_seek):
Rename some more @cur to @start to fix docs.
* gst/gstsegment.c: (gst_segment_set_seek):
Fix typo.
time and start must always stay in sync as defined in design doc.
* gst/gsttaglist.c: (gst_tag_list_is_empty):
Rename param to fix docs.
* tests/check/gst/gstsegment.c: (GST_START_TEST):
Check that start and time are in sync.
* tests/check/pipelines/parse-launch.c:
(gst_parse_test_element_change_state):
Activate pad before adding to the element.
2006-10-09 17:15:39 +00:00
Wim Taymans 89814eed61 docs/design/part-qos.txt: Fix typo.
Original commit message from CVS:
* docs/design/part-qos.txt:
Fix typo.
* gst/gstevent.c:
* gst/gstevent.h:
Update seek event docs regarding negative rates.
Rename @cur to @start.
* gst/gstsegment.c: (gst_segment_set_seek):
* gst/gstsegment.h:
Update set_seek docs regarding negative rates.
Correctly update last_stop to @stop when dealing with negative
rates.
Rename @cur to @start.
* tests/check/gst/gstpad.c: (GST_START_TEST):
Activate pads before trying to use them.
* tests/check/gst/gstsegment.c: (GST_START_TEST),
(gst_segment_suite):
Add simple check for segments and negative rates.
2006-10-09 16:33:29 +00:00
Tim-Philipp Müller 3a8fdc1d39 API: add gst_tag_list_is_empty() (#360467).
Original commit message from CVS:
* gst/gsttaglist.c: (gst_tag_list_is_empty):
* gst/gsttaglist.h:
* docs/gst/gstreamer-sections.txt:
API: add gst_tag_list_is_empty() (#360467).
* tests/check/gst/gsttag.c: (GST_START_TEST):
And a test case.
2006-10-09 11:20:44 +00:00
Tim-Philipp Müller 35ae6c7472 gst/gsttaglist.*: Minor fixes to GST_IS_TAG_LIST and gst_is_tag_list().
Original commit message from CVS:
* gst/gsttaglist.c: (gst_is_tag_list):
* gst/gsttaglist.h:
Minor fixes to GST_IS_TAG_LIST and gst_is_tag_list().
* tests/check/gst/gsttag.c: (GST_START_TEST), (gst_tag_suite):
Small test for the above.
2006-10-07 18:41:19 +00:00
Wim Taymans 15b2ccbcc9 tests/check/gst/gstghostpad.c: Fix leak in check.
Original commit message from CVS:
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Fix leak in check.
2006-10-02 16:46:16 +00:00
Alessandro Decina 86a6abe32d gst/gstevent.c: Fix gst_mini_object_make_writable() and gst_event_copy() for events with event structures by setting ...
Original commit message from CVS:
Patch by: Alessandro Decina  <alessandro at nnva org>
* gst/gstevent.c: (_gst_event_copy):
Fix gst_mini_object_make_writable() and gst_event_copy() for events
with event structures by setting the parent refcount address of the
copied structure to the address of the refcount member of the newly
copied event rather than the address of the refcount member of the
original event. Fixes #358737.
* tests/check/gst/gstevent.c: (GST_START_TEST):
Unit test for the above.
2006-10-02 08:37:24 +00:00
Tim-Philipp Müller c67ec73df6 tests/check/libs/controller.c: Add test for the previous fix; add some more tests for correct refcounting behaviour; ...
Original commit message from CVS:
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
Add test for the previous fix; add some more tests
for correct refcounting behaviour; fix a few leaks
in test cases; call gst_controller_init() at start
of all tests.
2006-09-29 12:31:18 +00:00
Jan Schmidt 7242cc1520 tests/examples/manual/.cvsignore: OK, so it's actually cvsignore that needs changing. Stop laughing.
Original commit message from CVS:
* tests/examples/manual/.cvsignore:
OK, so it's actually cvsignore that needs changing. Stop laughing.
2006-09-28 15:52:04 +00:00
Jan Schmidt 0657ec204c tests/examples/manual/Makefile.am: Gah, declare vars *before* using them
Original commit message from CVS:
* tests/examples/manual/Makefile.am:
Gah, declare vars *before* using them
2006-09-28 15:27:12 +00:00
Jan Schmidt d1effe5859 gst/: Re-commit the registry changes, along with an extra fix:
Original commit message from CVS:
* gst/gst.c: (init_pre), (scan_and_update_registry),
(ensure_current_registry_nonforking),
(ensure_current_registry_forking), (ensure_current_registry),
(init_post), (gst_debug_help), (gst_deinit):
* gst/gst_private.h:
* gst/gstregistry.c: (gst_registry_finalize),
(gst_registry_remove_features_for_plugin_unlocked),
(gst_registry_remove_plugin), (gst_registry_scan_path_level),
(gst_registry_scan_path),
(_priv_gst_registry_remove_cache_plugins),
(_priv_gst_registry_cleanup):
* gst/gstregistry.h:
Re-commit the registry changes, along with an extra fix:
When a cached plugin is encountered at a different file path,
update the stored path in the registry cache so that the parent
process knows where it actually is now when it re-reads the registry
cache. Fixes the thing that broke distcheck with the previous commit.
* tests/check/Makefile.am:
Clean up files named 'core' too when running make clean.
* tests/examples/manual/Makefile.am:
Set up a registry path for running these tests, and clean it properly
for distcheck.
2006-09-28 14:00:43 +00:00
Tim-Philipp Müller b74d2e83a6 tests/check/gst/gstcaps.c: Add some tests for gst_caps_intersect().
Original commit message from CVS:
* tests/check/gst/gstcaps.c: (GST_START_TEST), (gst_caps_suite):
Add some tests for gst_caps_intersect().
* tools/gst-launch.c: (event_loop):
Print all buffering percentages we get, even the 100% one.
2006-09-27 09:23:18 +00:00
Tim-Philipp Müller f3c07d5d20 gst/gstformat.c: Fix locking order (must take lock before using n_values).
Original commit message from CVS:
* gst/gstformat.c: (gst_format_register):
Fix locking order (must take lock before using n_values).
* gst/gstvalue.c: (gst_value_serialize_enum),
(gst_value_deserialize_enum_iter_cmp),
(gst_value_deserialize_enum):
Fix serialisation/deserialisation of custom registered GstFormats.
* tests/check/gst/gstvalue.c: (GST_START_TEST), (gst_value_suite):
Unit test for custom format serialisation/deserialisation.
2006-09-17 19:26:16 +00:00
Thomas Vander Stichele 147373d4a7 Extract the manual examples again like we used to do.
Original commit message from CVS:
* configure.ac:
* docs/manual/advanced-autoplugging.xml:
* tests/examples/Makefile.am:
* tests/examples/manual/.cvsignore:
* tests/examples/manual/Makefile.am:
* tests/examples/manual/extract.pl:
Extract the manual examples again like we used to do.
Fix one of them.
2006-09-16 10:49:47 +00:00
Wim Taymans bb634398b7 gst/: Small cleanups in docs and code.
Original commit message from CVS:
* gst/gstobject.c: (gst_object_set_parent):
* gst/gstpipeline.c: (do_pipeline_seek):
Small cleanups in docs and code.
* gst/gstsegment.c: (gst_segment_clip):
* tests/check/gst/gstsegment.c: (GST_START_TEST):
if stop == start and start is in the segment, no clipping should be
done. Also add a test for this.
2006-09-15 08:43:44 +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
Tim-Philipp Müller ab00f16f12 gst/gstxml.c: Improve and detypofy docs.
Original commit message from CVS:
* gst/gstxml.c:
Improve and detypofy docs.
* tests/check/Makefile.am:
* tests/check/gst/.cvsignore:
* tests/check/gst/gstxml.c: (GST_START_TEST), (gst_xml_suite):
Add a basic test suite for GstXML.
2006-08-29 10:49:03 +00:00
Wim Taymans a0dbcd9ee4 gst/gstcaps.*: Fix docs and indentation again.
Original commit message from CVS:
* gst/gstcaps.c: (gst_caps_merge_structure):
* gst/gstcaps.h:
Fix docs and indentation again.
* tests/check/gst/gstquery.c: (GST_START_TEST):
Fix leak in tests and add some more tests.
2006-08-28 16:39:20 +00:00
Torsten Schoenfeld 481238cfce Initialize variables when creating a new segment query.
Original commit message from CVS:
Patch by: Torsten Schoenfeld <kaffeetisch at gmx dot de>
* gst/gstquery.c: (gst_query_new_segment):
* tests/check/gst/gstquery.c: (GST_START_TEST):
Initialize variables when creating a new segment query.
Fixes #353121.
2006-08-28 08:44:29 +00:00
Torsten Schoenfeld 7fc02489e3 Check for NULL before _reffing the bus. Fixes #353122.
Original commit message from CVS:
Patch by: Torsten Schoenfeld <kaffeetisch at gmx dot de>
* gst/gstelement.c: (gst_element_get_bus):
* tests/check/gst/gstelement.c: (GST_START_TEST):
Check for NULL before _reffing the bus. Fixes #353122.
2006-08-28 08:35:31 +00:00
Tim-Philipp Müller e8578fd5cf tests/check/gst/gstcaps.c: Don't leak caps in unit test; add a few more simple checks.
Original commit message from CVS:
* tests/check/gst/gstcaps.c: (GST_START_TEST):
Don't leak caps in unit test; add a few more simple
checks.
2006-08-24 12:30:04 +00:00
Stefan Kost fc8d184bba implement caps merging (fixes #352580)
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstcaps.c: (gst_caps_structure_is_subset_field),
(gst_caps_structure_is_subset), (gst_caps_merge),
(gst_caps_merge_structure):
* gst/gstcaps.h:
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_transform_caps):
* tests/check/gst/gstcaps.c: (GST_START_TEST), (gst_caps_suite):
implement caps merging (fixes #352580)
2006-08-24 10:40:31 +00:00