recording: fix ffmpeg5 compat
Include avcodec.h and change AVCodec* and AVOutputFormat* to const. Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
parent
9a325f086e
commit
1e0eea3c08
|
@ -20,6 +20,7 @@ extern "C" {
|
||||||
#define UINT64_C(c) (c ## ULL)
|
#define UINT64_C(c) (c ## ULL)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <libavcodec/avcodec.h>
|
||||||
#include <libavformat/avformat.h>
|
#include <libavformat/avformat.h>
|
||||||
#include <libavutil/avassert.h>
|
#include <libavutil/avassert.h>
|
||||||
#include <libavutil/channel_layout.h>
|
#include <libavutil/channel_layout.h>
|
||||||
|
@ -90,7 +91,7 @@ class MediaRecorder
|
||||||
bool isRecording;
|
bool isRecording;
|
||||||
int sampleRate;
|
int sampleRate;
|
||||||
AVFormatContext *oc;
|
AVFormatContext *oc;
|
||||||
AVOutputFormat *fmt;
|
const AVOutputFormat *fmt;
|
||||||
// pic info
|
// pic info
|
||||||
AVPixelFormat pixfmt;
|
AVPixelFormat pixfmt;
|
||||||
int pixsize, linesize;
|
int pixsize, linesize;
|
||||||
|
@ -98,7 +99,7 @@ class MediaRecorder
|
||||||
struct SwsContext *sws;
|
struct SwsContext *sws;
|
||||||
// stream info
|
// stream info
|
||||||
AVStream *st;
|
AVStream *st;
|
||||||
AVCodec *vcodec;
|
const AVCodec *vcodec;
|
||||||
AVCodecContext *enc;
|
AVCodecContext *enc;
|
||||||
int64_t npts; // for video frame pts
|
int64_t npts; // for video frame pts
|
||||||
AVFrame *frameIn;
|
AVFrame *frameIn;
|
||||||
|
@ -106,7 +107,7 @@ class MediaRecorder
|
||||||
// audio
|
// audio
|
||||||
bool audioOnlyRecording;
|
bool audioOnlyRecording;
|
||||||
struct SwrContext *swr;
|
struct SwrContext *swr;
|
||||||
AVCodec *acodec;
|
const AVCodec *acodec;
|
||||||
AVStream *ast;
|
AVStream *ast;
|
||||||
AVCodecContext *aenc;
|
AVCodecContext *aenc;
|
||||||
int samplesCount; // for audio frame pts generation
|
int samplesCount; // for audio frame pts generation
|
||||||
|
|
Loading…
Reference in New Issue