X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=mlt%2B%2B%2Fsrc%2FMltFrame.cpp;h=643f4193bfae17c62c6225a9e3b2a132a1abebcb;hb=f4963a6aa07644399b273b5d2b1f9299c9047414;hp=4457cecb1d9bedc5700839c5e600441fd1169512;hpb=1fcd5e9c6cec812a621bcfed5a96bb50957602e3;p=melted diff --git a/mlt++/src/MltFrame.cpp b/mlt++/src/MltFrame.cpp index 4457cec..643f419 100644 --- a/mlt++/src/MltFrame.cpp +++ b/mlt++/src/MltFrame.cpp @@ -19,6 +19,7 @@ */ #include "MltFrame.h" +#include "MltProducer.h" using namespace Mlt; Frame::Frame( mlt_frame frame ) : @@ -28,6 +29,7 @@ Frame::Frame( mlt_frame frame ) : } Frame::Frame( Frame &frame ) : + Mlt::Properties( frame ), instance( frame.get_frame( ) ) { inc_ref( ); @@ -51,8 +53,8 @@ mlt_properties Frame::get_properties( ) uint8_t *Frame::get_image( mlt_image_format &format, int &w, int &h, int writable ) { uint8_t *image = NULL; - if ( mlt_properties_get_int( get_properties( ), "consumer_aspect_ratio" ) == 0 ) - mlt_properties_set_int( get_properties( ), "consumer_aspect_ratio", 1 ); + if ( get_double( "consumer_aspect_ratio" ) == 0.0 ) + set( "consumer_aspect_ratio", 1.0 ); mlt_frame_get_image( get_frame( ), &image, &format, &w, &h, writable ); set( "format", format ); set( "writable", writable ); @@ -62,8 +64,8 @@ uint8_t *Frame::get_image( mlt_image_format &format, int &w, int &h, int writabl unsigned char *Frame::fetch_image( mlt_image_format f, int w, int h, int writable ) { uint8_t *image = NULL; - if ( mlt_properties_get_int( get_properties( ), "consumer_aspect_ratio" ) == 0 ) - mlt_properties_set_int( get_properties( ), "consumer_aspect_ratio", 1 ); + if ( get_double( "consumer_aspect_ratio" ) == 0.0 ) + set( "consumer_aspect_ratio", 1.0 ); mlt_frame_get_image( get_frame( ), &image, &f, &w, &h, writable ); set( "format", f ); set( "writable", writable ); @@ -82,3 +84,7 @@ unsigned char *Frame::get_waveform( int w, int h ) return mlt_frame_get_waveform( get_frame( ), w, h ); } +Producer *Frame::get_original_producer( ) +{ + return new Producer( mlt_frame_get_original_producer( get_frame( ) ) ); +}