On Tue, Jun 18, 2013 at 6:10 AM, j-b-m <j-...@users.sourceforge.net> wrote: > I still have a problem when trying to use these producers in Kdenlive because > in EffectsImpl::render(double time, Image* renderImage), the > QMetaObject::invokeMethod(this, "renderInvokable" (...) sometimes freezes.
What I have noticed while trying to integrate the webvfx filter into Shotcut is that if I call Consumer::stop() then it deadlocks because it it called on the main Qt thread, inside mlt_consumer_close() it waits for the render thread to finish, but the webvfx renderInvokable call is waiting on the main Qt thread to process the slot via blocking queued connection. I have been tinkering with workarounds that I am not so happy with thus far. What I discovered is that if I disable the filter, wait a little for the currently blocked render to complete, then I can call stop because the consumer render thread is not asking webvfx to render anything anymore. I have successfully performed that wait using nanosleep() or a QTimer::singleShot() within a method that I have split into 2 parts around the call to singleShot. However, I would rather have something that works within MLT. I am thinking the call to renderInvokable should not be a blocking queued connection. Rather, perhaps it should wait on a condition after the invocation - one that can be signaled from the actual render or from mlt_consumer prior to joining the render thread. -- +-DRD-+ ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Mlt-devel mailing list Mlt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mlt-devel