From: ddennedy Date: Wed, 23 Apr 2008 06:32:01 +0000 (+0000) Subject: MltProducer.{h,cpp}, swig/mltpp.i: add method Producer::get_frame. X-Git-Url: http://research.m1stereo.tv/gitweb?a=commitdiff_plain;h=ef7d73ce9bf11e071aafbcf74d1900d9cdeb7537;p=melted MltProducer.{h,cpp}, swig/mltpp.i: add method Producer::get_frame. git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt++@1114 d19143bc-622f-0410-bfdd-b5b2a6649095 --- diff --git a/mlt++/src/MltProducer.cpp b/mlt++/src/MltProducer.cpp index 39a93db..e98e513 100644 --- a/mlt++/src/MltProducer.cpp +++ b/mlt++/src/MltProducer.cpp @@ -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; +} diff --git a/mlt++/src/MltProducer.h b/mlt++/src/MltProducer.h index 09a4977..b1b8172 100644 --- a/mlt++/src/MltProducer.h +++ b/mlt++/src/MltProducer.h @@ -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 ); }; } diff --git a/mlt++/swig/mltpp.i b/mlt++/swig/mltpp.i index f6060b7..93e2ca7 100644 --- a/mlt++/swig/mltpp.i +++ b/mlt++/swig/mltpp.i @@ -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 );