現在、プログラムで使用されているffmpegのバージョンをアップグレードしようとしています。これまで使用してきたものはffmpeg 0.8であり、最新バージョンは1.2であったため、ジャンプが大きくなりました。ffmpegをアップグレードする際のffmpegライブラリインターフェイスの処理
私はこれらのテストで、私が見つけた素晴らしいパッケージを使っています。here。
まず最初に、私はffmpeg 1.2をダウンロードしてビルドしようとしましたが、もちろん、関数と変数については多くの警告とエラーがありました。
移行をスムーズにするために、私はffmpeg 1.0(0.8に関して最も近い上位バージョン)に対してビルドを試みました。私は以下にリストした警告とエラーのリストを得ました。
私の質問は次のとおりです:新しいバージョンの古いffmpegパラダイム/ファンクションコールを変換するためのガイドです。私が書いていない多くのコードについては、1行ずつ分析したくないので、古い関数呼び出しの1対1変換を行うことができれば幸いです新しい関数呼び出しにも、変数に対しても同じです。ここで
警告とエラーのリストが(エラー/警告ごとに1つだけのエントリがあるので、私はそれをきれいにしている)である
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
編集:
私は外観を取っていますこれらの...
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
[APIchanges](http://git.videolan.org/?p=ffmpeg.git;a=blob;f=doc/APIchanges)も参照してください。 – LordNeckbeard