21#ifndef __VIDEOSTREAM_H
22#define __VIDEOSTREAM_H
29#include <libavfilter/avfilter.h>
30#include <libavcodec/avcodec.h>
31#include <libavutil/avutil.h>
41#define VIDEO_BUFFER_SIZE (512 * 1024)
42#define VIDEO_PACKET_MAX 192
59 void Open(AVCodecID, AVCodecParameters * =
nullptr, AVRational = { .num = 1, .den = 90000 });
size_t Size(void)
Get the current size of the queue.
cVideoDecoder - VideoDecoder class
cVideoRender - Video render class
cVideoStream - Video stream class
cDecodingThread * m_pDecodingThread
pointer to decoding thread
bool m_interlaced
flag for interlaced stream
void GetVideoSize(int *, int *, double *)
Get video size and aspect ratio.
cFilterThread * m_pFilterThread
pointer to deinterlace filter thread
void SetDeinterlacerDeactivated(bool deactivate)
std::function< void(AVFrame *)> m_frameOutput
function to output the frame
const char * m_identifier
identifier string for logging
int64_t m_inputPts
PTS of the first packet in the input buffer.
bool m_deinterlacerDeactivated
set, if the deinterlacer shall be deactivated temporarily (used for trick speed and still picture)
int m_sentTrickPkts
how many avpkt have been sent to the decoder in trickspeed mode?
std::string m_decodingThreadName
decoding thread name string (persists for object lifetime)
void Flush(void)
Flushes the video stream by finalizing any pending data.
void StartDecoder()
Start the decoder.
void DecodingThreadResume(void)
cVideoDecoder * Decoder(void)
void ClearVdrCoreToDecoderQueue(void)
Clears all video stream data, which is buffered to be decoded.
bool m_userDisabledDeinterlacer
set, if the user configured the deinterlace to be disabled
volatile bool m_newStream
flag for new stream
enum AVCodecID m_codecId
current codec id
bool m_checkFilterThreadNeeded
set, if we have to check, if filter thread is needed at start of playback
size_t GetAvPacketsFilled(void)
AVCodecParameters * m_pPar
current codec parameters
void DecodeInput(void)
Decodes a reassembled codec packet.
cQueue< cDrmBuffer > * m_pDrmBufferQueue
pointer to renderer's DRM buffer queue
void DisableDeint(bool disable)
cVideoStream(cVideoRender *, cQueue< cDrmBuffer > *, cSoftHdConfig *, const char *, std::function< void(AVFrame *)>)
cVideoStream constructor
bool IsDeinterlacerDeactivated(void)
void CloseDecoder(void)
Close the decoder.
int m_hardwareQuirks
hardware specific quirks
cVideoDecoder * m_pDecoder
video decoder
void Exit(void)
Exit video stream.
virtual ~cVideoStream(void)
cVideoStream destructor
void CancelFilterThread(void)
Stop filter thread.
void DecodingThreadHalt(void)
cVideoRender * m_pRender
video renderer
int m_trickpkts
how many avpkt does the decoder need in trickspeed mode?
void RenderFrame(AVFrame *)
Render a frame.
cQueue< AVPacket > m_packets
AVPackets queue.
void ExitDecodingThread(void)
Stop decoding thread.
void FlushDecoder(void)
Flush the decoder.
void Open(AVCodecID, AVCodecParameters *=nullptr, AVRational={ .num=1,.den=90000 })
Open a video codec.
bool PushAvPacket(AVPacket *avpkt)
Pushes a pre-assembled AVPacket directly to the processing queue.
bool IsInputBufferFull(void)
int64_t GetInputPts(void)
void ResetFilterThreadNeededCheck()
int64_t GetInputPtsMs(void)
std::string m_filterThreadName
filter thread name string (persists for object lifetime)
void ResetTrickSpeedFramesSentCounter(void)
enum AVCodecID GetCodecId(void)
std::atomic< struct AVRational > m_timebase
current codec timebase
Video decoder header file.
PES packet parser header.
Thread-safe queue header file.
Thread classes header file.
Rendering class header file.
#define VIDEO_PACKET_MAX
max number of video packets held in the buffer