movie.cc:27:19: error: no matching function for call to 'av_find_best_stream'
27 | video_stream_ = av_find_best_stream(
| ^~~~~~~~~~~~~~~~~~~
/usr/local/include/libavformat/avformat.h:2259:5: note: candidate function not viable: no known conversion from 'AVCodec **' to 'const struct AVCodec **' for 5th argument
2259 | int av_find_best_stream(AVFormatContext *ic,
| ^
2260 | enum AVMediaType type,
2261 | int wanted_stream_nb,
2262 | int related_stream,
2263 | const struct AVCodec **decoder_ret,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
movie.cc:30:47: error: no member named 'codec' in 'AVStream'
30 | context_ = format_->streams[video_stream_]->codec;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
movie.cc:31:49: error: member access into incomplete type 'AVCodecContext'
31 | LOG(INFO) << "Native dimensions: " << context_->width << "x"
| ^
./movie.h:12:8: note: forward declaration of 'AVCodecContext'
12 | struct AVCodecContext;
| ^
movie.cc:32:24: error: member access into incomplete type 'AVCodecContext'
32 | << context_->height;
| ^
./movie.h:12:8: note: forward declaration of 'AVCodecContext'
12 | struct AVCodecContext;
| ^
movie.cc:33:20: error: member access into incomplete type 'AVCodecContext'
33 | width_ = context_->width;
| ^
./movie.h:12:8: note: forward declaration of 'AVCodecContext'
12 | struct AVCodecContext;
| ^
movie.cc:34:21: error: member access into incomplete type 'AVCodecContext'
34 | height_ = context_->height;
| ^
./movie.h:12:8: note: forward declaration of 'AVCodecContext'
12 | struct AVCodecContext;
| ^
movie.cc:41:19: error: use of undeclared identifier 'avcodec_close'; did you mean 'avio_close'?
41 | if (context_) avcodec_close(context_);
| ^~~~~~~~~~~~~
| avio_close
/usr/local/include/libavformat/avio.h:693:5: note: 'avio_close' declared here
693 | int avio_close(AVIOContext *s);
| ^
movie.cc:41:33: error: cannot initialize a parameter of type 'AVIOContext *' with an lvalue of type 'AVCodecContext *'
41 | if (context_) avcodec_close(context_);
| ^~~~~~~~
./movie.h:12:8: note: 'AVCodecContext' is not defined, but forward declared here; conversion would be valid if it was derived from 'AVIOContext'
12 | struct AVCodecContext;
| ^
/usr/local/include/libavformat/avio.h:693:29: note: passing argument to parameter 's' here
693 | int avio_close(AVIOContext *s);
| ^
movie.cc:55:33: error: member access into incomplete type 'AVCodecContext'
55 | sws_ = sws_getContext(context_->width, context_->height, context_->pix_fmt,
| ^
./movie.h:12:8: note: forward declaration of 'AVCodecContext'
12 | struct AVCodecContext;
| ^
movie.cc:55:50: error: member access into incomplete type 'AVCodecContext'
55 | sws_ = sws_getContext(context_->width, context_->height, context_->pix_fmt,
| ^
./movie.h:12:8: note: forward declaration of 'AVCodecContext'
12 | struct AVCodecContext;
| ^
movie.cc:55:68: error: member access into incomplete type 'AVCodecContext'
55 | sws_ = sws_getContext(context_->width, context_->height, context_->pix_fmt,
| ^
./movie.h:12:8: note: forward declaration of 'AVCodecContext'
12 | struct AVCodecContext;
| ^
movie.cc:58:47: error: member access into incomplete type 'AVCodecContext'
58 | CHECK(codec_ = avcodec_find_decoder(context_->codec_id))
| ^
./movie.h:12:8: note: forward declaration of 'AVCodecContext'
12 | struct AVCodecContext;
| ^
movie.cc:60:12: error: use of undeclared identifier 'avcodec_open2'
60 | CHECK_GE(avcodec_open2(context_, codec_, nullptr), 0)
| ^
movie.cc:66:19: error: use of undeclared identifier 'avpicture_get_size'
66 | int rgb_bytes = avpicture_get_size(AV_PIX_FMT_RGB24, width_, height_);
| ^
movie.cc:69:46: error: unknown type name 'AVPicture'
69 | int prep = avpicture_fill(reinterpret_cast<AVPicture*>(frame_rgb_),
| ^
movie.cc:69:14: error: use of undeclared identifier 'avpicture_fill'
69 | int prep = avpicture_fill(reinterpret_cast<AVPicture*>(frame_rgb_),
| ^
movie.cc:92:7: error: use of undeclared identifier 'avcodec_decode_video2'
92 | avcodec_decode_video2(context_, frame_, &found, &packet);
| ^
movie.cc:94:5: error: use of undeclared identifier 'av_free_packet'; did you mean 'av_init_packet'?
94 | av_free_packet(&packet);
| ^~~~~~~~~~~~~~
| av_init_packet
/usr/local/include/libavcodec/packet.h:683:6: note: 'av_init_packet' declared here
683 | void av_init_packet(AVPacket *pkt);
| ^
movie.cc:94:5: warning: 'av_init_packet' is deprecated [-Wdeprecated-declarations]
94 | av_free_packet(&packet);
| ^
/usr/local/include/libavcodec/packet.h:682:1: note: 'av_init_packet' has been explicitly marked deprecated here
682 | attribute_deprecated
| ^
/usr/local/include/libavutil/attributes.h:100:49: note: expanded from macro 'attribute_deprecated'
100 | # define attribute_deprecated __attribute__((deprecated))
| ^
movie.cc:99:42: error: member access into incomplete type 'AVCodecContext'
99 | frame_->linesize, 0, context_->height,
| ^
./movie.h:12:8: note: forward declaration of 'AVCodecContext'
12 | struct AVCodecContext;
| ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]