[vlmc-devel] MLTTransition: Add a convenient constructor

Yikai Lu git at videolan.org
Wed Jun 28 18:45:20 CEST 2017


vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Thu Jun 29 00:42:35 2017 +0900| [0171c988db2a6b4f481b5dcefe5b80655ca0ffdf] | committer: Yikai Lu

MLTTransition: Add a convenient constructor

> https://code.videolan.org/videolan/vlmc/commit/0171c988db2a6b4f481b5dcefe5b80655ca0ffdf
---

 src/Backend/MLT/MLTTransition.cpp | 7 +++++++
 src/Backend/MLT/MLTTransition.h   | 1 +
 2 files changed, 8 insertions(+)

diff --git a/src/Backend/MLT/MLTTransition.cpp b/src/Backend/MLT/MLTTransition.cpp
index 76659aaa..28dc3548 100644
--- a/src/Backend/MLT/MLTTransition.cpp
+++ b/src/Backend/MLT/MLTTransition.cpp
@@ -28,6 +28,7 @@
 
 #include <mlt++/MltTransition.h>
 #include "MLTProfile.h"
+#include "MLTBackend.h"
 
 using namespace Backend::MLT;
 
@@ -39,6 +40,12 @@ MLTTransition::MLTTransition( Backend::IProfile& profile, const char *id )
         throw InvalidServiceException();
 }
 
+MLTTransition::MLTTransition( const char* id )
+    : MLTTransition( Backend::instance()->profile(), id )
+{
+
+}
+
 MLTTransition::~MLTTransition()
 {
     delete m_transition;
diff --git a/src/Backend/MLT/MLTTransition.h b/src/Backend/MLT/MLTTransition.h
index 4e301f65..c3f54c2c 100644
--- a/src/Backend/MLT/MLTTransition.h
+++ b/src/Backend/MLT/MLTTransition.h
@@ -40,6 +40,7 @@ namespace MLT
     {
     public:
         MLTTransition( IProfile& profile, const char* id );
+        MLTTransition( const char* id );
         virtual ~MLTTransition() override;
 
         virtual Mlt::Transition*  transition();



More information about the Vlmc-devel mailing list