We are currently trying to upgrade the ffmpeg version that our program uses. The jump is big because what we have used so far is ffmpeg 0.8, and latest version is 1.2.
In these tests I am using the (let me say) amazing packages I find here.
As first thing, I tried to download and build against ffmpeg 1.2, and of course I got a lot of warnings and errors, about function and variables deprecated or not existing any more.
To smooth the transition, I tried then to build against ffmpeg 1.0, the closest higher version with respect to 0.8. I got a list of warnings and errors that I list here below.
My question is the following: Does it exist any guide to help in these transition, to convert old ffmpeg paradigms/functions calls in the new version? Since we are speaking about a lot of code that I did not write and that I would like not to analyse line by line, I would be very happy if it would be possibly to do a one-to-one conversion of old functions calls to new functions calls, same for variables.
Here is the list of warnings and errors (I have cleaned it so there is only one entry per error/warning)
warning: 'AVStream* av_new_stream(AVFormatContext*, int)' is deprecated (declared at /ffmpeg/include/libavformat/avformat.h:1646) [-Wdeprecated-declarations]
warning: 'int avcodec_open(AVCodecContext*, AVCodec*)' is deprecated (declared at /ffmpeg/include/libavcodec/avcodec.h:3569) [-Wdeprecated-declarations]
error: 'avcodec_init' was not declared in this scope
warning: 'int avcodec_encode_video(AVCodecContext*, uint8_t*, int, const AVFrame*)' is deprecated (declared at /ffmpeg/include/libavcodec/avcodec.h:4272) [-Wdeprecated-declarations]
warning: 'AVCodecContext* avcodec_alloc_context()' is deprecated (declared at /ffmpeg/include/libavcodec/avcodec.h:3423) [-Wdeprecated-declarations]
warning: 'int avcodec_decode_audio3(AVCodecContext*, int16_t*, int*, AVPacket*)' is deprecated (declared at /ffmpeg/include/libavcodec/avcodec.h:3852) [-Wdeprecated-declarations]
warning: 'void av_close_input_file(AVFormatContext*)' is deprecated (declared at /ffmpeg/include/libavformat/avformat.h:1622) [-Wdeprecated-declarations]
error: 'av_open_input_file' was not declared in this scope
warning: 'int av_find_stream_info(AVFormatContext*)' is deprecated (declared at /ffmpeg/include/libavformat/avformat.h:1446) [-Wdeprecated-declarations]
error: 'av_set_parameters' was not declared in this scope
error: 'AVFormatContext' has no member named 'file_size'
error: 'URL_WRONLY' was not declared in this scope
error: 'url_fopen' was not declared in this scope
error: 'url_fclose' was not declared in this scope
error: 'SAMPLE_FMT_U8' was not declared in this scope
error: 'SAMPLE_FMT_S16' was not declared in this scope
error: 'SAMPLE_FMT_S32' was not declared in this scope
error: 'SAMPLE_FMT_FLT' was not declared in this scope
error: 'FF_I_TYPE' was not declared in this scope
Edit:
I am taking a look at these...
http://ffmpeg.org/doxygen/0.8/deprecated.html
http://ffmpeg.org/doxygen/0.9/deprecated.html
http://ffmpeg.org/doxygen/1.0/deprecated.html
http://ffmpeg.org/doxygen/1.1/deprecated.html
http://ffmpeg.org/doxygen/1.2/deprecated.html
http://ffmpeg.org/doxygen/trunk/deprecated.html
As Gabi points out, that URL has most of the replacements of the deprecated constants.
However, it lacks a few of them, so I'll post all the changes that your output indicates are necessary to get through this compilation step:
It's probably worth noting here that av_set_parameters was deprecated and completely scrapped, so you should specify parameters in the call to avformat_open_input now.
That should cover all of your actual errors. If there's just a warning, then take some time to figure out what they're phasing in!
Take a look here.
Hope the above is enough to get you started.
In case the link doesn't survive, here is the full text transcript: