Go to the documentation of this file.
2 #ifndef AVFORMATDECODER_H_
3 #define AVFORMATDECODER_H_
9 #include "libavcodec/avcodec.h"
10 #include "libavformat/avformat.h"
35 class MythSqlDatabase;
47 int original_ch,
int profile = 0) :
74 return QString(
"id(%1) %2Hz %3ch %4bps %5 (profile %6)")
95 void SetEof(
bool eof)
override;
100 void Reset(
bool reset_video_data,
bool seek_reset,
101 bool reset_file)
override;
118 [[maybe_unused]]
bool storevid,
119 [[maybe_unused]] std::chrono::milliseconds timecodeOffset)
override {}
142 void AddTextData(
unsigned char *buf,
int len, int64_t timecode,
char type);
154 bool DoRewind(
long long desiredFrame,
bool discardFrames =
true)
override;
155 bool DoFastForward(
long long desiredFrame,
bool discardFrames =
true)
override;
160 virtual std::chrono::milliseconds
NormalizeVideoTimecode(AVStream *st, std::chrono::milliseconds timecode);
164 QString
GetXDS(
const QString &Key)
const override;
192 const std::vector<int>&fs,
193 enum AVCodecID codecId = AV_CODEC_ID_NONE,
199 friend int read_avf(URLContext *h, uint8_t *buf,
int buf_size);
200 friend int write_avf(URLContext *h, uint8_t *buf,
int buf_size);
201 friend int64_t
seek_avf(URLContext *h, int64_t offset,
int whence);
208 bool selectedStream =
false);
227 void SeekReset(
long long newkey,
uint skipFrames,
bool doFlush,
bool discardFrames)
override;
230 bool DoPassThrough(
const AVCodecParameters *par,
bool withProfile=
true);
237 void HandleGopStart(AVPacket *pkt,
bool can_reliably_parse_keyframes);
240 bool HasVideo(
const AVFormatContext *ic);
241 float GetVideoFrameRate(AVStream *Stream, AVCodecContext *Context,
bool Sanitise =
false);
243 bool OpenAVCodec(AVCodecContext *avctx,
const AVCodec *codec);
252 int DecodeAudio(AVCodecContext *ctx, uint8_t *buffer,
int &data_size,
255 virtual int ReadPacket(AVFormatContext *ctx, AVPacket *pkt,
bool &storePacket);
263 AVFormatContext *
m_ic {
nullptr};
static int FormatToBits(AudioFormat format)
void use_I_forKeyframes(bool val)
std::vector< StreamInfo > sinfo_vec_t
bool operator==(const AudioInfo &o) const
std::vector< char > TestBufferVec
Holds information on recordings and videos.
This is the interface between an MHEG engine and a MythTV TV object.
AudioInfo(AVCodecID id, AudioFormat fmt, int sr, int ch, bool passthru, int original_ch, int profile=0)