build with ffmpeg version > 59.0.100

Origin commit data
------------------
Branch: ni/coolstream
Commit: 343c8455b6
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2021-08-28 (Sat, 28 Aug 2021)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2021-08-28 15:22:23 +02:00
committed by vanhofen
parent 7c9840e5f5
commit f8d2330214
6 changed files with 23 additions and 1 deletions

View File

@@ -32,7 +32,11 @@ private:
pthread_mutex_t mutex; pthread_mutex_t mutex;
cList<cDvbSubtitleBitmaps> *bitmaps; cList<cDvbSubtitleBitmaps> *bitmaps;
AVCodecContext * avctx; AVCodecContext * avctx;
AVCodec * avcodec; #if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(59,0,100)
AVCodec *avcodec;
#else
const AVCodec *avcodec;
#endif
int min_x, min_y, max_x, max_y; int min_x, min_y, max_x, max_y;
cTimeMs Timeout; cTimeMs Timeout;
public: public:

View File

@@ -1,3 +1,5 @@
/* /*
Neutrino-GUI - DBoxII-Project Neutrino-GUI - DBoxII-Project
@@ -44,6 +46,7 @@ extern "C" {
#include <libavutil/opt.h> #include <libavutil/opt.h>
#include <libavutil/samplefmt.h> #include <libavutil/samplefmt.h>
#include <libswresample/swresample.h> #include <libswresample/swresample.h>
#include <libavcodec/avcodec.h>
} }
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55, 28, 1) #if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55, 28, 1)
@@ -164,7 +167,11 @@ bool CFfmpegDec::Init(void *_in, const CFile::FileType /*ft*/)
return false; return false;
} }
avc->pb = avioc; avc->pb = avioc;
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(59,0,100)
avc->flags |= AVFMT_FLAG_CUSTOM_IO|AVFMT_FLAG_KEEP_SIDE_DATA; avc->flags |= AVFMT_FLAG_CUSTOM_IO|AVFMT_FLAG_KEEP_SIDE_DATA;
#else
avc->flags |= AVFMT_FLAG_CUSTOM_IO;
#endif
AVInputFormat *input_format = NULL; AVInputFormat *input_format = NULL;

View File

@@ -54,7 +54,11 @@ private:
size_t buffer_size; size_t buffer_size;
unsigned char *buffer; unsigned char *buffer;
AVFormatContext *avc; AVFormatContext *avc;
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(59,0,100)
AVCodec *codec; AVCodec *codec;
#else
const AVCodec *codec;
#endif
AVCodecContext *c; AVCodecContext *c;
AVIOContext *avioc; AVIOContext *avioc;
int best_stream; int best_stream;

View File

@@ -66,6 +66,7 @@
extern "C" { extern "C" {
#include <libavformat/avformat.h> #include <libavformat/avformat.h>
#include <libavcodec/bsf.h>
} }
#if (LIBAVCODEC_VERSION_MAJOR > 55) #if (LIBAVCODEC_VERSION_MAJOR > 55)
@@ -2336,7 +2337,11 @@ bool CStreamRec::Open(CZapitChannel * channel)
#endif #endif
std::string tsfile = std::string(filename) + ".ts"; std::string tsfile = std::string(filename) + ".ts";
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(59,0,100)
AVOutputFormat *ofmt = av_guess_format(NULL, tsfile.c_str(), NULL); AVOutputFormat *ofmt = av_guess_format(NULL, tsfile.c_str(), NULL);
#else
const AVOutputFormat *ofmt = av_guess_format(NULL, tsfile.c_str(), NULL);
#endif
if (ofmt == NULL) { if (ofmt == NULL) {
printf("%s: av_guess_format for [%s] failed!\n", __FUNCTION__, tsfile.c_str()); printf("%s: av_guess_format for [%s] failed!\n", __FUNCTION__, tsfile.c_str());
return false; return false;

View File

@@ -33,6 +33,7 @@
extern "C" { extern "C" {
#include <libavformat/avformat.h> #include <libavformat/avformat.h>
#include <libavcodec/bsf.h>
} }
typedef std::set<int> stream_pids_t; typedef std::set<int> stream_pids_t;

View File

@@ -34,6 +34,7 @@
extern "C" { extern "C" {
#include <libavutil/opt.h> #include <libavutil/opt.h>
#include <libavformat/avformat.h> #include <libavformat/avformat.h>
#include <libavcodec/avcodec.h>
} }
#include <OpenThreads/ScopedLock> #include <OpenThreads/ScopedLock>