Monday 15 June 2015

multimedia - Python bindings for MLT GTK+ Consumer -



multimedia - Python bindings for MLT GTK+ Consumer -

i'm stuggling figure out how utilize mlt's gtk2 consumer in python. consumer outlined here.

there's nil in doxygen api using consumer , details find c code itself.

i tried next code based on play.py example, gives me error

notimplementederror: wrong number or type of arguments overloaded function 'new_consumer'. possible c/c++ prototypes are: mlt::consumer::consumer() mlt::consumer::consumer(mlt::profile &) mlt::consumer::consumer(mlt::profile &,char const *,char const *) mlt::consumer::consumer(mlt::profile &,char const *) mlt::consumer::consumer(mlt::service &) mlt::consumer::consumer(mlt::consumer &) mlt::consumer::consumer(mlt_consumer)

code:

#!/usr/bin/env python # -*- coding: utf-8 -*- # import required modules import mlt import time import sys import gtk # start mlt scheme mlt.factory().init( ) # found profile mlt_profile = mlt.profile( ) # create producer p = mlt.producer( mlt_profile, "video_file" ) self.mltwidget = gtk.hbox() fp.add(self.mltwidget) if p: # create consumer c = mlt.consumer( mlt_profile, "gtk_preview", self.mltwidget) # turn off default rescaling c.set( "rescale", "none" ) # connect producer consumer c.connect( p ) # start consumer c.start( ) # wait until user stops consumer while c.is_stopped( ) == 0: time.sleep( 1 ) else: # diagnostics print "unable open ", "video_file"

can guys allow me know how can utilize consumer, or give advice on how figure out? alternately, advice on how embed sdl screen produced mlt sdl consumer in gtk2 application great :)

many thanks!

so after farther investigation, appears gtk+ consumer uses sdl windowid hack, standard sdl consumer can embedded manually using code outlined @ http://faq.pygtk.org/index.py?file=faq23.042.htp&req=show

this unfortunately not suitable application required multiple screens i'll looking @ alternate options.

python multimedia mlt

No comments:

Post a Comment