13#ifndef __CODEC_VIDEO_H
14#define __CODEC_VIDEO_H
19#include <libavcodec/avcodec.h>
int ReopenCodec(enum AVCodecID, AVCodecParameters *, AVRational, int)
Reopen the video decoder.
int m_lastCodedHeight
save coded height while closing for a directly reopen
int m_skipKeyFramesNum
number of Keyframes (= I-Frames in VDR) to be skipped at stream start (hardware specific quirk)
bool m_isHardwareDecoder
true, if this is a hardware decoder
AVCodecContext * GetContext(void)
int SendPacket(const AVPacket *)
Send a video packet to be decoded.
int Open(enum AVCodecID, AVCodecParameters *, AVRational, bool, int, int)
Open the video decoder.
int m_cntFramesReceived
number of decoded frames received from decoder
int GetExtraData(const AVPacket *)
Get extradata from avpkt.
void SetSkipKeyFramesNum(int num)
int m_cntStartKeyFrames
number of keyframes arrived while starting the coded (needed for amlogic h264 decoder in order to dro...
bool IsHardwareDecoder(void)
int GetFramesReceived(void)
void FlushBuffers(void)
Flush the video decoder buffers.
std::mutex m_mutex
mutex to lock codec context
AVCodecContext * m_pVideoCtx
video codec context
int m_cntPacketsSent
number of packets sent to decoder
int m_lastCodedWidth
save coded width while closing for a directly reopen
const char * m_pCodecString
codec (long) name string
bool IsKeyFrame(AVFrame *)
Check, if this is a key frame.
const char * m_identifier
identifier for logging
int ReceiveFrame(AVFrame **)
Receive a decoded a video frame.
void Close(void)
Close video decoder.