Reputation: 29431
I try to follow and adapt this example to convert a video thanks to FFMPEG but some function seems to be missing like :
int avcodec_open ( AVCodecContext * avctx, AVCodec * codec)
When I go in the doc to see where it come from, I find it in the file libavcodec/avcodec.h
which is included in my program #include "libavcodec/avcodec.h"
(in the top of my .h
file).
Given this, I don't understand why Qt throw me this error :
../../Dev/Joker/libs/PhVideo/PhVideoEncoder.cpp:360:6: error: use of undeclared identifier 'avcodec_open'
if (avcodec_open(c, codec) < 0) {
Upvotes: 2
Views: 1041
Reputation: 5110
avcodec_open
was deprecated and replaced with avcodec_open2
in newer versions of FFMPEG.
Refer to latest documentation, here and here
Upvotes: 3