vdr-plugin-softhddevice-drm-gles 1.7.3-98a2ef7
cVideoStream Class Reference

Video Input Stream. More...

#include <videostream.h>

Public Member Functions

virtual ~cVideoStream (void)
 
void DecodeInput (void)
 Decodes a reassembled codec packet.
 
bool IsInterlaced (void)
 
void Open (AVCodecID, AVCodecParameters *=nullptr, AVRational={ .num=1,.den=PTSTICKS })
 Open a video codec.
 
void Exit (void)
 Exit video stream.
 
void ClearVdrCoreToDecoderQueue (void)
 Clears all video stream data, which is buffered to be decoded.
 
void FlushDecoder (void)
 Flush the decoder.
 
void CloseDecoder (void)
 Close the decoder.
 
bool PushAvPacket (AVPacket *avpkt)
 Pushes a pre-assembled AVPacket directly to the processing queue.
 
bool Drain (void)
 Drains the video stream by finalizing any pending data.
 
void Stop (void)
 Stop the decoding thread.
 
void Halt (void)
 
void Resume (void)
 
cVideoDecoder * Decoder (void)
 
void StartDecoder ()
 Start the decoder.
 
size_t GetAvPacketsFilled (void)
 
bool IsInputBufferFull (void)
 
bool BuffersEmpty (void)
 Return true, if the input AVPacket, videofilter and drm output buffer queues are empty.
 
enum AVCodecID GetCodecId (void)
 
void ResetTrickSpeedFramesSentCounter (void)
 
bool HasInputPts (void)
 
int64_t GetInputPtsMs (void)
 
void ResetInputPts (void)
 
void GetVideoSize (int *, int *, double *)
 Get video size and aspect ratio.
 
int GetVideoPacketMax (void)
 
void CancelFilterThread (void)
 Stop filter thread.
 
void ResetFilterThreadNeededCheck ()
 
virtual void SetDeinterlacerDeactivated (bool deactivate)
 
bool IsDeinterlacerDeactivated (void)
 
void DisableDeint (bool disable)
 
void SetDecoderFallbackToSwNumPkts (int numPackets)
 

Protected Member Functions

 cVideoStream (cVideoRender *, int, cQueue< cDrmBuffer > *, cSoftHdConfig *, bool, std::function< void(AVFrame *)>)
 Create a video stream.
 
virtual void Action (void)
 Decoding thread loop, which periodically tries to decode input.
 

Private Member Functions

void SendPacket (AVPacket *)
 Send a packet to the decoder.
 
int ReceiveFrame (AVFrame **)
 Receive a decoded frame from the decoder.
 
void RenderFrame (AVFrame *)
 Render a frame.
 
void CheckForcingFrameDecode (void)
 Check, if we need to force the decoder to decode the frame (force a decoder drain)
 
void OpenDecoder (void)
 Open the decoder including an H.264 parsing if needed.
 
bool ParseH264Packet (AVPacket *)
 Parse an H.264 packet and test, if the packet is a P-Slice with invalid backward references.
 
bool PacketDropNeeded (AVPacket *)
 Test if the packet should be dropped and parse it if needed (see cVideoStream::ParseH264())
 
int64_t PtsToMs (int64_t pts)
 

Private Attributes

cSoftHdConfig * m_pConfig
 plugin config
 
cVideoDecoder * m_pDecoder
 video decoder
 
cVideoRender * m_pRender
 video renderer
 
const char * m_identifier
 identifier string for logging
 
std::function< void(AVFrame *)> m_frameOutput
 function to output the frame
 
cQueue< cDrmBuffer > * m_pDrmBufferQueue
 pointer to renderer's DRM buffer queue
 
cVideoFilter m_videoFilter
 pointer to deinterlace/scaling video filter thread
 
std::mutex m_mutex
 mutex for decoding thread control
 
bool m_checkFilterThreadNeeded
 set, if we have to check, if filter thread is needed at start of playback
 
int m_hardwareQuirks
 hardware specific quirks
 
bool m_userDisabledDeinterlacer = false
 set, if the user configured the deinterlace to be disabled
 
bool m_deinterlacerDeactivated
 set, if the deinterlacer should be disabled temporarily (trickspeed, stillpicture, pip)
 
bool m_useDeinterlacer = false
 set, if the deinterlacer is used
 
int m_decoderFallbackToSwNumPkts = 22
 fallback to sw decoder if hw decoder fails after the given number of packets sent
 
cQueue< AVPacket > m_packets {VIDEO_PACKET_MAX}
 AVPackets queue.
 
enum AVCodecID m_codecId = AV_CODEC_ID_NONE
 current codec id
 
AVCodecParameters * m_pPar = nullptr
 current codec parameters
 
std::atomic< struct AVRational > m_timebase
 current codec timebase
 
int m_trickpkts
 how many avpkt does the decoder need in trickspeed mode?
 
int m_sentTrickPkts = 0
 how many avpkt have been sent to the decoder in trickspeed mode?
 
std::atomic< bool > m_newStream = false
 flag for new stream
 
bool m_interlaced
 flag for interlaced stream
 
double m_framerate = 0.0
 current stream framerate
 
int64_t m_inputPts = AV_NOPTS_VALUE
 PTS of the first packet in the input buffer.
 
int64_t m_ptsForFramerateDetection = AV_NOPTS_VALUE
 helper PTS to calculate a framerate at stream start
 
int64_t m_lastDecodedPts = AV_NOPTS_VALUE
 PTS of the latest packet, which was sent to the decoder in order to detect stream discontinuity.
 
std::vector< std::string > m_naluTypesAtStart
 array of strings to log the H.264 frames at stream start
 
int m_numIFrames = 0
 counter for the arriving I-Frames at H.264 stream start
 
int m_logPackets = 0
 parse and log all frames until the number of given I-Frames arrived
 
int m_dropInvalidPackets = 0
 drop P-Frames with invalid references until the given number of I-Frames arrived
 
std::set< int > m_dpbFrames
 private set of reference frames (internal short-time decoded picture buffer)
 
int m_maxFrameNum = 1
 = 1 << Log2MaxFrameNumMinus4 + 4
 
int m_log2MaxFrameNumMinus4 = -4
 cache Log2MaxFrameNumMinus4 from a previous SPS parsing
 
int m_ppsNumRefIdxL0DefaultActiveMinus1 = -1
 cache NumRefIdxL0DefaultActiveMinuns1 from a previous PPS parsing
 
int m_ppsNumRefIdxL1DefaultActiveMinus1 = -1
 cache NumRefIdxL1DefaultActiveMinuns1 from a previous PPS parsing
 
bool m_isResend = false
 track, if we already tried to send the AVPacket to the decoder if so, skip the parsing
 

Static Private Attributes

static constexpr int VIDEO_PACKET_MAX = 192
 max number of video packets held in the buffer
 
static constexpr int AV_SYNC_BORDER_MS = 5000
 absolute max a/v difference which should trigger a decoder flush
 

Detailed Description

Video Input Stream.

Definition at line 48 of file videostream.h.

Constructor & Destructor Documentation

◆ ~cVideoStream()

cVideoStream::~cVideoStream ( void  )
virtual

Definition at line 68 of file videostream.cpp.

References LOGDEBUG, and m_identifier.

◆ cVideoStream()

cVideoStream::cVideoStream ( cVideoRender *  render,
int  hardwareQuirks,
cQueue< cDrmBuffer > *  drmBufferQueue,
cSoftHdConfig *  config,
bool  isPipStream,
std::function< void(AVFrame *)>  frameOutput 
)
protected

Member Function Documentation

◆ Action()

void cVideoStream::Action ( void  )
protectedvirtual

Decoding thread loop, which periodically tries to decode input.

Definition at line 501 of file videostream.cpp.

References DecodeInput(), LOGDEBUG, and m_mutex.

◆ BuffersEmpty()

bool cVideoStream::BuffersEmpty ( void  )

Return true, if the input AVPacket, videofilter and drm output buffer queues are empty.

Definition at line 657 of file videostream.cpp.

References cQueue< T >::IsEmpty(), cVideoFilter::IsInputBufferEmpty(), m_packets, m_pRender, m_videoFilter, and cVideoRender::PresentationPending().

Referenced by cSoftHdDevice::Flush().

◆ CancelFilterThread()

◆ CheckForcingFrameDecode()

void cVideoStream::CheckForcingFrameDecode ( void  )
private

Check, if we need to force the decoder to decode the frame (force a decoder drain)

Get the number of packets we need to have in the buffer while in interlaced trickspeed mode, in order to get a decoded frameout of the decoder.

In a normal interlaced h264 stream we need to force decoding after sending 2 packets in backwards trickspeed to get a decoded frame, in an mpeg2 stream 1 packet is enough.

This minPkts magic guarantees, that we don't drain the decoder too early, but exactly after the right amount of packets was sent in trickspeed mode.

Definition at line 199 of file videostream.cpp.

References cVideoRender::IsForwardTrickspeed(), m_interlaced, m_pDecoder, m_pRender, m_sentTrickPkts, m_trickpkts, and cVideoDecoder::SendPacket().

Referenced by SendPacket().

◆ ClearVdrCoreToDecoderQueue()

void cVideoStream::ClearVdrCoreToDecoderQueue ( void  )

Clears all video stream data, which is buffered to be decoded.

Definition at line 125 of file videostream.cpp.

References AV_NOPTS_VALUE, cQueue< T >::IsEmpty(), LOGDEBUG, m_identifier, m_inputPts, m_packets, cQueue< T >::Pop(), and cQueue< T >::Size().

Referenced by cSoftHdDevice::Clear(), cSoftHdDevice::EnterState(), Exit(), and cSoftHdDevice::ResetPipStream().

◆ CloseDecoder()

◆ DecodeInput()

◆ Decoder()

cVideoDecoder * cVideoStream::Decoder ( void  )
inline

Definition at line 69 of file videostream.h.

References m_pDecoder.

◆ DisableDeint()

void cVideoStream::DisableDeint ( bool  disable)
inline

Definition at line 88 of file videostream.h.

References m_userDisabledDeinterlacer.

Referenced by cSoftHdDevice::SetDisableDeint().

◆ Drain()

bool cVideoStream::Drain ( void  )

Drains the video stream by finalizing any pending data.

This function completes processing of any remaining PES fragments in the fragmentation buffer, then pushes a nullptr packet to the queue to signal a flush operation to the decoder.

Definition at line 79 of file videostream.cpp.

References m_packets, and cQueue< T >::Push().

Referenced by cSoftHdDevice::HandleStillPicture().

◆ Exit()

void cVideoStream::Exit ( void  )

Exit video stream.

Definition at line 107 of file videostream.cpp.

References ClearVdrCoreToDecoderQueue(), cVideoDecoder::Close(), LOGDEBUG, m_identifier, m_pDecoder, and Stop().

Referenced by cSoftHdDevice::EnterState().

◆ FlushDecoder()

void cVideoStream::FlushDecoder ( void  )

Flush the decoder.

Some hardware (RPI) needs a reopen workaround (close/open) here, because hardware doesn't do the hardware flush right.

Definition at line 174 of file videostream.cpp.

References AV_NOPTS_VALUE, cVideoDecoder::FlushBuffers(), cVideoDecoder::IsHardwareDecoder(), L_CODEC, LOGDEBUG2, LOGFATAL, m_codecId, m_hardwareQuirks, m_identifier, m_lastDecodedPts, m_pDecoder, m_pPar, m_timebase, QUIRK_CODEC_FLUSH_WORKAROUND, and cVideoDecoder::ReopenCodec().

Referenced by cSoftHdDevice::Clear(), and ReceiveFrame().

◆ GetAvPacketsFilled()

size_t cVideoStream::GetAvPacketsFilled ( void  )
inline

◆ GetCodecId()

enum AVCodecID cVideoStream::GetCodecId ( void  )
inline

Definition at line 74 of file videostream.h.

References m_codecId.

◆ GetInputPtsMs()

int64_t cVideoStream::GetInputPtsMs ( void  )
inline

Definition at line 77 of file videostream.h.

References m_inputPts, and m_timebase.

Referenced by cSoftHdDevice::CheckPlaybackStartConditions().

◆ GetVideoPacketMax()

int cVideoStream::GetVideoPacketMax ( void  )
inline

Definition at line 80 of file videostream.h.

References VIDEO_PACKET_MAX.

Referenced by cSoftHdDevice::PlayVideoPkts().

◆ GetVideoSize()

void cVideoStream::GetVideoSize ( int *  width,
int *  height,
double *  aspect_ratio 
)

Get video size and aspect ratio.

Parameters
[out]widthvideo stream width
[out]heightvideo stream height
[out]aspect_ratiovideo stream aspect ratio (is currently width/ height)

Definition at line 463 of file videostream.cpp.

References cVideoDecoder::GetContext(), and m_pDecoder.

Referenced by cSoftHdDevice::GetVideoSize().

◆ Halt()

void cVideoStream::Halt ( void  )
inline

◆ HasInputPts()

◆ IsDeinterlacerDeactivated()

bool cVideoStream::IsDeinterlacerDeactivated ( void  )
inline

Definition at line 87 of file videostream.h.

References m_deinterlacerDeactivated.

◆ IsInputBufferFull()

bool cVideoStream::IsInputBufferFull ( void  )
inline

Definition at line 72 of file videostream.h.

References m_packets, cQueue< T >::Size(), and VIDEO_PACKET_MAX.

Referenced by cSoftHdDevice::PlayPipVideo(), and cSoftHdDevice::Poll().

◆ IsInterlaced()

bool cVideoStream::IsInterlaced ( void  )
inline

Definition at line 53 of file videostream.h.

◆ Open()

void cVideoStream::Open ( AVCodecID  codecId,
AVCodecParameters *  par = nullptr,
AVRational  timebase = { .num = 1, .den = PTSTICKS } 
)

Open a video codec.

Parameters
codecIdvideo codec id
parvideo codec parameters
timebasetimebase

Definition at line 485 of file videostream.cpp.

References m_codecId, m_newStream, m_pPar, m_timebase, and m_trickpkts.

Referenced by cSoftHdDevice::SetVideoCodec().

◆ OpenDecoder()

◆ PacketDropNeeded()

bool cVideoStream::PacketDropNeeded ( AVPacket *  avpkt)
private

Test if the packet should be dropped and parse it if needed (see cVideoStream::ParseH264())

Parameters
avpktAVPacket to test
Returns
true, if the packet should be dropped, false otherwise

Definition at line 319 of file videostream.cpp.

References LOGDEBUG, m_codecId, m_dropInvalidPackets, m_identifier, m_isResend, m_logPackets, m_naluTypesAtStart, m_numIFrames, and ParseH264Packet().

Referenced by SendPacket().

◆ ParseH264Packet()

bool cVideoStream::ParseH264Packet ( AVPacket *  avpkt)
private

Parse an H.264 packet and test, if the packet is a P-Slice with invalid backward references.

Parameters
avpktAVPacket to parse
Returns
true, if
  • the packet is a P-Slice and
  • the packet has invalid backward references and
  • dropping P-Slices is configured in the setup.conf and
  • the P-Slice arrived before the number of configured I-Frames false, otherwise

Definition at line 239 of file videostream.cpp.

References L_CODEC, LOGDEBUG2, m_dpbFrames, m_dropInvalidPackets, m_identifier, m_log2MaxFrameNumMinus4, m_maxFrameNum, m_naluTypesAtStart, m_numIFrames, m_ppsNumRefIdxL0DefaultActiveMinus1, and m_ppsNumRefIdxL1DefaultActiveMinus1.

Referenced by PacketDropNeeded().

◆ PtsToMs()

int64_t cVideoStream::PtsToMs ( int64_t  pts)
inlineprivate

Definition at line 149 of file videostream.h.

References m_timebase.

Referenced by SendPacket().

◆ PushAvPacket()

bool cVideoStream::PushAvPacket ( AVPacket *  avpkt)

Pushes a pre-assembled AVPacket directly to the processing queue.

This function bypasses the PES fragmentation/reassembly mechanism and directly pushes an already-complete AVPacket to the m_packets queue for decoding. Used when packets are received from sources that don't require fragmentation handling.

Parameters
avpktThe AVPacket to push to the queue
Returns
true if the packet was successfully pushed, false otherwise

Definition at line 94 of file videostream.cpp.

References AV_NOPTS_VALUE, L_PACKET, LOGDEBUG2, m_inputPts, m_packets, cQueue< T >::Push(), and Timestamp2StringPts().

Referenced by cSoftHdDevice::HandleStillPicture(), and cSoftHdDevice::PlayVideoPkts().

◆ ReceiveFrame()

int cVideoStream::ReceiveFrame ( AVFrame **  frame)
private

Receive a decoded frame from the decoder.

Parameters
[out]frameDecoded AVFrame
Returns
0 if frame was decoded, an AVERROR otherwise

Definition at line 403 of file videostream.cpp.

References FlushDecoder(), m_pDecoder, m_sentTrickPkts, and cVideoDecoder::ReceiveFrame().

Referenced by DecodeInput().

◆ RenderFrame()

◆ ResetFilterThreadNeededCheck()

void cVideoStream::ResetFilterThreadNeededCheck ( )
inline

◆ ResetInputPts()

void cVideoStream::ResetInputPts ( void  )
inline

Definition at line 78 of file videostream.h.

References AV_NOPTS_VALUE, and m_inputPts.

Referenced by cSoftHdDevice::HandleStillPicture().

◆ ResetTrickSpeedFramesSentCounter()

void cVideoStream::ResetTrickSpeedFramesSentCounter ( void  )
inline

Definition at line 75 of file videostream.h.

References m_sentTrickPkts.

Referenced by cSoftHdDevice::LeaveState().

◆ Resume()

void cVideoStream::Resume ( void  )
inline

◆ SendPacket()

void cVideoStream::SendPacket ( AVPacket *  avpkt)
private

Send a packet to the decoder.

Parameters
avpktAVPacket to be decoded (can be a nullptr from cVideoStream::Flush())
Note
We may not dereference avpkt without nullptr-check!

Definition at line 347 of file videostream.cpp.

References AV_NOPTS_VALUE, AV_SYNC_BORDER_MS, CheckForcingFrameDecode(), cVideoRender::IsTrickSpeed(), L_CODEC, LOGDEBUG2, m_isResend, m_lastDecodedPts, m_packets, m_pDecoder, m_pRender, PacketDropNeeded(), cQueue< T >::Pop(), PtsToMs(), cVideoDecoder::SendPacket(), and Timestamp2StringPts().

Referenced by DecodeInput().

◆ SetDecoderFallbackToSwNumPkts()

void cVideoStream::SetDecoderFallbackToSwNumPkts ( int  numPackets)
inline

Definition at line 89 of file videostream.h.

References m_decoderFallbackToSwNumPkts.

Referenced by cSoftHdDevice::SetDecoderFallbackToSw().

◆ SetDeinterlacerDeactivated()

virtual void cVideoStream::SetDeinterlacerDeactivated ( bool  deactivate)
inlinevirtual

◆ StartDecoder()

void cVideoStream::StartDecoder ( )

Start the decoder.

Definition at line 140 of file videostream.cpp.

References L_CODEC, LOGDEBUG2, m_identifier, and m_pDecoder.

Referenced by cSoftHdDevice::LeaveState().

◆ Stop()

void cVideoStream::Stop ( void  )

Stop the decoding thread.

Definition at line 519 of file videostream.cpp.

References LOGDEBUG.

Referenced by Exit().

Member Data Documentation

◆ AV_SYNC_BORDER_MS

constexpr int cVideoStream::AV_SYNC_BORDER_MS = 5000
staticconstexprprivate

absolute max a/v difference which should trigger a decoder flush

Definition at line 114 of file videostream.h.

Referenced by SendPacket().

◆ m_checkFilterThreadNeeded

bool cVideoStream::m_checkFilterThreadNeeded
private

set, if we have to check, if filter thread is needed at start of playback

Definition at line 105 of file videostream.h.

Referenced by CancelFilterThread(), RenderFrame(), and ResetFilterThreadNeededCheck().

◆ m_codecId

enum AVCodecID cVideoStream::m_codecId = AV_CODEC_ID_NONE
private

current codec id

Definition at line 116 of file videostream.h.

Referenced by CloseDecoder(), DecodeInput(), FlushDecoder(), GetCodecId(), Open(), OpenDecoder(), and PacketDropNeeded().

◆ m_decoderFallbackToSwNumPkts

int cVideoStream::m_decoderFallbackToSwNumPkts = 22
private

fallback to sw decoder if hw decoder fails after the given number of packets sent

Definition at line 110 of file videostream.h.

Referenced by cVideoStream(), DecodeInput(), and SetDecoderFallbackToSwNumPkts().

◆ m_deinterlacerDeactivated

bool cVideoStream::m_deinterlacerDeactivated
private

set, if the deinterlacer should be disabled temporarily (trickspeed, stillpicture, pip)

Definition at line 108 of file videostream.h.

Referenced by IsDeinterlacerDeactivated(), RenderFrame(), and SetDeinterlacerDeactivated().

◆ m_dpbFrames

std::set<int> cVideoStream::m_dpbFrames
private

private set of reference frames (internal short-time decoded picture buffer)

Definition at line 134 of file videostream.h.

Referenced by CloseDecoder(), and ParseH264Packet().

◆ m_dropInvalidPackets

int cVideoStream::m_dropInvalidPackets = 0
private

drop P-Frames with invalid references until the given number of I-Frames arrived

Definition at line 133 of file videostream.h.

Referenced by OpenDecoder(), PacketDropNeeded(), and ParseH264Packet().

◆ m_frameOutput

std::function<void(AVFrame *)> cVideoStream::m_frameOutput
private

function to output the frame

Definition at line 100 of file videostream.h.

Referenced by RenderFrame().

◆ m_framerate

double cVideoStream::m_framerate = 0.0
private

current stream framerate

Definition at line 123 of file videostream.h.

Referenced by CloseDecoder(), and RenderFrame().

◆ m_hardwareQuirks

int cVideoStream::m_hardwareQuirks
private

hardware specific quirks

Definition at line 106 of file videostream.h.

Referenced by FlushDecoder().

◆ m_identifier

const char* cVideoStream::m_identifier
private

◆ m_inputPts

int64_t cVideoStream::m_inputPts = AV_NOPTS_VALUE
private

PTS of the first packet in the input buffer.

Definition at line 125 of file videostream.h.

Referenced by ClearVdrCoreToDecoderQueue(), GetInputPtsMs(), HasInputPts(), PushAvPacket(), and ResetInputPts().

◆ m_interlaced

bool cVideoStream::m_interlaced
private

flag for interlaced stream

Definition at line 122 of file videostream.h.

Referenced by CheckForcingFrameDecode(), and RenderFrame().

◆ m_isResend

bool cVideoStream::m_isResend = false
private

track, if we already tried to send the AVPacket to the decoder if so, skip the parsing

Definition at line 139 of file videostream.h.

Referenced by PacketDropNeeded(), and SendPacket().

◆ m_lastDecodedPts

int64_t cVideoStream::m_lastDecodedPts = AV_NOPTS_VALUE
private

PTS of the latest packet, which was sent to the decoder in order to detect stream discontinuity.

Definition at line 127 of file videostream.h.

Referenced by CloseDecoder(), FlushDecoder(), and SendPacket().

◆ m_log2MaxFrameNumMinus4

int cVideoStream::m_log2MaxFrameNumMinus4 = -4
private

cache Log2MaxFrameNumMinus4 from a previous SPS parsing

Definition at line 136 of file videostream.h.

Referenced by ParseH264Packet().

◆ m_logPackets

int cVideoStream::m_logPackets = 0
private

parse and log all frames until the number of given I-Frames arrived

Definition at line 132 of file videostream.h.

Referenced by OpenDecoder(), and PacketDropNeeded().

◆ m_maxFrameNum

int cVideoStream::m_maxFrameNum = 1
private

= 1 << Log2MaxFrameNumMinus4 + 4

Definition at line 135 of file videostream.h.

Referenced by CloseDecoder(), and ParseH264Packet().

◆ m_mutex

std::mutex cVideoStream::m_mutex
private

mutex for decoding thread control

Definition at line 103 of file videostream.h.

Referenced by Action(), Halt(), and Resume().

◆ m_naluTypesAtStart

std::vector<std::string> cVideoStream::m_naluTypesAtStart
private

array of strings to log the H.264 frames at stream start

Definition at line 130 of file videostream.h.

Referenced by CloseDecoder(), PacketDropNeeded(), and ParseH264Packet().

◆ m_newStream

std::atomic<bool> cVideoStream::m_newStream = false
private

flag for new stream

Definition at line 121 of file videostream.h.

Referenced by DecodeInput(), Open(), and OpenDecoder().

◆ m_numIFrames

int cVideoStream::m_numIFrames = 0
private

counter for the arriving I-Frames at H.264 stream start

Definition at line 131 of file videostream.h.

Referenced by CloseDecoder(), PacketDropNeeded(), and ParseH264Packet().

◆ m_packets

cQueue<AVPacket> cVideoStream::m_packets {VIDEO_PACKET_MAX}
private

◆ m_pConfig

cSoftHdConfig* cVideoStream::m_pConfig
private

plugin config

Definition at line 96 of file videostream.h.

Referenced by DecodeInput(), OpenDecoder(), and RenderFrame().

◆ m_pDecoder

◆ m_pDrmBufferQueue

cQueue<cDrmBuffer>* cVideoStream::m_pDrmBufferQueue
private

pointer to renderer's DRM buffer queue

Definition at line 101 of file videostream.h.

Referenced by DecodeInput().

◆ m_pPar

AVCodecParameters* cVideoStream::m_pPar = nullptr
private

current codec parameters

Definition at line 117 of file videostream.h.

Referenced by CloseDecoder(), DecodeInput(), FlushDecoder(), Open(), and OpenDecoder().

◆ m_ppsNumRefIdxL0DefaultActiveMinus1

int cVideoStream::m_ppsNumRefIdxL0DefaultActiveMinus1 = -1
private

cache NumRefIdxL0DefaultActiveMinuns1 from a previous PPS parsing

Definition at line 137 of file videostream.h.

Referenced by ParseH264Packet().

◆ m_ppsNumRefIdxL1DefaultActiveMinus1

int cVideoStream::m_ppsNumRefIdxL1DefaultActiveMinus1 = -1
private

cache NumRefIdxL1DefaultActiveMinuns1 from a previous PPS parsing

Definition at line 138 of file videostream.h.

Referenced by ParseH264Packet().

◆ m_pRender

cVideoRender* cVideoStream::m_pRender
private

video renderer

Definition at line 98 of file videostream.h.

Referenced by BuffersEmpty(), CheckForcingFrameDecode(), RenderFrame(), and SendPacket().

◆ m_ptsForFramerateDetection

int64_t cVideoStream::m_ptsForFramerateDetection = AV_NOPTS_VALUE
private

helper PTS to calculate a framerate at stream start

Definition at line 126 of file videostream.h.

Referenced by CloseDecoder(), and RenderFrame().

◆ m_sentTrickPkts

int cVideoStream::m_sentTrickPkts = 0
private

how many avpkt have been sent to the decoder in trickspeed mode?

Definition at line 120 of file videostream.h.

Referenced by CheckForcingFrameDecode(), ReceiveFrame(), and ResetTrickSpeedFramesSentCounter().

◆ m_timebase

std::atomic<struct AVRational> cVideoStream::m_timebase
private

current codec timebase

Definition at line 118 of file videostream.h.

Referenced by DecodeInput(), FlushDecoder(), GetInputPtsMs(), Open(), OpenDecoder(), PtsToMs(), and RenderFrame().

◆ m_trickpkts

int cVideoStream::m_trickpkts
private

how many avpkt does the decoder need in trickspeed mode?

Definition at line 119 of file videostream.h.

Referenced by CheckForcingFrameDecode(), and Open().

◆ m_useDeinterlacer

bool cVideoStream::m_useDeinterlacer = false
private

set, if the deinterlacer is used

Definition at line 109 of file videostream.h.

Referenced by CancelFilterThread(), RenderFrame(), and ResetFilterThreadNeededCheck().

◆ m_userDisabledDeinterlacer

bool cVideoStream::m_userDisabledDeinterlacer = false
private

set, if the user configured the deinterlace to be disabled

Definition at line 107 of file videostream.h.

Referenced by DisableDeint(), and RenderFrame().

◆ m_videoFilter

cVideoFilter cVideoStream::m_videoFilter
private

pointer to deinterlace/scaling video filter thread

Definition at line 102 of file videostream.h.

Referenced by BuffersEmpty(), CancelFilterThread(), DecodeInput(), and RenderFrame().

◆ VIDEO_PACKET_MAX

constexpr int cVideoStream::VIDEO_PACKET_MAX = 192
staticconstexprprivate

max number of video packets held in the buffer

Definition at line 112 of file videostream.h.

Referenced by GetVideoPacketMax(), and IsInputBufferFull().


The documentation for this class was generated from the following files: