2011/6/9 Maksym Veremeyenko <ve...@m1stereo.tv>: > 09.06.11 15:57, Maksym Veremeyenko написав(ла): >> >> 09.06.11 09:57, Dan Dennedy написав(ла): >> [...] >>> >>> Overall, I like the direction of it very much; it is much clearer. >>> However, there is at least one big problem. It does not respect the >>> realtime frame-dropping behavior of mlt_consumer. Basically, I >>> re-added this part between renderAudio() and renderVideo() plus >>> members and initializers to support it. >>> >>> if ( mlt_properties_get_int( MLT_FRAME_PROPERTIES(frame), "rendered") ) >>> { >>> // Close the previous frame and use the new one >>> mlt_frame_close( m_frame ); >>> m_frame = frame; >>> } >>> else >>> { >>> if ( !m_frame ) >>> m_frame = frame; >>> // Reuse the last frame >>> mlt_log_verbose( getConsumer(), "dropped video frame %u\n", >>> ++m_dropped ); >>> } >>> >>> --- >>> >>> If a frame is not rendered, then the render-ahead thread in >>> mlt_consumer has decided to skip preparing an image for it (if >>> real_time> 0). You did not notice because you can still request to >>> render an image anyway on-demand by calling mlt_frame_get_image and >>> also because you were probably not stressing it. >> >> i attached second patch from that series that revert dropped frame >> behavior > > here is updated version >
I reviewed it briefly. It is mostly good, but renderAudio() should use frame and not m_frame because we never want to drop the audio and want to make audio as continuous as possible. That means in the else block above it that you can not close frame. Lastly, the consumer-frame-show should occur after the frame is displayed rather than before. That makes it semantically consistent with the other consumers, and it works correctly with Kdenlive's video scopes. A big chunk of Kdenlive's event listeners are asynchronous, which is good behavior to reduce latency within the callback function. However, there is no mutex protection to the frame's image, and Kdenlive might convert the image to RGBA in the midst of a frame's YCbCr image being delivered to decklink. Therefore, consumers should fire the event only when it is finished with the audio and image in that frame. However, in decklink, what does that portend for this frame that is being saved and repeated, hmm... repeat last DeckLinkVideoFrame instead of mlt_frame. -- +-DRD-+ ------------------------------------------------------------------------------ EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev _______________________________________________ Mlt-devel mailing list Mlt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mlt-devel