Commit graph

108 commits

Author SHA1 Message Date
Jan Schmidt
8b90cf1be1 check: Make sure to init the dataprotocol lib.
Call the gst_dp_init() function to ensure that the debug
category is initialised, to avoid g_criticals when running with
GST_DEBUG=5
2009-10-07 16:14:02 +01:00
Jan Schmidt
4446a6276b check: Use GST_DEBUG instead of g_message in the gdp test 2009-10-07 16:14:02 +01:00
Edward Hervey
3879cc60b1 tests: init more variables to avoid compiler warning on osx
Init variable to avoid compiler warning and make the build bot happy
(the compiler most likely complains about this because it doesn't know
here that fail_unless will abort/exit in the path where it fails).
2009-10-07 08:40:18 +02:00
Tim-Philipp Müller
abb9caf484 tests: init variable to avoid compiler warning on osx
Init variable to avoid compiler warning and make the build bot happy
(the compiler most likely complains about this because it doesn't know
here that fail_unless will abort/exit in the path where it fails).
2009-10-06 20:04:10 +01:00
Tim-Philipp Müller
080b2e4fd5 bytereader: add inlined _unchecked() variants for some functions
API: gst_byte_reader_skip_unchecked()
API: gst_byte_reader_peek_*_unchecked()
API: gst_byte_reader_get_*_unchecked()
API: gst_byte_reader_{peek,get,dup}_data_unchecked()
2009-09-06 18:51:13 +01:00
Tim-Philipp Müller
6b64d41937 bytereader: add a bunch of utility functions for strings and a data dup function
API: gst_byte_reader_dup_data
API: gst_byte_reader_dup_string
API: gst_byte_reader_dup_string_utf8
API: gst_byte_reader_dup_string_utf16
API: gst_byte_reader_dup_string_utf32
API: gst_byte_reader_skip_string
API: gst_byte_reader_skip_string_utf8
API: gst_byte_reader_skip_string_utf16
API: gst_byte_reader_skip_string_utf32
API: gst_byte_reader_peek_string
API: gst_byte_reader_peek_string_utf8
API: gst_byte_reader_get_string
API: gst_byte_reader_get_string_utf8

And some basic unit tests. Fixes #586568.
2009-06-23 02:17:48 +01:00
Tim-Philipp Müller
674447fafe bytereader: add gst_byte_reader_masked_scan_uint32()
Add a pattern scan function similar to the one recently added to
GstAdapter, and a unit test (based on the adapter one).
Fixes #585592.

API: add gst_byte_reader_masked_scan_uint32()
2009-06-13 10:53:49 +01:00
Tim-Philipp Müller
998b2392d3 Remove double semicolons at end of line 2009-06-08 17:13:17 +01:00
Stefan Kost
fc866b82db controller: add test for cubic int. and too few control points
Added another tests to check some worries in Bug #582564.
2009-06-01 11:08:31 +03:00
Arnout Vandecappelle
c74c3bf1b3 adapter: fix _masked_scan_uint32() at boundaries
gst_adapter_masked_scan_uint32 could return values smaller than offset
if the first byte(s) of the mask are 0 and the pattern matches the
beginning of the adapter.
Added examples to documentation of gst_adapter_masked_scan_uint32().
Also added some more masked boundary tests.
Fixes #584118
2009-05-28 22:02:21 +02:00
Wim Taymans
23314ddefb tests: one more adapter test 2009-05-20 10:28:46 +02:00
Wim Taymans
270723c85c adapter: add _masked_scan_uint32
Add a reasonably optimized new gst_adapter_masked_scan_uint32() function
to scan the adapter for a pattern after applying a mask.

Add some unit tests.

API: GstAdapter::gst_adapter_masked_scan_uint32()

Fixes #583187
2009-05-20 00:37:53 +02:00
Wim Taymans
f6d71be830 tests: add another test for adapter timestamps 2009-05-13 17:09:32 +02:00
Wim Taymans
0d9ba7c7fe tests: add new timestamp unit test 2009-05-13 16:48:38 +02:00
Wim Taymans
605639a2bf adapter: optimize taking the headbuffer
When a are requested to take a buffer from the adapter that is exactly the
headbuffer, don't make a subbuffer of it but return that head buffer.

Add a unit-test for this new optimisation.
2009-05-12 10:25:40 +02:00
Stefan Kost
dd3c9ab6b6 controller: factor out duplicated code and add a description for it.
Also fix typo in the tests while reviewing them.
2009-04-14 22:08:56 +03:00
Jan Schmidt
e89ce19497 Update a bunch of gitignores to clean up my git status output 2009-01-23 16:08:40 +00:00
Tim-Philipp Müller
428ead89b8 gst/gstbus.c: Make GstBusSource work with non-default main contexts (#562170).
Original commit message from CVS:
* gst/gstbus.c: (gst_bus_dispose), (gst_bus_get_property),
(gst_bus_wakeup_main_context), (gst_bus_set_main_context),
(gst_bus_post), (gst_bus_source_prepare), (gst_bus_source_finalize),
(gst_bus_create_watch):
Make GstBusSource work with non-default main contexts (#562170).
* tests/check/gst/gstbus.c: (message_func_eos), (message_func_app),
(test_watch), (test_watch_with_custom_context), (gst_bus_suite):
Add test case for GstBusSource with a non-default main context.
* tests/check/libs/.cvsignore:
Ignore more.
2008-12-27 17:41:11 +00:00
Sebastian Dröge
c09870ede4 tests/check/libs/controller.c: This test should return TRUE now as syncing an uncontrolled object will succeed now (t...
Original commit message from CVS:
* tests/check/libs/controller.c: (GST_START_TEST):
This test should return TRUE now as syncing an uncontrolled
object will succeed now (there's nothing to sync).
2008-12-09 10:58:01 +00:00
Jan Schmidt
c64e9b0c7a tests/check/: Add Sparc ABI checks
Original commit message from CVS:
* tests/check/Makefile.am:
* tests/check/gst/gstabi.c:
* tests/check/gst/struct_sparc.h:
* tests/check/libs/libsabi.c:
* tests/check/libs/struct_sparc.h:
Add Sparc ABI checks
* tests/check/gst/gstvalue.c: (GST_START_TEST):
Cast signed integer to unsigned to avoid a compiler warning.
2008-10-07 15:12:21 +00:00
Sebastian Dröge
b377c58e43 Add bit reader and byte reader classes, including documentation and an extensive unit test suite. Fixes bug #553554.
Original commit message from CVS:
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* libs/gst/base/Makefile.am:
* libs/gst/base/gstbitreader.c: (gst_bit_reader_new),
(gst_bit_reader_new_from_buffer), (gst_bit_reader_free),
(gst_bit_reader_init), (gst_bit_reader_init_from_buffer),
(gst_bit_reader_set_pos), (gst_bit_reader_get_pos),
(gst_bit_reader_get_remaining), (gst_bit_reader_skip),
(gst_bit_reader_skip_to_byte):
* libs/gst/base/gstbitreader.h:
* libs/gst/base/gstbytereader.c: (GDOUBLE_SWAP_LE_BE),
(GFLOAT_SWAP_LE_BE), (gst_byte_reader_new),
(gst_byte_reader_new_from_buffer), (gst_byte_reader_free),
(gst_byte_reader_init), (gst_byte_reader_init_from_buffer),
(gst_byte_reader_set_pos), (gst_byte_reader_get_pos),
(gst_byte_reader_get_remaining), (gst_byte_reader_skip),
(gst_byte_reader_get_uint8), (gst_byte_reader_get_int8),
(gst_byte_reader_peek_uint8), (gst_byte_reader_peek_int8),
(gst_byte_reader_get_uint24_le), (gst_byte_reader_get_uint24_be),
(gst_byte_reader_get_int24_le), (gst_byte_reader_get_int24_be),
(gst_byte_reader_peek_uint24_le), (gst_byte_reader_peek_uint24_be),
(gst_byte_reader_peek_int24_le), (gst_byte_reader_peek_int24_be):
* libs/gst/base/gstbytereader.h:
* tests/check/Makefile.am:
* tests/check/libs/bitreader.c: (GST_START_TEST),
(gst_bit_reader_suite):
* tests/check/libs/bytereader.c: (GST_START_TEST),
(gst_byte_reader_suite):
Add bit reader and byte reader classes, including documentation
and an extensive unit test suite. Fixes bug #553554.
2008-10-06 12:41:53 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Andy Wingo
86b76f4c22 GST_DISABLE_DEPRECATED is only for users of API that don't want to see deprecated functions in the headers; people th...
Original commit message from CVS:
2006-08-11  Andy Wingo  <wingo@pobox.com>

* configure.ac:
* libs/gst/dataprotocol/dataprotocol.c: (gst_dp_packetizer_new):
* tests/check/libs/gdp.c: (gst_dp_suite): GST_DISABLE_DEPRECATED
is only for users of API that don't want to see deprecated
functions in the headers; people that want to compile out
deprecated code should pass -DGST_REMOVE_DEPRECATED into the
CFLAGS. Fixes the build of multifdsink, or will soon..
2006-08-11 15:26:33 +00:00