Commit graph

227 commits

Author SHA1 Message Date
Thibault Saunier
1a02a59e42 timedvaluecontrolsource: Add some signals about values changes
In order for user to be able to track changes in the value set in
GstTimedValueControlSource the following signals have been added:
 * value-added
 * value-removed
 * value-changed

To be able to use a GstControlPoint to be marshalled into the signals,
the GstControlPoint structure is now registerd as a GBoxed type.

New API:
~~~~~~~
  * GstTimedValueControlSource::value-added
  * GstTimedValueControlSource::value-removed
  * GstTimedValueControlSource::value-added

https://bugzilla.gnome.org/show_bug.cgi?id=737616
2014-10-22 18:08:30 +02:00
Antoine Jacoutot
3e24bbefba libs: g-ir-scanner: do not hardcode libtool path
https://bugzilla.gnome.org/show_bug.cgi?id=726571
2014-04-17 09:26:20 +01:00
Edward Hervey
b363ab17e7 controller: Fix out-of-bounds detection
We want to abort if we higher than the maximum *OR* lower than the minimum
accepted value.

Detected by Coverity.
2013-12-10 17:09:07 -05:00
Sebastian Rasmussen
b40fa2b8c3 docs: cosmetic changes in references/decriptions
* fix typo GstBufferFlag -> GstBufferFlags
 * fix typo GstFeatures -> GstCapsFeatures
 * fix typo GstAllocatorParams -> GstAllocationParams
 * fix typo GstContrlSources -> GstControlSource
 * do not refer to gstcheck as an object
 * make references gtk_init() and tcase_set_timeout() not be references
 * gst_element_get_pad() renamed gst_element_get_static_pad()
 * gst_clock_id_wait_async_full() renamed gst_clock_id_wait_async()
 * _drop_element() is really gst_queue_array_drop_element()
 * gst_pad_accept_caps() was removed, do not refer to it
 * separate GST_META_TAG_MEMORY_STR declaration from description
 * do not describe removed gst_collect_pads_collect()
 * correctly link to GstElementClass' virtual set_context()

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=719614
2013-12-02 21:01:08 +00:00
Rico Tzschichholz
f1971fe1e9 controlbindings: fix pspec relaxation for control source properties
The change should have been from PARAM_CONSTRUCT_ONLY to
PARAM_CONSTRUCT, otherwise bindings are affected, since
they look for the CONSTRUCT flag.

See ec55363d
2013-09-10 16:41:30 +01:00
Adrian Pardini
d4f6c8e0e6 controller: fixes int overflow with properties that span +-INT_MAX
When the range for a property is defined as -INT_MAX-1 .. INT_MAX, like
the xpos in a videomixer the following expression in the macro
definitions of convert_g_value_to_##type (and the equivalent in
convert_value_to_##type)

v = pspec->minimum + (g##type) ROUNDING_OP ((pspec->maximum - pspec->minimum) * s);

are converted to:

v = -2147483648 + (g##type) ROUNDING_OP ((2147483647 - -2147483648) * s);

(2147483647 - -2147483648) overflows to -1 and the net result is:

v = -2147483648 + (g##type) ROUNDING_OP (-1 * s);

so v only takes the values -2147483648 for s == 0 and 2147483647
for s == 1.

Rewriting the expression as minimum*(1-s) + maximum*s gives the correct
result in this case.

https://bugzilla.gnome.org//show_bug.cgi?id=705630
2013-08-08 12:31:49 +02:00
Sreerenj Balachandran
f2bbbdff59 controller: Fix the function signature and a minor typo fix
https://bugzilla.gnome.org/show_bug.cgi?id=699827
2013-05-07 14:53:23 +02:00
Thibault Saunier
3b8181a8c5 controller: Fix element-type annotations 2013-04-25 18:51:33 -03:00
Stefan Sauer
bd85fe34ad argb-controlbinding: fix messed up property setter
This was misassigning the control sources. It was also leaking the old values if
a control source would be replaced.
2013-03-28 16:51:25 +01:00
Stefan Sauer
03075cd144 docs: mention clipping of values in control-binding docs 2013-03-08 13:16:40 +01:00
Stefan Sauer
ec55363da3 controlbinding: relax the pspec for the control-source
We can change control sources on controlbindings.
2013-03-07 09:18:26 +01:00
Stefan Sauer
e642896565 lfo: set a sensible lower boundary for the frequency
Use DBL_MIN, which is a the smalles double greater than zero that is not in
denormal format. This exposes the limit better than the runtime check.
2013-03-07 09:18:25 +01:00
Stefan Sauer
1b076e995e lfocontrolsource: init the amplitude to the default and update the docs 2013-03-06 16:41:18 +01:00
Stefan Sauer
79d8b61a13 triggercontrolsource: add missing end_iter check for sequence
Avoid accessing the end-iter, this is a marker without a data field.
2013-02-17 19:53:55 +01:00
Stefan Sauer
56f6f022e2 controlbinding: error handling for binding controlsources to wrong properties
Add warning if property is not suitable for controlling. When adding a control-
binding check that pspec!=NULL.
2013-02-08 21:38:22 +01:00
Stefan Sauer
fba696eb05 docs: update the controller docs
Add the control bindings to the docs. Add a little more detail.
2013-02-01 22:00:18 +01:00
Tim-Philipp Müller
64eee27ebc Use GST_*_1_0 environment variables everywhere
The _1_0 suffixed environment variables override the
non-suffixed ones, so if we're in an environment that
sets the _1_0 suffixed ones, such as jhbuild, we need
to set those to make sure ours actually always get
used.
2013-01-15 13:47:32 +00:00
Sebastian Dröge
e58dabc750 libs: Use foo/foo.h as single-include header consistently everywhere
https://bugzilla.gnome.org/show_bug.cgi?id=688785
2012-12-12 16:44:14 +00:00
Evan Nemerson
1afb1f12ef libs: Add missing single include headers and use them in GIRs 2012-11-21 11:00:40 +01:00
Tim-Philipp Müller
666c8c11c6 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 20:44:48 +00:00
Tim-Philipp Müller
073c09afe0 g-i: fix "can't resolve libraries to shared libraries: gstcheck-1.0" build error
Revert --library=libfoo-1.0.la -> --library=foo-1.0 change made
in previous commit. Turns out that was wrong, despite what the
man page says.

https://bugzilla.gnome.org/show_bug.cgi?id=603710
2012-10-29 13:27:55 +00:00
Tim-Philipp Müller
21a74a6b79 libs: g-i: avoid multiple libraries in the shared-library tag
Using multiple libraries causes problems for the C# bindings and
will for similiar languages such as Java when there are bindings
for them.

Also change --library=libgstfoo-X.la to --library=gstfoo-X as
the man page suggests it should be done.

https://bugzilla.gnome.org/show_bug.cgi?id=679315
2012-10-28 17:20:10 +00:00
Tim-Philipp Müller
ca90ea6e55 Remove GST_USE_UNSTABLE_API guard and defines 2012-09-17 13:35:26 +01:00
Mark Nauwelaerts
357cf18fd5 libs: adjust comment style 2012-09-10 12:16:06 +02:00
Tim-Philipp Müller
36d5c586b1 controller: fix direct control binding double -> int conversion
Round properly to nearest integer. Fixes controller
unit test on PowerPC G4.
2012-09-07 01:02:10 +01:00
Chun-wei Fan
94cbf34300 controlbindings: include gst/math-compat.h for isnan()
Due to the usage of isnan(), where an implementation is added into
gst/math-compat.h. Fixes build on Visual C++.

https://bugzilla.gnome.org/show_bug.cgi?id=679112
2012-07-02 20:31:10 +01:00
Evan Nemerson
9b3d8523d2 controller: assorted minor introspection fixes 2012-06-19 19:55:02 -07:00
Stefan Sauer
3de656121f controlbindings: add comments for sparse control source 2012-04-25 20:19:24 +02:00
Stefan Sauer
772c58e255 controller: expand the api to offer functions for plain and GValue arrays
Rename the _get_value_array() functions to _get_g_value_array() and reintroduce
the former to operate on plain unboxed c datatypes (like in 0.10). The _g_value
variants are for bindings while the _value ones are more suited to processing
in elements.
2012-04-25 20:19:23 +02:00
Edward Hervey
2b49855494 controller: Chain up to parent class dispose/finalize
Avoids leaks
2012-04-12 14:59:52 +02:00
Stefan Sauer
f2ffa0fc65 controller: dup the objects to avoid premature frees 2012-04-05 21:17:57 +02:00
Sebastian Dröge
b0d89da6b6 gst: Change versioning
Remove GST_MAJORMINOR and replace it by GST_API_VERSION
Also set GST_VERSION_{MAJOR,MINOR,MICRO,NANO} explicitely
now.

All versions are at 1.0.0 now for the release soon but
API/ABI can still change until the 1.0.0 release.

Next release versions until 1.0.0 will be 0.10.9X and
these will be release candidates. GST_VERSION_* will
nonetheless stay at 1.0.0.0.
2012-04-04 14:28:55 +02:00
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
4deaf9b8be controller: rename control-bindings
gst_control_binding_xxx -> gst_xxx_control_binding for consistency.
2012-01-30 21:18:57 +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
Stefan Sauer
660d9c071a controller: cleanup the control-binding construction
This is now bindings firendly as _new is just a classic c convenience and all
the work is done in a constructor. As a side effect _new never fails.
Fix the tests.
2012-01-24 21:57:44 +01:00
Stefan Sauer
b23977cb93 controller: allow different controlbindings
Make controlbinding an abstract baseclass. Move implementation to control-
binding-direct and add a control-binding-argb. Add an example.
2012-01-23 11:03:43 +01:00
Wim Taymans
252327f87a Update for new gthread API 2012-01-19 09:27:04 +01:00
Matej Knopp
9092fb87f0 Fix printf format build warnings 2012-01-09 13:15:34 +00:00
Stefan Sauer
3ebd639d34 interpolationcontrolsource: fix cubic interpolation for arrays 2012-01-01 18:54:23 +01:00
Stefan Sauer
e87d563cac lfocontrolsource: cleanups and fix triangle calculations 2012-01-01 18:43:23 +01:00
Stefan Sauer
9a7e45596e lfocontrolsource: make chainable
Now the properties of this controlsource are in turn controlable. Add an example
to show the usage.
2012-01-01 16:08:01 +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
Stefan Sauer
855212cd2f triggercontrolsource: fix control reaches end of non-void function
Return NAN and check the value further up.
Fixes #666890
2011-12-27 13:48:36 +01:00
Tim-Philipp Müller
63caa628c4 controller: quick-fix compiler warning breaking the build
This is likely not the proper fix.

https://bugzilla.gnome.org/show_bug.cgi?id=666890
2011-12-27 11:40:40 +00: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
Stefan Sauer
a80401b22c controller: move GstControlledProperty into a separate class
Add a GstControlBinding class. This is a preparation for making the
controlsources generate double valued control curves and do the gparamspec
mapping in the control binding. Now the API in GstObject is again mostly
for convenience.
2011-12-25 18:50:45 +01:00