[Mlt-devel] question on usage of MLT Producer
Brought to you by:
ddennedy,
lilo_booter
From: jaromil <ja...@dy...> - 2008-02-26 16:02:22
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 re all, first of all thanks for OpenMLT, it is one of the best contribution to multimedia development for GNU folks, cheers. i'm developing a application called FreeJ http://freej.dyne.org (GPLv3) and i would like to use openMLT to re-implement the video layer (currently based on ffmpeg old-API) and in future take advantage of more features in OpenMLT. so far my attempt is limited to usage of a Producer (the avformat one) inside FreeJ: my app runs with its own threading and can be seen as an "external consumer" implementation. i am trying to instantiate a producer for direct usage in the simpliest way possible, proceeding as follows: mlt_factory_init( NULL ); ... mlt_factory_producer( NULL, file ); ... mlt_producer_optimise( producer ); int w = mlt_properties_get_int( MLT_PRODUCER_PROPERTIES( producer ), "width"); int h = mlt_properties_get_int( MLT_PRODUCER_PROPERTIES( producer ), "height"); ... mlt_image_format format = mlt_image_yuv422; (producer->get_frame)(producer, &frame, 0); mlt_frame_get_image( frame, &image, &format, (int*)&geo.w, (int*)&geo.h, 0 ); mlt_convert_yuv422_to_rgb24a( image, (uint8_t*)buffer, geo.w * geo.h); mlt_frame_close( frame ); but that leads just to a block at the (producer->get_frame) call, taking 100% of CPU and sometimes leading to the following get_image call which hangs my computer. I also tried embedding the producer into a service, obtaining the frame from the service API, but then the pthread lock() call its doing hangs everything. i'd be very grateful if anyone can point me out what i'm missing, so far i spent two days studying the OpenMLT sources (very well written!) but i couldn't understand what the mlt_consumer is doing that i don't. thanks in advance for your precious advices, ciao - -- Jaromil, dyne.org developer, http://jaromil.dyne.org GPG: 779F E8B5 47C7 3A89 4112 64D0 7B64 3184 [ B534 0B5E ] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHxDgEe2QxhLU0C14RApnaAJ99xb9rPnf6sZon/Oz+0yCdgHB3iACg3MKL PzqFwUSxK/Noqo1tH4rTLgE= =UCU9 -----END PGP SIGNATURE----- |