<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Nov 13, 2011, at 11:21 PM, Sebastien Zwickert wrote:</div><blockquote type="cite"><div><font class="Apple-style-span" color="#000000"><br></font><blockquote type="cite"><blockquote type="cite">[...]<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">+static int Extract( vlc_va_t *p_external, picture_t *p_picture, AVFrame *p_ff )<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">+{<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">+    VLC_UNUSED( p_ff );<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">+    vlc_va_vda_t *p_va = vlc_va_vda_Get( p_external );<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">+<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">+    if ( !p_va->top_frame )<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">+    {<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">+        msg_Dbg( p_va->p_log, "Decoder is buffering...");<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">+        return VLC_EGENERIC;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">+    }<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">+<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">+    CVPixelBufferRef cv_buffer = p_va->top_frame->cv_buffer;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">+    vda_CopyCVBuffer( p_picture, cv_buffer );<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">+<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">+    return VLC_SUCCESS;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">+}<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">+<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">+static void Release( vlc_va_t *p_external, AVFrame *p_ff )<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">+{<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">+    VLC_UNUSED( p_ff );<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">+    VLC_UNUSED( p_external );<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">+}<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I am a bit dubious about the way you implemented the surface<br></blockquote><blockquote type="cite">attachment to the picture.<br></blockquote><blockquote type="cite">To have it correctly working you should attach the correct surface to its<br></blockquote><blockquote type="cite">associated AVFrame buffer. Otherwise I don't think the picture order will<br></blockquote><blockquote type="cite">be the correct one.<br></blockquote><br>The surface is output by the vda decoder via a callback. </div></blockquote><div><br></div><div>*asynchronous* callback.</div><div><br></div><div><br></div><div>Patch in attachment updated with minors changes and the availability to</div><div>select the VDA output pixel format in the users's settings.</div><div><br></div><div>I've put a VLC testing build that supports VDA on : </div><div><a href="http://dilaroga.free.fr/vlc_vda/vlc-2.1.0-git.dmg">http://dilaroga.free.fr/vlc_vda/vlc-2.1.0-git.dmg</a></div><div><br></div><div>and more info on :</div><div><a href="https://github.com/dilaroga/ffmpeg-vda/wiki">https://github.com/dilaroga/ffmpeg-vda/wiki</a></div><div><br></div><div>Best regards,</div><div>Sebastien.</div><div><br></div><div></div></div></body></html>