[Libav-user] API changes v2.8.x ==> 3.0.x
salsaman
salsaman at gmail.com
Thu Aug 18 23:15:56 EEST 2016
On Thu, Aug 18, 2016 at 4:02 PM, Charles <linux2 at orion15.org> wrote:
> El 17/08/16 a las 23:20, Charles escribió:
>>
>> Anybody had any luck finding sample code that uses the 3.0 API
>> There was some traffic back in June that just seemed to end...
>> Thanks
>>
>> AFAIK, the 3.0 API does not work. That is codecpar (which works but
>> is missing some stuff for encoding) and av_send_packet(),etc. which
>> do not work at all.
>> I suggest you wait until ffplay/ffmpeg get translated to that new
>> api before you try it yourself.
>>
>> What is codecpar ? I have never heard of it.
>>
>> Gabriel.
>>
>
> Gonzalo, kinda figured that out so now just a bunch of warnings...
>
> Gabriel,
>
> @@libavformat/avformat.h+878
> /**
> * @deprecated use the codecpar struct instead
> */
> attribute_deprecated
> AVCodecContext *codec;
>
> @@libavformat/avformat.h+1212
> /*
> * Codec parameters associated with this stream. Allocated and freed by
> * libavformat in avformat_new_stream() and avformat_free_context()
> * respectively.
> *
> * - demuxing: filled by libavformat on stream creation or in
> * avformat_find_stream_info()
> * - muxing: filled by the caller before avformat_write_header()
> */
> AVCodecParameters *codecpar;
>
>
>
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
OK. Is it just a straight replacement, e.g:
AVCodecContext *cc;
vdecoder=avcodec_find_decoder(cc->codec_id);
avcodec_open2(cc, vdecoder, NULL);
cdata->frame_width=cdata->width = cc->width;
cdata->frame_height=cdata->height = cc->height;
becomes:
AVCodecParameters *cp;
vdecoder=avcodec_find_decoder(cp->codec_id);
avcodec_open2(cp, vdecoder, NULL);
cdata->frame_width=cdata->width = cp->width;
cdata->frame_height=cdata->height = cp->height;
etc ?
also:
avformat_find_stream_info() returns an array of streams...so in the new
version it returns an array of stream and corresponding array of codecpar ?
Regards,
Gabriel.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20160818/e2f82a02/attachment.html>
More information about the Libav-user
mailing list