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;
45 int original_ch,
int profile = 0) :
72 return QString(
"id(%1) %2Hz %3ch %4bps %5 (profile %6)")
91 void SetEof(
bool eof)
override;
96 void Reset(
bool reset_video_data,
bool seek_reset,
97 bool reset_file)
override;
118 void AddTextData(
unsigned char *buf,
int len, int64_t timecode,
char type);
130 bool DoRewind(
long long desiredFrame,
bool discardFrames =
true)
override;
131 bool DoFastForward(
long long desiredFrame,
bool discardFrames =
true)
override;
136 virtual std::chrono::milliseconds
NormalizeVideoTimecode(AVStream *st, std::chrono::milliseconds timecode);
140 QString
GetXDS(
const QString &Key)
const override;
170 const std::vector<int>&fs,
171 enum AVCodecID codecId = AV_CODEC_ID_NONE,
179 bool selectedStream =
false);
198 void SeekReset(
long long newkey,
uint skipFrames,
bool doFlush,
bool discardFrames)
override;
201 bool DoPassThrough(
const AVCodecParameters *par,
bool withProfile=
true);
208 void HandleGopStart(AVPacket *pkt,
bool can_reliably_parse_keyframes);
212 float GetVideoFrameRate(AVStream *Stream, AVCodecContext *Context,
bool Sanitise =
false);
214 bool OpenAVCodec(AVCodecContext *avctx,
const AVCodec *codec);
223 int DecodeAudio(AVCodecContext *ctx, uint8_t *buffer,
int &data_size,
226 virtual int ReadPacket(AVFormatContext *ctx, AVPacket *pkt,
bool &storePacket);
236 bool do_av_seek(
long long desiredFrame,
bool discardFrames,
int flags);
242 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)