Custom UI for the Frei0r Alphaspot effect
@aleb
Submitted by Alex Băluț Assigned to Michał Górny @mgorny
Description
The Frei0r Alphaspot can be used to draw simple shapes, which can be useful for blurring, etc.
Below is how the effect is seen in GStreamer/Pitivi. The documentation can be better, but it can be figured out easily by looking at the source code: https://github.com/dyne/frei0r/blob/master/src/filter/alpha0ps/alphaspot.c
$ LANG=en gst-inspect-1.0 frei0r-filter-alphaspot
Factory Details:
Rank none (0)
Long-name alphaspot
Klass Filter/Effect/Video
Description Draws simple shapes into the alpha channel
Author Sebastian Dröge <sebastian.droege@collabora.co.uk>, Marko Cebokli
Plugin Details:
Name frei0r
Description frei0r plugin library
Filename /usr/local/lib/gstreamer-1.0/libgstfrei0r.so
Version 1.12.2
License LGPL
Source module gst-plugins-bad
Source release date 2017-07-14
Binary package GStreamer Bad Plug-ins source release
Origin URL Unknown package origin
GObject
+----GInitiallyUnowned
+----GstObject
+----GstElement
+----GstBaseTransform
+----GstVideoFilter
+----frei0r-filter-alphaspot
Pad Templates:
SRC template: 'src'
Availability: Always
Capabilities:
video/x-raw
format: RGBA
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]
SINK template: 'sink'
Availability: Always
Capabilities:
video/x-raw
format: RGBA
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]
Element Flags:
no flags set
Element Implementation:
Has change_state() function: gst_element_change_state_func
Element has no clocking capabilities.
Element has no URI handling capabilities.
Pads:
SINK: 'sink'
Pad Template: 'sink'
SRC: 'src'
Pad Template: 'src'
Element Properties:
name : The name of the object
flags: readable, writable
String. Default: "frei0r-filter-alphaspot0"
parent : The parent of the object
flags: readable, writable
Object of type "GstObject"
qos : Handle Quality-of-Service events
flags: readable, writable
Boolean. Default: true
shape :
flags: readable, writable, controllable
Double. Range: 0 - 1 Default: 0
position-x :
flags: readable, writable, controllable
Double. Range: 0 - 1 Default: 0.5
position-y :
flags: readable, writable, controllable
Double. Range: 0 - 1 Default: 0.5
size-x :
flags: readable, writable, controllable
Double. Range: 0 - 1 Default: 0.1
size-y :
flags: readable, writable, controllable
Double. Range: 0 - 1 Default: 0.1
tilt :
flags: readable, writable, controllable
Double. Range: 0 - 1 Default: 0.5
transition-width :
flags: readable, writable, controllable
Double. Range: 0 - 1 Default: 0.2
min :
flags: readable, writable, controllable
Double. Range: 0 - 1 Default: 0
max :
flags: readable, writable, controllable
Double. Range: 0 - 1 Default: 1
operation :
flags: readable, writable, controllable
Double. Range: 0 - 1 Default: 0
See in D1745 how a custom UI has been created for the alpha
effect.
The viewer overlay can be extended to show a draggable/resizable rectangle. If you look at https://github.com/pitivi/pitivi/search?q=set_current_sources it seems you need to change that method so it adds an additional overlay if the source has the frei0r-filter-alphaspot
effect.