docs/random/ensonic/dynlink.txt: More work on proposal for new core api.

Original commit message from CVS:
* docs/random/ensonic/dynlink.txt:
More work on proposal for new core api.
* docs/libs/gstreamer-libs-sections.txt:
* libs/gst/base/gstbasetransform.h:
API: GST_BASE_TRANSFORM_LOCK/UNLOCK added
* libs/gst/controller/gstcontroller.c:
(on_object_controlled_property_changed),
(gst_controller_sync_values),
(gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
Less verbose logging add docs for unimplemented parts and correctly
return when using unavailable parts.
This commit is contained in:
Stefan Kost 2007-04-02 14:48:12 +00:00
parent 1a404945ac
commit 63a26ed519
6 changed files with 74 additions and 13 deletions

View file

@ -1,3 +1,20 @@
2007-04-02 Stefan Kost <ensonic@users.sf.net>
* docs/random/ensonic/dynlink.txt:
More work on proposal for new core api.
* docs/libs/gstreamer-libs-sections.txt:
* libs/gst/base/gstbasetransform.h:
API: GST_BASE_TRANSFORM_LOCK/UNLOCK added
* libs/gst/controller/gstcontroller.c:
(on_object_controlled_property_changed),
(gst_controller_sync_values),
(gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
Less verbose logging add docs for unimplemented parts and correctly
return when using unavailable parts.
2007-03-29 Jan Schmidt <thaytan@mad.scientist.com>
* gst/gstclock.c: (gst_clock_set_master), (do_linear_regression):

View file

@ -224,6 +224,9 @@ GST_BASE_TRANSFORM_SRC_PAD
GST_BASE_TRANSFORM_FLOW_DROPPED
GST_BASE_TRANSFORM_LOCK
GST_BASE_TRANSFORM_UNLOCK
<SUBSECTION Standard>
GST_BASE_TRANSFORM
GST_IS_BASE_TRANSFORM

View file

@ -17,10 +17,16 @@ gboolean gst_pad_unlink (GstPad *srcpad, GstPad *sinkpad);
== inserting an element ==
* we have: e1 ! e2
* we want: e1 ! e3 ! e2
* we have: e1 ! e4
* we want: e1 ! e2 ! e3 ! e4
* we want: e1 ! e2 ! e4
gst_element_insert_linked(e1, e2, e3);
gst_element_insert_linked(e1, e2, e3, e4); // e2 == e3 allowed
gst_pads_insert_link (e1.src, e2.sink, e3.src, e4.sink);
disconnect e1.src, e1.src.peer
disconnect e4.sink, e4.sink.peer
connect e1.src e2.sink
connect e3.src e4.sink
== removing an element ==
@ -28,15 +34,28 @@ gst_element_insert_linked(e1, e2, e3);
* we want: e1 ! e3
gst_element_remove_linked(e2);
gst_pads_remove_link (e1.src, e3.sink);
disconnect e1.src, e1.src.peer
disconnect e3.sink, e3.sink..peer
connect e1.src e3.sink
== swapping out an elelment ==
* we have: e1 ! e2 ! e3
* we want: e1 ! e4 ! e3
* we have: e1 ! e2 ! e5
* we want: e1 ! e3 ! e4 ! e5
* we want: e1 ! e3 ! e5
gst_element_swap_linked(e1, e3, e4, e5);
gst_pads_insert_link (e1.src, e3.sink, e4.src, e5.sink);
disconnect e1.src, e1.src.peer (=e2.sink)
disconnect e5.sink, e5.sink.peer
connect e1.src e3.sink
connect e4.src e5.sink
gst_element_swap_linked(e1, e3, e4);
= thoughts =
* I don't think we need api for pads
* Should current api check for the state?
* do we want to swapp multiple elements at once

View file

@ -77,6 +77,26 @@ G_BEGIN_DECLS
*/
#define GST_BASE_TRANSFORM_FLOW_DROPPED GST_FLOW_CUSTOM_SUCCESS
/**
* GST_BASE_TRANSFORM_LOCK:
* @obj: base transform instance
*
* Obtain a lock to protect the transform function from concurrent access.
*
* Since: 0.10.13
*/
#define GST_BASE_TRANSFORM_LOCK(obj) g_mutex_lock (obj->transform_lock)
/**
* GST_BASE_TRANSFORM_UNLOCK:
* @obj: base transform instance
*
* Release the lock that protects the transform function from concurrent access.
*
* Since: 0.10.13
*/
#define GST_BASE_TRANSFORM_UNLOCK(obj) g_mutex_unlock (obj->transform_lock)
typedef struct _GstBaseTransform GstBaseTransform;
typedef struct _GstBaseTransformClass GstBaseTransformClass;
typedef struct _GstBaseTransformPrivate GstBaseTransformPrivate;

View file

@ -105,7 +105,7 @@ on_object_controlled_property_changed (const GObject * object, GParamSpec * arg,
GstControlledProperty *prop = GST_CONTROLLED_PROPERTY (user_data);
GstController *ctrl;
GST_INFO ("notify for '%s'", prop->name);
GST_LOG ("notify for '%s'", prop->name);
ctrl = g_object_get_qdata (G_OBJECT (object), __gst_controller_key);
g_return_if_fail (ctrl);
@ -945,7 +945,7 @@ gst_controller_sync_values (GstController * self, GstClockTime timestamp)
g_return_val_if_fail (GST_IS_CONTROLLER (self), FALSE);
g_return_val_if_fail (GST_CLOCK_TIME_IS_VALID (timestamp), FALSE);
GST_INFO ("sync_values");
GST_LOG ("sync_values");
g_mutex_lock (self->lock);
/* go over the controlled properties of the controller */
@ -1075,6 +1075,9 @@ gst_controller_get_value_array (GstController * self, GstClockTime timestamp,
*
* Sets the given interpolation mode on the given property.
*
* <note><para>Quadratic, qubic and user interpolation is not yet available.
* </para></note>
*
* Returns: %TRUE if the property is handled by the controller, %FALSE otherwise
*/
gboolean
@ -1092,8 +1095,7 @@ gst_controller_set_interpolation_mode (GstController * self,
/* TODO shouldn't this also get a GstInterpolateMethod *user_method
for the case mode==GST_INTERPOLATE_USER
*/
gst_controlled_property_set_interpolation_mode (prop, mode);
res = TRUE;
res = gst_controlled_property_set_interpolation_mode (prop, mode);
}
g_mutex_unlock (self->lock);

View file

@ -84,9 +84,9 @@ typedef struct _GstValueArray
* @GST_INTERPOLATE_TRIGGER: returns the default value of the property,
* except for times with specific values
* @GST_INTERPOLATE_LINEAR: linear interpolation
* @GST_INTERPOLATE_QUADRATIC: square interpolation
* @GST_INTERPOLATE_CUBIC: cubic interpolation
* @GST_INTERPOLATE_USER: user-provided interpolation
* @GST_INTERPOLATE_QUADRATIC: square interpolation (not yet available)
* @GST_INTERPOLATE_CUBIC: cubic interpolation (not yet available)
* @GST_INTERPOLATE_USER: user-provided interpolation (not yet available)
*
* The various interpolation modes available.
*/