]> git.sesse.net Git - mlt/commitdiff
Add a refresh property to videostab2 filter.
authorDan Dennedy <dan@dennedy.org>
Fri, 8 Nov 2013 03:41:20 +0000 (19:41 -0800)
committerDan Dennedy <dan@dennedy.org>
Fri, 8 Nov 2013 03:41:20 +0000 (19:41 -0800)
src/modules/videostab/filter_videostab2.c
src/modules/videostab/filter_videostab2.yml

index 85da5956a8dbfcba545cd14b5a131e535cbd965a..63d2374c0826eda83976573ff9ed432973ba8bbf 100644 (file)
@@ -134,6 +134,13 @@ static int filter_get_image( mlt_frame frame, uint8_t **image, mlt_image_format
                // Service locks are for concurrency control
                mlt_service_lock( MLT_FILTER_SERVICE( filter ) );
 
+               // Handle signal from app to re-init data
+               if ( mlt_properties_get_int( MLT_FILTER_PROPERTIES(filter) , "refresh" ) )
+               {
+                       mlt_properties_set( MLT_FILTER_PROPERTIES(filter) , "refresh", NULL );
+                       data->initialized = 0;
+               }
+
                if ( !vectors) {
                        if ( !data->initialized )
                        {
index 254c90334b9007941282a0918a3b7b6e4541502f..29138a856fd56a6def68b947a2e56eec6d96651e 100644 (file)
@@ -7,7 +7,7 @@ creator: Marco Gittler <g.marco@freenet.de>
 version: 0.1
 license: GPL
 language: en
-url: ttp://public.hronopik.de/vid.stab/features.php?lang=en
+url: http://public.hronopik.de/vid.stab/
 tags:
   - Video
 description: Stabilize Video (for wiggly/rolling video)
@@ -19,17 +19,18 @@ notes: >
   first pass. For the second pass, use output.mlt as the input.
 
 parameters:
-  - identifier: vectors
+  - identifier: vectors (transform)
     title: Vectors
     type: geometry
     description: >
       A set of X/Y coordinates by which to adjust the image.
       When this is not supplied, the filter computes the vectors and stores
       them in this property when the last frame has been processed.
+
   - identifier: shakiness
     title: Shakiness
     type: integer
-    description: How shaky is the Video
+    description: How shaky is the video (analysis)
     readonly: no
     required: no
     minimum: 1
@@ -37,10 +38,11 @@ parameters:
     default: 4
     mutable: yes
     widget: spinner
+
   - identifier: accuracy
     title: Accuracy
     type: integer
-    description: Accuracy of Shakiness detection
+    description: Accuracy of shakiness detection (analysis)
     readonly: no
     required: no
     minimum: 1
@@ -48,10 +50,11 @@ parameters:
     default: 4
     mutable: yes
     widget: spinner
+
   - identifier: stepsize
     title: Stepsize
     type: integer
-    description: Stepsize of Detection process minimum around 
+    description: Step size of search process (analysis)
     readonly: no
     required: no
     minimum: 0
@@ -59,10 +62,11 @@ parameters:
     default: 6
     mutable: yes
     widget: spinner
+
   - identifier: algo
-    title: Algo
+    title: Algorithm
     type: integer
-    description: 0 = Bruteforce, 1 = small measurement fields
+    description: 0 = brute force (translation only), 1 = small measurement fields (analysis)
     readonly: no
     required: no
     minimum: 0
@@ -70,10 +74,11 @@ parameters:
     default: 1
     mutable: yes
     widget: spinner
+
   - identifier: mincontrast
-    title: MinContrast
+    title: Minimum Contrast
     type: float
-    description: Below this Contrast Field is discarded
+    description: Below this contrast, a field is discarded (analysis)
     readonly: no
     required: no
     minimum: 0
@@ -81,10 +86,11 @@ parameters:
     default: 0.3
     mutable: yes
     widget: spinner
+
   - identifier: show
     title: Show
     type: integer
-    description: 0 = draw nothing, 1,2 show fields and transforms
+    description: 0 = draw nothing, 1 or 2 = show fields and transforms (analysis)
     readonly: no
     required: no
     minimum: 0
@@ -92,10 +98,11 @@ parameters:
     default: 0
     mutable: yes
     widget: spinner
+
   - identifier: smoothing
     title: Smoothing
     type: integer
-    description: number of frames for lowpass filtering ( ( num * 2 + 1) frames )
+    description: number of frames for lowpass filtering (2N + 1 frames) (transform)
     readonly: no
     required: no
     minimum: 0
@@ -103,10 +110,12 @@ parameters:
     default: 10
     mutable: yes
     widget: spinner
+
   - identifier: maxshift
     title: Maxshift
     type: integer
-    description: max number of pixels to shift
+    description: maximum translation, -1 = no limit (transform)
+    unit: pixels
     readonly: no
     required: no
     minimum: -1
@@ -114,10 +123,12 @@ parameters:
     default: -1
     mutable: yes
     widget: spinner
+
   - identifier: maxangle
     title: Maxangle
     type: float
-    description: max angle to rotate (in rad)
+    description: max angle to rotate, -1 = no limit (transform)
+    unit: radians
     readonly: no
     required: no
     minimum: -1
@@ -125,10 +136,11 @@ parameters:
     default: -1
     mutable: yes
     widget: spinner
+
   - identifier: crop
     title: Crop
     type: integer
-    description: 0 = keep border, 1 = black background
+    description: 0 = keep border, 1 = black background (transform)
     readonly: no
     required: no
     minimum: 0
@@ -136,10 +148,11 @@ parameters:
     default: 0
     mutable: yes
     widget: spinner
+
   - identifier: invert
     title: Invert
     type: integer
-    description: Invert transform
+    description: Invert transforms (transform)
     readonly: no
     required: no
     minimum: 0
@@ -147,10 +160,11 @@ parameters:
     default: 0
     mutable: yes
     widget: spinner
+
   - identifier: relative
     title: Relative Transform
     type: integer
-    description: 0 = absolute transform, 1= relative
+    description: 0 = absolute, 1 = relative (transform)
     readonly: no
     required: no
     minimum: 0
@@ -158,10 +172,12 @@ parameters:
     default: 1
     mutable: yes
     widget: spinner
+
   - identifier: zoom
     title: Zoom
     type: integer
-    description: additional zoom during transform
+    description: additional zoom amount (transform)
+    unit: percent
     readonly: no
     required: no
     minimum: -500
@@ -169,10 +185,11 @@ parameters:
     default: 0
     mutable: yes
     widget: spinner
+
   - identifier: optzoom
     title: Optimal Zoom
     type: integer
-    description: use optimal zoom (calulated from transforms)
+    description: automatically determine optimal zoom (transform)
     readonly: no
     required: no
     minimum: 0
@@ -180,10 +197,11 @@ parameters:
     default: 1
     mutable: yes
     widget: spinner
+
   - identifier: sharpen
     title: Sharpen Image
     type: float
-    description: sharpen transformed image
+    description: amount of sharpening (transform)
     readonly: no
     required: no
     minimum: 0
@@ -192,3 +210,9 @@ parameters:
     mutable: yes
     widget: spinner
 
+  - identifier: refresh
+    description: >
+      Applications should set this when it updates a transform parameter.
+    type: integer
+    minimum: 0
+    maximum: 1