org.gstreamer.controller
Class Controller
java.lang.Object
org.gstreamer.lowlevel.NativeValue
org.gstreamer.lowlevel.Handle
org.gstreamer.lowlevel.NativeObject
org.gstreamer.lowlevel.RefCountedObject
org.gstreamer.GObject
org.gstreamer.controller.Controller
public class Controller
- extends GObject
The controller subsystem offers a lightweight way to adjust gobject properties over stream-time.
It works by using time-stamped value pairs that are queued for element-properties.
At run-time the elements continously pull values changes for the current stream-time.
What needs to be changed in a GstElement? Very little - it is just two steps to make a plugin controllable!
- mark gobject-properties paramspecs that make sense to be controlled, by GST_PARAM_CONTROLLABLE.
- when processing data (get, chain, loop function) at the beginning call gst_object_sync_values(element,timestamp).
This will made the controller to update all gobject properties that are under control with the current values
based on timestamp.
What needs to be done in applications? Again its not a lot to change.
first put some properties under control, by calling controller = gst_object_control_properties (object, "prop1", "prop2",...);
Get a GstControlSource for the property and set it up.
csource = gst_interpolation_control_source_new();
gst_interpolation_control_source_set_interpolation_mode(csource, mode);
gst_interpolation_control_source_set (csource,0 * GST_SECOND, value1);
gst_interpolation_control_source_set (csource,1 * GST_SECOND, value2);
Set the GstControlSource in the controller. gst_controller_set_control_source (controller, "prop1", csource);
start your pipeline
Methods inherited from class org.gstreamer.GObject |
addCallback, connect, connect, connect, disconnect, disconnect, disposeNativeHandle, emit, emit, g_signal_connect, get, getPointer, getPropertyDefaultValue, getPropertyMaximumValue, getPropertyMinimumValue, getType, invalidate, objectFor, ref, removeCallback, set, unref |
Methods inherited from class org.gstreamer.lowlevel.NativeObject |
classFor, disown, dispose, equals, finalize, getNativeAddress, handle, hashCode, initializer, initializer, instanceFor, isDisposed, nativeValue, objectFor, objectFor, objectFor, toString |
Methods inherited from class java.lang.Object |
clone, getClass, notify, notifyAll, wait, wait, wait |
Controller
public Controller(NativeObject.Initializer init)
- For internal gstreamer-java use only
- Parameters:
init
- initialization data
Controller
public Controller(com.sun.jna.Pointer ptr,
boolean needRef,
boolean ownsHandle)