MltProducer.{h,cpp}, swig/mltpp.i: add method Producer::get_frame.
authorddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Wed, 23 Apr 2008 06:32:01 +0000 (06:32 +0000)
committerddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Wed, 23 Apr 2008 06:32:01 +0000 (06:32 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt++@1114 d19143bc-622f-0410-bfdd-b5b2a6649095

mlt++/src/MltProducer.cpp
mlt++/src/MltProducer.h
mlt++/swig/mltpp.i

index 39a93db..e98e513 100644 (file)
@@ -190,3 +190,12 @@ void Producer::optimise( )
 {
        mlt_producer_optimise( get_producer( ) );
 }
+
+Frame* Producer::get_frame( int index )
+{
+       mlt_frame f = NULL;
+       int result = get_producer()->get_frame( get_producer(), &f, index );
+       if ( f )
+               return new Frame( f );
+       return NULL;
+}
index 09a4977..b1b8172 100644 (file)
@@ -32,6 +32,7 @@ namespace Mlt
        class Service;
        class Filter;
        class Profile;
+       class Frame;
 
        class MLTPP_DECLSPEC Producer : public Service
        {
@@ -67,6 +68,7 @@ namespace Mlt
                        bool same_clip( Producer &that );
                        bool runs_into( Producer &that );
                        void optimise( );
+                       Frame* get_frame( int index = 0 );
        };
 }
 
index f6060b7..93e2ca7 100644 (file)
@@ -42,6 +42,7 @@ namespace Mlt {
 %newobject Service::filter( int );
 %newobject Producer::filter( int );
 %newobject Producer::cut( int, int );
+%newobject Producer::get_frame( int );
 %newobject Playlist::current( );
 %newobject Playlist::clip_info( int );
 %newobject Playlist::get_clip( int );