Commit graph

556 commits

Author SHA1 Message Date
Olivier Crete
68037404b8 Add threadsafe replacement functions for getting internal links of an element. Deprecate the old internal links funct...
Original commit message from CVS:
Based on patch by: Olivier Crete <tester at tester dot ca>
* docs/gst/gstreamer-sections.txt:
* win32/common/libgstreamer.def:
* gst/gstpad.c: (gst_pad_init),
(gst_pad_set_iterate_internal_links_function),
(int_link_iter_data_free), (iterate_pad),
(gst_pad_iterate_internal_links_default),
(gst_pad_iterate_internal_links), (gst_pad_get_internal_links):
* gst/gstpad.h:
Add threadsafe replacement functions for getting internal links of an
element. Deprecate the old internal links functions.
API:GstPad::gst_pad_set_iterate_internal_links_function()
API:GstPad::GstPadIterIntLinkFunction
API:GstPad::gst_pad_iterate_internal_links()
API:GstPad::gst_pad_iterate_internal_links_default()
* gst/gstghostpad.c: (gst_proxy_pad_do_iterate_internal_links),
(gst_proxy_pad_init):
Implement threadsafe internal links.
* tests/check/elements/tee.c: (GST_START_TEST), (tee_suite):
Unit test for internal links on tee. See #549504.
2008-09-01 10:42:04 +00:00
Edward Hervey
1639fb5905 tests/check/Makefile.am: libs/transform1 test requires libs/test_transform.c
Original commit message from CVS:
* tests/check/Makefile.am:
libs/transform1 test requires libs/test_transform.c
2008-08-30 12:57:47 +00:00
Edward Hervey
dd80b2030c Fix all leaks due to the bug in gst_pad_template_new() by which it does not steal the refcount of the given caps as s...
Original commit message from CVS:
* gst/gstutils.c: (gst_element_get_compatible_pad):
* tests/check/gst/gstghostpad.c: (GST_START_TEST):
* tests/check/gst/gstpad.c: (name_is_valid), (GST_START_TEST):
Fix all leaks due to the bug in gst_pad_template_new() by which it does
not steal the refcount of the given caps as stated.
REVERT THIS COMMIT ONCE FIXED !
REVERT THIS COMMIT ONCE FIXED !
REVERT THIS COMMIT ONCE FIXED !
REVERT THIS COMMIT ONCE FIXED !
REVERT THIS COMMIT ONCE FIXED !
REVERT THIS COMMIT ONCE FIXED !
2008-08-30 11:55:59 +00:00
Wim Taymans
e93b94afdf libs/gst/base/gstbasesink.c: Improve position reporting in the flushing state.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_render_object),
(gst_base_sink_event), (gst_base_sink_chain_unlocked),
(gst_base_sink_negotiate_pull), (gst_base_sink_pad_activate_pull),
(gst_base_sink_get_position), (gst_base_sink_change_state):
Improve position reporting in the flushing state.
Also report the position when we are not yet prerolled but we
have a newsegment event. Fixes #543444.
Improve the pull-based negotiation code.
* tests/check/elements/fakesink.c: (GST_START_TEST),
(fakesink_suite):
Add testcase for position reporting while flushing in PAUSED and
PLAYING.
* tests/check/generic/sinks.c: (GST_START_TEST):
Update unit-test, we can now query the position as soon as we receive a
NEWSEGMENT event.
2008-08-19 16:47:07 +00:00
Ole André Vadla Ravnås
fe969e6391 plugins/elements/gsttee.*: Protect pad_alloc with a new lock so that we can be sure that nothing is performing a pad_...
Original commit message from CVS:
Patch by: Ole André Vadla Ravnås  <ole.andre.ravnas at tandberg com>
* plugins/elements/gsttee.c: (gst_tee_finalize), (gst_tee_init),
(gst_tee_request_new_pad), (gst_tee_release_pad),
(gst_tee_find_buffer_alloc), (gst_tee_buffer_alloc):
* plugins/elements/gsttee.h:
Protect pad_alloc with a new lock so that we can be sure that nothing is
performing a pad_alloc when removing the pad. Fixes #547835.
* tests/check/elements/tee.c: (buffer_alloc_harness_setup),
(buffer_alloc_harness_teardown), (app_thread_func),
(final_sinkpad_bufferalloc), (GST_START_TEST), (tee_suite):
Added testcase for shutdown race.
2008-08-15 17:01:07 +00:00
Wim Taymans
dc9983cbea libs/gst/base/gstbasetransform.c: Don't overwrite the outsize when calculating the expected size of a new buffer beca...
Original commit message from CVS:
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_transform_caps),
(gst_base_transform_prepare_output_buffer),
(gst_base_transform_buffer_alloc), (gst_base_transform_suggest):
Don't overwrite the outsize when calculating the expected size of a new
buffer because we still need it in case we cannot process the new
buffer.
When converting the size of the new buffer to an upstream size, actually
use the expected size of the buffer, not some other random value.
Use an atomic int to signal that a new upstream caps suggestion is
available.
When we can convert the current buffer to a new format, check if the
buffer size is of the expected size and allocate a new buffer of the
expected size when this is not the case.
* tests/check/libs/transform1.c: (GST_START_TEST):
remove ifdeffed code from the unit test.
2008-08-14 13:57:58 +00:00
Wim Taymans
b08cd83cbb gst/gstcaps.c: Fix subset test.
Original commit message from CVS:
* gst/gstcaps.c: (gst_caps_structure_is_subset_field):
Fix subset test.
* tests/check/gst/gstcaps.c: (GST_START_TEST):
Improve unit test subset tests and add a testcase for the subset failure
cases.
* tests/check/gst/gstvalue.c: (GST_START_TEST), (gst_value_suite):
Improve subtraction unit test.
2008-08-07 12:28:28 +00:00
Olivier Crete
70a4cad10c gst/gststructure.c: Avoid overflows in fixation code when dealing with MAXINT values, which v4l2src seems to do.
Original commit message from CVS:
Patch by: Olivier Crete <tester at tester dot ca>
* gst/gststructure.c:
(gst_structure_fixate_field_nearest_fraction):
Avoid overflows in fixation code when dealing with MAXINT values, which
v4l2src seems to do.
Fixes #546328.
* tests/check/gst/gststructure.c: (GST_START_TEST):
Make a unit test to check the fix.
2008-08-05 15:03:27 +00:00
Wim Taymans
30f8603645 docs/libs/gstreamer-libs-sections.txt: Add new function:
Original commit message from CVS:
* docs/libs/gstreamer-libs-sections.txt:
Add new function:
API: GstBaseTransform::gst_base_transform_suggest()
* libs/gst/base/gstbasetransform.c: (gst_base_transform_finalize),
(gst_base_transform_init), (gst_base_transform_transform_caps),
(gst_base_transform_transform_size),
(gst_base_transform_configure_caps),
(gst_base_transform_can_transform),
(gst_base_transform_find_transform), (gst_base_transform_setcaps),
(gst_base_transform_prepare_output_buffer),
(gst_base_transform_buffer_alloc),
(gst_base_transform_handle_buffer), (gst_base_transform_getrange),
(gst_base_transform_chain), (gst_base_transform_activate),
(gst_base_transform_set_passthrough),
(gst_base_transform_is_passthrough),
(gst_base_transform_set_in_place),
(gst_base_transform_is_in_place), (gst_base_transform_update_qos),
(gst_base_transform_set_qos_enabled),
(gst_base_transform_is_qos_enabled),
(gst_base_transform_set_gap_aware), (gst_base_transform_suggest),
(gst_base_transform_reconfigure):
* libs/gst/base/gstbasetransform.h:
Rewrite of basetransform to perform negotiation outside of the
buffer_alloc functions.  Fixes #545853.
* tests/check/libs/transform1.c: (GST_START_TEST),
(buffer_alloc_ct2):
Update unit test.
2008-08-05 11:11:00 +00:00
Stefan Kost
864a45ee13 tests/check/gst/gstpreset.c: Only run preset tests when $HOME is writable. Preliminary fix for #545433.
Original commit message from CVS:
* tests/check/gst/gstpreset.c:
Only run preset tests when $HOME is writable. Preliminary fix for
#545433.
2008-08-05 05:44:02 +00:00
Wim Taymans
5665680537 gst/gstbin.c: Fix race for bins that simulate ASYNC state changes by inserting
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_add_func), (gst_bin_remove_func),
(gst_bin_change_state_func), (bin_handle_async_done),
(gst_bin_handle_message_func):
Fix race for bins that simulate ASYNC state changes by inserting
ASYNC_START and ASYNC_DONE messages in their bus. We need to check for
pending ASYNC messages even when the bin does not have ASYNC children.
We note detect this behaviour because we will receive an ASYNC message
that is originating from the bin itself.
Fixes races with decodebin2 state changes.
* tests/check/gst/gstbin.c: (GST_START_TEST):
Add some more debug.
2008-08-04 15:49:13 +00:00
Sebastian Dröge
b30e78f7a8 tests/check/libs/gdp.c: Also enable the GDP unit test again on PPC now that the bug is fixed.
Original commit message from CVS:
* tests/check/libs/gdp.c: (gst_dp_suite):
Also enable the GDP unit test again on PPC now that the bug
is fixed.
2008-06-30 09:42:43 +00:00
Wim Taymans
e123c66377 tests/check/libs/transform1.c: Add some more tests with switching caps in buffer_alloc.
Original commit message from CVS:
* tests/check/libs/transform1.c: (buffer_alloc_pt1),
(set_caps_pt1), (GST_START_TEST), (set_caps_pt2), (transform_ip_1),
(set_caps_1), (set_caps_ct1), (transform_ct1),
(transform_caps_ct1), (transform_size_ct1), (buffer_alloc_ct1),
(set_caps_ct2), (transform_ct2), (transform_caps_ct2),
(transform_size_ct2), (buffer_alloc_ct2):
Add some more tests with switching caps in buffer_alloc.
2008-06-26 11:59:40 +00:00
Wim Taymans
4379ccf7e1 tests/check/libs/: More tests, prepare for tests with switching caps in buffer_alloc.
Original commit message from CVS:
* tests/check/libs/test_transform.c: (gst_test_trans_base_init),
(gst_test_trans_class_init), (result_sink_chain),
(result_buffer_alloc), (gst_test_trans_new), (gst_test_trans_free),
(gst_test_trans_push), (gst_test_trans_pop):
* tests/check/libs/transform1.c: (buffer_alloc_pt1),
(set_caps_pt1), (GST_START_TEST), (set_caps_pt2), (transform_ip_1),
(set_caps_1), (set_caps_ct1), (transform_ct1),
(transform_caps_ct1), (transform_size_ct1), (buffer_alloc_ct1),
(set_caps_ct2), (transform_ct2), (transform_caps_ct2),
(transform_size_ct2), (buffer_alloc_ct2),
(gst_basetransform_suite):
More tests, prepare for tests with switching caps in buffer_alloc.
2008-06-25 17:27:30 +00:00
Wim Taymans
23d8478698 docs/design/part-block.txt: Fix typo.
Original commit message from CVS:
* docs/design/part-block.txt:
Fix typo.
* docs/design/part-element-transform.txt:
Add notes about why transform needs to know input/output sizes.
Add some issues that need to be solved.
Add some more use cases.
* tests/check/libs/test_transform.c: (gst_test_trans_base_init),
(gst_test_trans_class_init), (result_sink_chain),
(result_buffer_alloc), (gst_test_trans_new), (gst_test_trans_free),
(gst_test_trans_push), (gst_test_trans_pop):
* tests/check/libs/transform1.c: (buffer_alloc_pt1),
(set_caps_pt1), (GST_START_TEST), (set_caps_pt2), (transform_ip_1),
(set_caps_1), (set_caps_ct1), (transform_ct1),
(transform_caps_ct1), (transform_size_ct1), (buffer_alloc_ct1),
(gst_basetransform_suite):
Add suport for different pad templates and buffer-alloc.
Add more checks for caps and buffer-alloc.
Add checks for proxy buffer alloc.
Add unit test for copy transform.
2008-06-25 10:53:52 +00:00
Sebastian Dröge
7c0bd009ce tests/check/gst/gstghostpad.c: Fix some memory leaks and uses of object instances that we don't actually own.
Original commit message from CVS:
* tests/check/gst/gstghostpad.c: (GST_START_TEST):
Fix some memory leaks and uses of object instances that we don't
actually own.
2008-06-24 07:49:36 +00:00
Thomas Vander Stichele
fdca1e654d tests/check/: Use HAVE_VALGRIND_H some more.
Original commit message from CVS:
* tests/check/gst/gstbuffer.c:
* tests/check/pipelines/parse-launch.c:
Use HAVE_VALGRIND_H some more.
2008-06-20 21:08:47 +00:00
Wim Taymans
90629e72a2 tests/check/: Add some test basetransform element and the beginnings of various unit tests for it.
Original commit message from CVS:
* tests/check/Makefile.am:
* tests/check/libs/test_transform.c: (gst_test_trans_base_init),
(gst_test_trans_class_init), (gst_test_trans_init),
(gst_test_trans_set_data), (result_sink_chain),
(gst_test_trans_new), (gst_test_trans_free), (gst_test_trans_push),
(gst_test_trans_pop):
* tests/check/libs/transform1.c: (GST_START_TEST),
(transform_ip_1), (set_caps_1), (gst_basetransform_suite):
Add some test basetransform element and the beginnings of various
unit tests for it.
2008-06-20 12:06:54 +00:00
Stefan Kost
e5c981bb7b Ignore more.
Original commit message from CVS:
* docs/plugins/tmpl/.cvsignore:
* tests/check/gst/.cvsignore:
Ignore more.
2008-06-20 08:21:48 +00:00
Stefan Kost
27243ac326 Rewrite handling of default values. Fix overflow with unsigned types in linear interpolation. Remove now obsolete _fi...
Original commit message from CVS:
* libs/gst/controller/gstinterpolation.c:
* libs/gst/controller/gstinterpolationcontrolsource.c:
* tests/check/libs/controller.c:
Rewrite handling of default values. Fix overflow with unsigned types
in linear interpolation. Remove now obsolete _first_value() function.
Add more tests. Fixes #538201.
2008-06-20 08:17:08 +00:00
Stefan Kost
9b3b823aa5 tests/check/gst/gstpipeline.c: Revert test change and add comment why it should not work.
Original commit message from CVS:
* tests/check/gst/gstpipeline.c:
Revert test change and add comment why it should not work.
2008-05-27 19:47:49 +00:00
Stefan Kost
6bb62a810a tests/check/gst/gstpipeline.c: Extending the test a little to verify that we also get the NULL state- change message.
Original commit message from CVS:
* tests/check/gst/gstpipeline.c:
Extending the test a little to verify that we also get the NULL state-
change message.
2008-05-27 18:31:39 +00:00
Stefan Kost
bedb591973 configure.ac: Add DATADIR for storing presets.
Original commit message from CVS:
Patch by: Stefan Kost  <ensonic@users.sf.net>
* configure.ac:
Add DATADIR for storing presets.
* docs/gst/gstreamer-docs.sgml:
* docs/gst/gstreamer-sections.txt:
* docs/gst/gstreamer.types.in:
Add GstPreset to docs.
* gst/Makefile.am:
* gst/gst.h:
* gst/gstpreset.c: (preset_get_paths), (preset_skip_property),
(preset_open_and_parse_header), (preset_parse_version),
(preset_merge), (preset_get_keyfile),
(gst_preset_default_get_preset_names),
(gst_preset_default_get_property_names),
(gst_preset_default_load_preset),
(gst_preset_default_save_presets_file),
(gst_preset_default_save_preset),
(gst_preset_default_rename_preset),
(gst_preset_default_delete_preset), (gst_preset_default_set_meta),
(gst_preset_default_get_meta), (gst_preset_default_randomize),
(gst_preset_default_reset), (gst_preset_get_preset_names),
(gst_preset_get_property_names), (gst_preset_load_preset),
(gst_preset_save_preset), (gst_preset_rename_preset),
(gst_preset_delete_preset), (gst_preset_set_meta),
(gst_preset_get_meta), (gst_preset_class_init),
(gst_preset_base_init), (gst_preset_get_type):
* gst/gstpreset.h:
Add GstPreset to core. Fixes #396779
* tests/check/Makefile.am:
* tests/check/gst/gstpreset.c: (gst_preset_test_get_property),
(gst_preset_test_set_property), (gst_preset_test_class_init),
(gst_preset_test_base_init), (gst_preset_test_get_type),
(gst_preset_test_plugin_init), (GST_START_TEST),
(remove_preset_file), (test_setup), (test_teardown),
(gst_preset_suite):
Add GstPreset unit tests.
2008-05-27 15:11:35 +00:00
Tim-Philipp Müller
b0afa5e42e Get all missing elements from a parse launch string if possible (ie. if the FATAL_ERRORS flag has been specified). Fi...
Original commit message from CVS:
* gst/parse/grammar.y:
* tests/check/pipelines/parse-launch.c:
Get all missing elements from a parse launch string if possible
(ie. if the FATAL_ERRORS flag has been specified). Fixes #528178.
2008-05-25 13:56:38 +00:00
Tim-Philipp Müller
c7230d272a tests/check/: Add some unit tests for the new gst_parse_launch*_full() API. (Exposes a previously-existing memory lea...
Original commit message from CVS:
* tests/check/Makefile.am:
* tests/check/pipelines/parse-launch.c:
Add some unit tests for the new gst_parse_launch*_full() API.
(Exposes a previously-existing memory leak in the error code
path, so adding to VALGRIND_TO_FIX for now).
2008-05-24 16:38:15 +00:00
Wim Taymans
cc8334905c Don't use gst_element_get_pad().
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_load_and_link):
* gst/gstutils.c: (gst_element_link_pads),
(gst_element_unlink_pads):
* 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),
(gst_check_element_push_buffer_list):
* tests/check/elements/fakesink.c: (GST_START_TEST):
* tests/check/elements/filesink.c:
* tests/check/elements/filesrc.c: (GST_START_TEST):
* tests/check/elements/multiqueue.c: (setup_multiqueue),
(mq_sinkpad_to_srcpad):
* tests/check/elements/tee.c: (GST_START_TEST):
* tests/check/generic/sinks.c: (GST_START_TEST):
* tests/check/gst/gstbin.c: (GST_START_TEST):
* tests/check/gst/gstevent.c: (GST_START_TEST):
* tests/check/gst/gstghostpad.c: (GST_START_TEST):
* tests/check/gst/gstpipeline.c: (GST_START_TEST):
* tests/check/gst/gstquery.c: (GST_START_TEST):
* tests/check/gst/gstutils.c: (GST_START_TEST):
* tests/check/libs/basesrc.c: (GST_START_TEST):
* tests/check/pipelines/parse-launch.c: (run_delayed_test),
(gst_parse_test_element_change_state):
Don't use gst_element_get_pad().
2008-05-21 15:57:52 +00:00
Tim-Philipp Müller
b1ea5f952f tests/check/gst/gstcaps.c: Add David's and Benjamin's tests for array subtraction to the unit test suite, which sugge...
Original commit message from CVS:
* tests/check/gst/gstcaps.c: (test_intersect2), (gst_caps_suite):
Add David's and Benjamin's tests for array subtraction to the
unit test suite, which suggests that #147931 is fixed these days.
2008-05-18 11:52:39 +00:00
Stefan Kost
7e6dd77041 tests/check/gst/gstinfo.c: Add a test for removing the default log handler. Seems to fail under windows.
Original commit message from CVS:
* tests/check/gst/gstinfo.c:
Add a test for removing the default log handler. Seems to fail under
windows.
2008-05-14 18:09:01 +00:00
Wim Taymans
363148faf4 gst/parse/grammar.y: Remove unneeded value unset.
Original commit message from CVS:
* gst/parse/grammar.y:
Remove unneeded value unset.
* tests/check/gst/gstvalue.c: (GST_START_TEST), (gst_value_suite):
Add unit test for de/serialization of caps.
2008-05-14 10:22:17 +00:00
Tim-Philipp Müller
077450a434 No, let's not use g_slice_{dup|copy} here, since they only exist since GLib 2.14 and we still depend only on >= 2.12....
Original commit message from CVS:
* gst/gstsegment.c:
* tests/check/gst/gstsegment.c:
No, let's not use g_slice_{dup|copy} here, since they only exist
since GLib 2.14 and we still depend only on >= 2.12. Also add
unit test for gst_segment_copy().
2008-05-09 20:48:24 +00:00
Sebastian Dröge
a87948275c tests/check/gst/gstvalue.c: Add unit test for deserializing uint64s and check some really large numbers in the int64 ...
Original commit message from CVS:
* tests/check/gst/gstvalue.c: (GST_START_TEST), (gst_value_suite):
Add unit test for deserializing uint64s and check some really large
numbers in the int64 test.
2008-05-05 15:50:36 +00:00
Tim-Philipp Müller
449a426169 plugins/elements/gstqueue.c: Since we're not called only from the chain function any longer, we can't assume that the...
Original commit message from CVS:
* plugins/elements/gstqueue.c: (gst_queue_leak_downstream):
Since we're not called only from the chain function any longer,
we can't assume that there's always data in the queue, so move
the is_full check to the beginning of the loop (otherwise we'd
hit the assert when changing the limit properties while the
queue is empty or not running yet).
Also, only set a discont if items were actually removed from
the queue.
* tests/check/elements/queue.c: (test_leaky_downstream):
Test case for the above.
2008-04-30 14:20:48 +00:00
Wim Taymans
cf45b88349 Add method to conveniently check the name of a custom event with gst_event_has_name().
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstevent.c: (gst_event_has_name):
* gst/gstevent.h:
* tests/check/gst/gstevent.c: (GST_START_TEST):
Add method to conveniently check the name of a custom event with
gst_event_has_name().
Reformat the event docs so that related methods are put together instead
of the default alphabetical sort.
Update unit test with new method.
API: GstEvent::gst_event_has_name()
2008-04-29 11:23:51 +00:00
Tim-Philipp Müller
e46f846c1f Ref some more classes in gst_init() to work around thread-safety issues in pre-2.16 GLibs, and add basic unit test.
Original commit message from CVS:
* gst/gst.c: (init_post), (gst_deinit):
* tests/check/gst/gstpipeline.c: (GST_START_TEST), (pipeline_thread),
(test_concurrent_create), (gst_pipeline_suite):
Ref some more classes in gst_init() to work around thread-safety
issues in pre-2.16 GLibs, and add basic unit test.
2008-04-25 10:01:46 +00:00
Stefan Kost
012d5584ff docs/gst/gstreamer-sections.txt: Move GParamSepc macros to standart section.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
Move GParamSepc macros to standart section.
* gst/gstbin.c:
Dn't document _get_type - its in private section in docs anyway and
this doc-blob was incomplete.
* gst/gstclock.h:
Fix wrong symbol names in docs.
* gst/gstmacros.h:
Add once doc sentence.
* tests/check/gst/.cvsignore:
Ignore more.
2008-04-23 06:57:30 +00:00
Rene Stadler
9530644a17 gst/gsttagsetter.c: Merging an empty list with another list in KEEP_ALL mode should yield an empty list as result and...
Original commit message from CVS:
Patch by: Rene Stadler <mail at renestadler de>
* gst/gsttagsetter.c: (gst_tag_setter_merge_tags):
Merging an empty list with another list in KEEP_ALL mode should
yield an empty list as result and not the second list (#512578).
* tests/check/gst/gsttagsetter.c:
Add unit test for tag merge modes and the aforementioned bug.
2008-04-13 19:58:43 +00:00
José Alburquerque
f273ee8c4b Add gst_pad_add_*_probe_full() functions with a notify callback that lets the caller free the data it passes to the p...
Original commit message from CVS:
Based on patch by: José Alburquerque <jaalburqu at svn dot gnome dot org>
* gst/gstutils.c: (gst_pad_add_data_probe),
(gst_pad_add_data_probe_full), (gst_pad_add_event_probe),
(gst_pad_add_event_probe_full), (gst_pad_add_buffer_probe),
(gst_pad_add_buffer_probe_full):
* gst/gstutils.h:
* docs/gst/gstreamer-sections.txt:
* win32/common/libgstreamer.def:
Add gst_pad_add_*_probe_full() functions with a notify callback that
lets the caller free the data it passes to the probe functions. This
is useful for bindings such as gst-python or gstreamermm (#526814).
API: gst_pad_add_data_probe_full
API: gst_pad_add_buffer_probe_full
API: gst_pad_add_event_probe_full
* tests/check/gst/gstutils.c:
Add minimal unit test to make sure freeing the data actually works
as expected.
* tests/benchmarks/.cvsignore:
Random cvsignore addendum.
2008-04-10 20:46:51 +00:00
Tim-Philipp Müller
ede8ee12bb gst/gstindex.*: Don't free key strings which we don't own. Fixes crash in gst_index_entry_free() (#522741).
Original commit message from CVS:
* gst/gstindex.c: (gst_index_entry_free):
* gst/gstindex.h:
Don't free key strings which we don't own. Fixes crash in
gst_index_entry_free() (#522741).
* tests/check/Makefile.am:
* tests/check/gst/.cvsignore:
* tests/check/gst/gstindex.c: (test_index_entries),
(gst_index_suite), (gst_index):
Add unit test for the above.
2008-03-17 10:21:59 +00:00
Ole André Vadla Ravnås
8a6042989a Remove GstPollMode from the API, it does not make sense to let the application control this.
Original commit message from CVS:
Patch by: Ole André Vadla Ravnås
<ole dot andre dot ravnas at tandberg dot com>
* docs/gst/gstreamer-sections.txt:
* gst/gstpoll.c: (find_index), (gst_poll_free_winsock_event),
(gst_poll_update_winsock_event_mask), (gst_poll_new),
(gst_poll_free), (gst_poll_fd_init), (gst_poll_add_fd_unlocked),
(gst_poll_remove_fd), (gst_poll_fd_ctl_write),
(gst_poll_fd_ctl_read_unlocked), (gst_poll_fd_has_closed),
(gst_poll_fd_has_error), (gst_poll_fd_can_read_unlocked),
(gst_poll_fd_can_write), (gst_poll_wait),
(gst_poll_set_controllable), (gst_poll_restart),
(gst_poll_set_flushing):
* gst/gstpoll.h:
* libs/gst/net/gstnetclientclock.c: (gst_net_client_clock_new):
* libs/gst/net/gstnettimeprovider.c: (gst_net_time_provider_start),
(gst_net_time_provider_new):
* plugins/elements/gstfdsink.c: (gst_fd_sink_start):
* plugins/elements/gstfdsrc.c: (gst_fd_src_start):
* tests/benchmarks/gstpollstress.c: (main):
* tests/check/gst/gstpoll.c: (GST_START_TEST), (gst_poll_suite):
Remove GstPollMode from the API, it does not make sense to let the
application control this.
Add support for Win32.
Fix the testsuite. Fixes #520671.
2008-03-07 15:39:45 +00:00
Andy Wingo
391d9dfc9e tests/check/gst/gststructure.c (GST_START_TEST): Add a check for the new warning.
Original commit message from CVS:

2008-03-03  Andy Wingo  <wingo@pobox.com>

* tests/check/gst/gststructure.c (GST_START_TEST): Add a check for
the new warning.

* gst/gststructure.c (gst_structure_from_string): Warn if
structure_from_string didn't consume the whole string, but the
caller did not provide an end pointer.
2008-03-03 10:07:21 +00:00
Tim-Philipp Müller
97bf2d2d78 gst/gstinterface.c: Don't crash if the element supports the interface queried, but does not implement GstImplementsIn...
Original commit message from CVS:
* gst/gstinterface.c: (gst_element_implements_interface):
Don't crash if the element supports the interface queried, but does
not implement GstImplementsInterface. Fixes #519584.
* tests/check/Makefile.am:
* tests/check/gst/.cvsignore:
* tests/check/gst/gstinterface.c:
Add unit test for the above.
2008-02-29 18:38:54 +00:00
Sebastian Dröge
58cc2ede0a And correct even more valid sparse warnings.
Original commit message from CVS:
* gst/gstelementfactory.h:
* tests/check/elements/fakesink.c:
* tests/check/elements/fakesrc.c: (setup_fakesrc):
* tests/check/elements/fdsrc.c: (setup_fdsrc):
* tests/check/elements/filesink.c: (setup_filesink):
* tests/check/elements/filesrc.c: (setup_filesrc):
* tests/check/elements/identity.c: (setup_identity):
* tests/check/elements/tee.c:
* tests/check/generic/sinks.c:
* tests/check/generic/states.c: (setup), (teardown):
* tests/check/gst/gst.c:
* tests/check/gst/gstabi.c:
* tests/check/gst/gstbin.c:
* tests/check/gst/gstbus.c: (pull_messages):
* tests/check/gst/gstcaps.c:
* tests/check/gst/gstelement.c:
* tests/check/gst/gstevent.c:
* tests/check/gst/gstghostpad.c:
* tests/check/gst/gstiterator.c:
* tests/check/gst/gstmessage.c:
* tests/check/gst/gstminiobject.c: (my_foo_init):
* tests/check/gst/gstobject.c: (thread_name_object),
(gst_object_suite):
* tests/check/gst/gstpad.c:
* tests/check/gst/gstplugin.c:
* tests/check/gst/gstpoll.c:
* tests/check/gst/gstquery.c:
* tests/check/gst/gstsegment.c:
* tests/check/gst/gststructure.c:
* tests/check/gst/gstsystemclock.c:
* tests/check/gst/gsttask.c:
* tests/check/gst/gstutils.c:
* tests/check/gst/gstvalue.c:
* tests/check/gst/struct_hppa.h:
* tests/check/gst/struct_i386.h:
* tests/check/gst/struct_ppc32.h:
* tests/check/gst/struct_ppc64.h:
* tests/check/gst/struct_x86_64.h:
* tests/check/libs/adapter.c: (create_and_fill_adapter):
* tests/check/libs/basesrc.c:
* tests/check/libs/controller.c: (GST_START_TEST):
* tests/check/libs/gdp.c:
* tests/check/libs/gstnetclientclock.c:
* tests/check/libs/gstnettimeprovider.c:
* tests/check/libs/libsabi.c:
* tests/check/libs/struct_hppa.h:
* tests/check/libs/struct_i386.h:
* tests/check/libs/struct_ppc32.h:
* tests/check/libs/struct_ppc64.h:
* tests/check/libs/struct_x86_64.h:
* tests/check/pipelines/cleanup.c:
* tests/check/pipelines/simple-launch-lines.c:
* tests/check/pipelines/stress.c:
And correct even more valid sparse warnings.
* win32/common/libgstreamer.def:
Add gst_poll_fd_init to the list of symbols.
2008-02-29 13:59:24 +00:00
Sebastian Dröge
b997b0545a Correct all relevant warnings found by the sparse semantic code analyzer. This include marking several symbols static...
Original commit message from CVS:
* gst/gstconfig.h.in:
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_read_buffer):
* libs/gst/check/gstcheck.c: (gst_check_log_message_func),
(gst_check_log_critical_func), (gst_check_drop_buffers),
(gst_check_element_push_buffer_list):
* libs/gst/controller/gstcontroller.c: (gst_controller_get),
(gst_controller_get_type):
* libs/gst/controller/gsthelper.c: (gst_object_control_properties),
(gst_object_get_controller), (gst_object_get_control_source):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_interpolation_control_source_new):
* libs/gst/controller/gstlfocontrolsource.c:
(gst_lfo_control_source_new):
* libs/gst/dataprotocol/dataprotocol.c:
(gst_dp_event_from_packet_0_2):
* plugins/elements/gstfdsrc.c:
* plugins/elements/gstmultiqueue.c:
* plugins/elements/gsttee.c:
* plugins/elements/gsttypefindelement.c:
* plugins/indexers/gstfileindex.c: (_file_index_id_save_xml),
(gst_file_index_add_association):
* plugins/indexers/gstmemindex.c:
* tests/benchmarks/gstpollstress.c: (mess_some_more):
* tests/check/elements/queue.c: (setup_queue):
* tests/check/gst/gstpipeline.c:
* tests/check/libs/collectpads.c: (setup), (teardown),
(gst_collect_pads_suite):
* tests/examples/adapter/adapter_test.c:
* tests/examples/metadata/read-metadata.c: (make_pipeline):
* tests/examples/xml/createxml.c:
* tests/examples/xml/runxml.c:
* tools/gst-inspect.c:
* tools/gst-run.c:
Correct all relevant warnings found by the sparse semantic code
analyzer. This include marking several symbols static, using
NULL instead of 0 for pointers, not using variable sized arrays
on the stack, moving variable declarations to the beginning of
a block and using "foo (void)" instead of "foo ()" for declarations.
2008-02-29 12:41:33 +00:00
Sebastian Dröge
c483eb5489 plugins/elements/: Don't reset GstPollFDs, this is not necessary at all.
Original commit message from CVS:
* plugins/elements/gstfdsink.c: (gst_fd_sink_update_fd):
* plugins/elements/gstfdsrc.c: (gst_fd_src_update_fd):
Don't reset GstPollFDs, this is not necessary at all.
* tests/check/gst/gstpoll.c: (test_poll_wait), (GST_START_TEST),
(delayed_restart), (delayed_control):
Use GST_POLL_FD_INIT.
2008-02-29 12:05:55 +00:00
Sebastian Dröge
4c31dc7cc4 Initialize some uninitialized variables as spotted by valgrind.
Original commit message from CVS:
* plugins/elements/gstfdsink.c: (gst_fd_sink_start),
(gst_fd_sink_update_fd):
* plugins/elements/gstfdsrc.c: (gst_fd_src_update_fd):
* tests/check/gst/gstpoll.c: (test_poll_wait), (GST_START_TEST),
(delayed_restart), (delayed_control):
Initialize some uninitialized variables as spotted by valgrind.
2008-02-28 19:58:26 +00:00
Wim Taymans
d37ee60f47 configure.ac: Add checks for poll, ppoll and pselect.
Original commit message from CVS:
* configure.ac:
Add checks for poll, ppoll and pselect.
* docs/gst/gstreamer-docs.sgml:
* docs/gst/gstreamer-sections.txt:
Add docs for GstPoll.
* gst/Makefile.am:
* gst/gst.h:
* gst/gstpoll.c: (find_index), (selectable_fds),
(pollable_timeout), (choose_mode), (pollfd_to_fd_set),
(fd_set_to_pollfd), (gst_poll_new), (gst_poll_free),
(gst_poll_set_mode), (gst_poll_get_mode),
(gst_poll_add_fd_unlocked), (gst_poll_add_fd),
(gst_poll_remove_fd), (gst_poll_fd_ctl_write),
(gst_poll_fd_ctl_read_unlocked), (gst_poll_fd_ctl_read),
(gst_poll_fd_has_closed), (gst_poll_fd_has_error),
(gst_poll_fd_can_read_unlocked), (gst_poll_fd_can_read),
(gst_poll_fd_can_write), (gst_poll_wait),
(gst_poll_set_controllable), (gst_poll_restart),
(gst_poll_set_flushing):
* gst/gstpoll.h:
Add generic poll abstraction. We ideally don't want to have this in core
here but in glib intead...
This code will be used in various network elements and ultimately for
the nanosecond precision monotonic clock (that's why it's here in core).
It'll allow us to implement cancelable socket operations for windows too.
* tests/check/Makefile.am:
* tests/check/gst/gstpoll.c: (test_poll_wait), (GST_START_TEST),
(delayed_stop), (delayed_restart), (delayed_flush),
(delayed_control), (gst_poll_suite):
Add GstPoll unit test.
2008-02-27 18:00:04 +00:00
Stefan Kost
3060854ebb tests/check/gst/gstevent.c: Add qos to the event test. Rename tcase/tsuite; is not only about custom events.
Original commit message from CVS:
* tests/check/gst/gstevent.c:
Add qos to the event test. Rename tcase/tsuite; is not only about
custom events.
2008-02-21 10:30:50 +00:00
Jan Schmidt
4643cb6d6d libs/gst/check/gstcheck.*: Make the declaration in the header for gst_check_element_push_buffer_list match the implem...
Original commit message from CVS:
* libs/gst/check/gstcheck.c: (gst_check_drop_buffers),
(gst_check_element_push_buffer_list):
* libs/gst/check/gstcheck.h:
Make the declaration in the header for
gst_check_element_push_buffer_list match the implementation.
Fix up spelling, grammar and wording of the documentation in a few
places, and add the Since keyword to new API functions.
Use g_list_delete_link instead of g_list_remove in
gst_check_drop_buffers, since it's immeasurably more efficient.
* tests/check/elements/fakesrc.c: (GST_START_TEST):
Use new gst_check_drop_buffers function where appropriate.
* win32/common/libgstbase.def:
* win32/common/libgstreamer.def:
Add new symbols gst_collect_pads_take_buffer,
gst_collect_pads_read_buffer, gst_index_set_resolver_full to the
exports
Changelog surgery to add API keyword to new gst_check API.
2008-02-19 12:56:28 +00:00
Sebastian Dröge
2faa733276 Revert previous changes to the behaviour of GstPadTemplates, etc and the possiblity to call them in class_init as it ...
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_get_type), (gst_bin_base_init),
(gst_bin_class_init):
* gst/gstelement.c: (gst_element_base_class_init),
(gst_element_class_add_pad_template):
* gst/gstpadtemplate.c: (gst_pad_template_init):
* gst/gstpipeline.c: (gst_pipeline_get_type),
(gst_pipeline_base_init), (gst_pipeline_class_init):
* libs/gst/base/gstbasesink.c:
* libs/gst/base/gstbasesrc.c: (gst_base_src_get_type),
(gst_base_src_base_init), (gst_base_src_class_init):
* plugins/elements/gstcapsfilter.c: (gst_capsfilter_base_init),
(gst_capsfilter_class_init):
* plugins/elements/gstfakesink.c: (gst_fake_sink_base_init),
(gst_fake_sink_class_init):
* plugins/elements/gstfakesrc.c: (gst_fake_src_base_init),
(gst_fake_src_class_init):
* plugins/elements/gstfdsink.c: (gst_fd_sink_base_init),
(gst_fd_sink_class_init):
* plugins/elements/gstfdsrc.c: (gst_fd_src_base_init),
(gst_fd_src_class_init):
* plugins/elements/gstfilesink.c: (gst_file_sink_base_init),
(gst_file_sink_class_init):
* plugins/elements/gstfilesrc.c: (gst_file_src_base_init),
(gst_file_src_class_init):
* plugins/elements/gstidentity.c: (gst_identity_base_init),
(gst_identity_class_init):
* plugins/elements/gstmultiqueue.c: (gst_multi_queue_base_init),
(gst_multi_queue_class_init):
* plugins/elements/gstqueue.c: (gst_queue_base_init),
(gst_queue_class_init):
* plugins/elements/gsttee.c: (gst_tee_base_init),
(gst_tee_class_init):
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_base_init),
(gst_type_find_element_class_init):
* tests/check/gst/gstelement.c: (gst_element_suite):
Revert previous changes to the behaviour of GstPadTemplates, etc
and the possiblity to call them in class_init as it breaks too
many elements. Reopens bug #491501.
Should be applied again for 0.11, thus added a few FIXME 0.11 at
several places.
2008-02-05 14:15:15 +00:00
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