<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 19, 2016 at 8:03 PM, Shu Wang <span dir="ltr"><<a href="mailto:halfelf.ronin@gmail.com" target="_blank">halfelf.ronin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Liu,<div><br></div><div>  <i>codec -> codecpar</i> isn't a big change, and is easy to upgrade. Clone and pull the snapshot repo, you'll see some examples has been updated, though not all of them. </div><div><br></div><div>  While the new decode/encode API is another story. I haven't tried these yet. Not many examples I can find. Maybe the closest one is this: <a href="https://blogs.gentoo.org/lu_zero/2016/03/29/new-avcodec-api/" target="_blank">https://blogs.gentoo.<wbr>org/lu_zero/2016/03/29/new-<wbr>avcodec-api/</a></div></div></blockquote><div>Thanks. I just got it done..  The confusing things for me are when to set these various fields of AVStream.codecpar or AVCodecContext, when to copy from one to the other other, especially the time_base.</div><div>For decoding / encoding, demux / mux, there are some subtle differences. Unfortunately, there are limited documentation and related code comments are not very clear for me.</div><div>What I did is to read the ffmpeg.c and try to figure out what it does. It would be nice if the examples are updated in time.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Thu, Oct 20, 2016 at 6:13 AM, Chao Liu <span dir="ltr"><<a href="mailto:yijinliu@gmail.com" target="_blank">yijinliu@gmail.com</a>></span> wrote:<br></span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><div dir="ltr">Hi,<div>I am trying to upgrade our code to 3.1. There are a lot of warnings about deprecated APIs, like use AVStream.codecpar instead of AVStream.codec, use  avcodec_send_packet()/avc<wbr>odec_receive_frame() instead of avcodec_decode_video2. Are there any examples how to do the transition? I noticed that all these <a href="https://www.ffmpeg.org/doxygen/3.1/examples.html" target="_blank">examples</a> are still using the old APIs. Should they be updated?</div></div>
<br></span>______________________________<wbr>_________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">http://ffmpeg.org/mailman/list<wbr>info/libav-user</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="m_-8285913887675340281gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Shu. Wang @ Bestminr<br><a href="http://halfelf.me" target="_blank">http://halfelf.me</a></div></div>
</font></span></div>
<br>______________________________<wbr>_________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">http://ffmpeg.org/mailman/<wbr>listinfo/libav-user</a><br>
<br></blockquote></div><br></div></div>