Commit graph

35 commits

Author SHA1 Message Date
Stefan Sauer 5e4c13fc97 controller: constructures for control sources return GstControlSource
Don't return the specific types. In most cases there is no specific api there
anyway.
2012-01-31 12:29:52 +01:00
Stefan Sauer 7e77b105e0 controller: no fancy utf8 chars in the gi annotations 2012-01-27 13:07:27 +01:00
Stefan Sauer fc886e03b6 controller: add gi annotations 2012-01-27 12:23:16 +01:00
Wim Taymans 252327f87a Update for new gthread API 2012-01-19 09:27:04 +01:00
Stefan Sauer 3ebd639d34 interpolationcontrolsource: fix cubic interpolation for arrays 2012-01-01 18:54:23 +01:00
Stefan Sauer 757822a906 controller: add logging and fix array functions 2012-01-01 16:08:01 +01:00
Stefan Sauer eba636cc83 controller: use NAN instead of FP_NAN (which is the class)
Also add a fallback define to math-compat.h.
Fixes #666887
2011-12-30 13:33:48 +01:00
Tim-Philipp Müller e65ac5b419 controller: fix compiler warning in interpolation control source
gstinterpolationcontrolsource.c:54: warning: type qualifiers ignored
on function return type

https://bugzilla.gnome.org/show_bug.cgi?id=666890
2011-12-27 11:24:48 +00:00
Stefan Sauer 39d6b7462f controller: move GValue handling from control-sources to -binding
ControlSources are now gdouble based. A control source is mapped to a
particullar GObject property using a ControlBinding.
2011-12-25 20:48:14 +01:00
Tim-Philipp Müller ff59f3a553 controller: fix GType name of interpolation mode enum 2011-12-22 11:08:42 +00:00
Stefan Sauer 503b739b23 controller: cleanup interpolation modes
Remove deprecated/unimplemented modes. Turn interpolation mode into a gobject
property. Update docs and examples.
2011-12-19 23:36:26 +01:00
Stefan Sauer 2c7a8b924a controlsources: refactor interpolation control source
Move most of the code to a GstTimedValueControlSource. Split out the trigger
'interpolation mode' to a new control source class. Move tests and examples to
new api. Update docs.

Fixes #610338
2011-12-19 22:52:30 +01:00
Tim-Philipp Müller a1daf846f3 Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	gst/gstobject.h
	libs/gst/check/gstcheck.h
	libs/gst/controller/gstcontroller.c
	plugins/elements/gstidentity.c
	tools/gst-xmlinspect.c
2011-12-04 15:38:09 +00:00
Tim-Philipp Müller 5889260d5a Work around deprecated thread API in glib master
Add private replacements for deprecated functions such as
g_mutex_new(), g_mutex_free(), g_cond_new() etc., mostly
to avoid the deprecation warnings. We can't change most of
these in 0.10 because they're part of our API and ABI.
2011-12-04 13:35:38 +00:00
Tim-Philipp Müller bb18ca7fa4 Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	tools/gst-inspect.c
2011-11-13 13:23:09 +00:00
Tim-Philipp Müller 4d6795dcd1 gst, controller: replace g_list_prepend + reverse with GQueue 2011-11-12 14:57:48 +00:00
Stefan Sauer 9a27b9c056 controller: move to core/gstobject
Move the controller to gstobject as a simple delegate. The controller and
controlsource are not classes in core. The controlsources stay separate as a lib
for now. This way we can avoid the qdata lookups.

Also remove controller_init(). There is no more need to link to controller for
elements.

Also sanitize the API. We now have functions to add properties like we had
methods to remove that. That avoids then ref count hacks we had in _new.
2011-11-04 20:11:51 +01:00
Edward Hervey ef4b00c777 controller: Add g-i annotations and remove "Since:" markers 2011-10-18 13:54:52 +02:00
Benjamin Otte e8f65e8bff Make code safe for -Wredundant-decls
Adds that warning to configure.ac

Includes a tiny change of the GST_BOILERPLATE_FULL() macro:
The get_type() function is no longer declared before being defined.

https://bugzilla.gnome.org/show_bug.cgi?id=611692
2010-03-10 20:45:33 +01:00
Sebastian Dröge b30c7d370e interpolationcontrolsource: Don't pass NULL pointers to GSequence API
This causes assertion failures. Fixes bug #610444.
2010-02-19 14:31:54 +01:00
Sebastian Dröge 82f380704a interpolationcontrolsource: Add const qualifiers to values in the _set functions
The values are not modified and are copied, a const before the parameter
should make this even more obvious.
2010-02-19 14:31:54 +01:00
Edward Hervey 27284628e4 optimisation : Use g_object_newv where possible.
This avoids:
* triple-checking for the GType when type-checking is enabled (see #597260)
* Avoids going through an expensive no-argument checking which landed in
  glib-2.22
* Avoids going through 2 extrac functions (g_object_new -> g_object_new_valist)
2009-10-28 09:31:17 +01:00
Stefan Kost 382ad3baa6 controller: just cast in internal API where we have checked parameters already 2009-10-18 23:18:58 +03:00
Edward Hervey 53b09c392a libs/controller: Set default gst debugging category. 2009-06-29 12:07:36 +02:00
Stefan Kost 04ece69838 controller: add G_LIKELY and join two if for same condition
A G_LIKELY for the sequence!=NULL checks. Join two ifs to an if-else. Add
indent guides to keep indent form breaking the function declaration
2009-05-22 14:21:39 +03:00
Stefan Kost 6784355d52 controller: fix assertion when freeing the control source 2009-05-20 17:33:18 +03:00
Sebastian Dröge 10743802be controller: Use ordered GSequence instead of GList
This makes lookups and insertions O(log n) instead of
always O(n) for insertions and O(n) in worst case for
lookups.

Fixes bug #582564.
2009-05-14 22:13:47 +02:00
Stefan Kost 7dd8b92448 gst/gstdebugutils.c: Add some ideas, how to make the graph smaller.
Original commit message from CVS:
* gst/gstdebugutils.c:
Add some ideas, how to make the graph smaller.
* gst/gstutils.c:
Add a comment from a debug session.
* libs/gst/base/gstbasetransform.c:
Log more context.
* libs/gst/controller/gstinterpolationcontrolsource.c:
Indet.
* plugins/elements/gstcapsfilter.c:
Fix typo in docs.
2009-01-01 21:27:06 +00:00
Sebastian Dröge 10caec03ce libs/gst/controller/gstinterpolationcontrolsource.c: Don't use declarations after statements.
Original commit message from CVS:
* libs/gst/controller/gstinterpolationcontrolsource.c:
(_list_find_sorted_custom):
Don't use declarations after statements.
2008-07-08 11:20:22 +00:00
Stefan Kost b1b4a78ffc libs/gst/controller/gstinterpolationcontrolsource.c: Optimize list handling. Use own find function. Exploit that fact...
Original commit message from CVS:
* libs/gst/controller/gstinterpolationcontrolsource.c:
Optimize list handling. Use own find function. Exploit that fact that
the list is sorted. Also pass back the node before, so that we can
insert quickly. Have a fast path for append.
2008-06-29 16:11:24 +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
Sebastian Dröge 18d8507c0b libs/gst/controller/: Move some private declarations into private headers.
Original commit message from CVS:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gsthelper.c:
* libs/gst/controller/gstinterpolation.c:
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_interpolation_control_source_set_interpolation_mode):
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
* libs/gst/controller/lib.c:
Move some private declarations into private headers.
2008-05-03 15:25:25 +00:00
Sebastian Dröge e583f5a57b libs/gst/controller/gstinterpolationcontrolsource.c: Use GSlice for allocating the control points.
Original commit message from CVS:
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free),
(gst_interpolation_control_source_set_internal):
Use GSlice for allocating the control points.
2008-04-02 17:45:08 +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 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