X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fswig%2Fmlt.i;h=4bb129638f125fa0157048e0a0dc3fb73e60f3c0;hb=57d7042fd453c5ca4dabd55488199b5a5b79b3c3;hp=20434e448ce86ce3b664b874e22c8518a6091b54;hpb=46fc89b27e98266757dfb7a55912becef8d419e2;p=mlt diff --git a/src/swig/mlt.i b/src/swig/mlt.i index 20434e44..4bb12963 100644 --- a/src/swig/mlt.i +++ b/src/swig/mlt.i @@ -62,6 +62,16 @@ namespace Mlt { %newobject Repository::languages( ); %newobject Profile::list(); %newobject Repository::presets(); + +#if defined(SWIGPYTHON) +%feature("shadow") Frame::get_waveform(int, int) %{ + def get_waveform(*args): return _mlt.frame_get_waveform(*args) +%} +%feature("shadow") Frame::get_image(mlt_image_format&, int&, int&) %{ + def get_image(*args): return _mlt.frame_get_image(*args) +%} +#endif + } /** Classes to wrap. @@ -169,6 +179,15 @@ binary_data frame_get_waveform( Mlt::Frame &frame, int w, int h ) return result; } +binary_data frame_get_image( Mlt::Frame &frame, mlt_image_format format, int w, int h ) +{ + binary_data result = { + mlt_image_format_size( format, w, h, NULL ), + (char*) frame.get_image( format, w, h ) + }; + return result; +} + %} %typemap(out) binary_data { @@ -176,5 +195,6 @@ binary_data frame_get_waveform( Mlt::Frame &frame, int w, int h ) } binary_data frame_get_waveform(Mlt::Frame&, int, int); +binary_data frame_get_image(Mlt::Frame&, mlt_image_format, int, int); #endif