Hi,

by default transition composite scales B frame if larger then A frame. enabling *crop* property fix behavior but disable valign/halign property handling.

i did not found a parameters combination that could combine *crop* property and *valign/halign* property, so i decided to implement handling such situation.

--
Maksym Veremeyenko


From 4a21e1885f2f8f0594b7e8208aaf4fc51f13dd5b Mon Sep 17 00:00:00 2001
From: Maksym Veremeyenko <ve...@m1.tv>
Date: Sat, 20 Feb 2016 19:03:06 +0200
Subject: [PATCH] implement 'nofit' property of transition_composite

---
 src/modules/core/transition_composite.c   |    5 +++++
 src/modules/core/transition_composite.yml |   11 +++++++++++
 2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/src/modules/core/transition_composite.c 
b/src/modules/core/transition_composite.c
index 00d5bfd..fccda8e 100644
--- a/src/modules/core/transition_composite.c
+++ b/src/modules/core/transition_composite.c
@@ -785,6 +785,11 @@ static int get_b_frame_image( mlt_transition self, 
mlt_frame b_frame, uint8_t **
                geometry->sw = scaled_width;
                geometry->sh = scaled_height;
        }
+       else if ( mlt_properties_get( properties, "nofit" ) )
+       {
+               geometry->sw = get_value( b_props, "meta.media.width", "width" 
);
+               geometry->sh = get_value( b_props, "meta.media.height", 
"height" );
+       }
        // Normalise aspect ratios and scale preserving aspect ratio
        else if ( mlt_properties_get_int( properties, "aligned" ) && 
mlt_properties_get_int( properties, "distort" ) == 0 && mlt_properties_get_int( 
b_props, "distort" ) == 0 && geometry->item.distort == 0 )
        {
diff --git a/src/modules/core/transition_composite.yml 
b/src/modules/core/transition_composite.yml
index 2ae5d6c..dca6527 100644
--- a/src/modules/core/transition_composite.yml
+++ b/src/modules/core/transition_composite.yml
@@ -135,3 +135,14 @@ parameters:
     type: geometry
     readonly: no
     mutable: yes
+  - identifier: nofit
+    title: Keep original dimention of B frame
+    description: >
+      When set, causes the B frame to original dimention. Similar to "crop" but
+      will honor (v|h)align information.
+    type: integer
+    default: 0
+    minimum: 0
+    maximum: 1
+    mutable: yes
+    widget: checkbox
-- 
1.7.1

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel

Reply via email to