vdr-plugin-softhddevice-drm-gles 1.4.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
cFilterThread Class Reference

Filter thread class. More...

#include <threads.h>

Collaboration diagram for cFilterThread:
Collaboration graph
[legend]

Public Member Functions

 cFilterThread (cVideoRender *, cQueue< cDrmBuffer > *, const char *, std::function< void(AVFrame *)>)
 
virtual ~cFilterThread (void)
 
void InitAndStart (const AVCodecContext *, AVFrame *, bool)
 Init and start the video filter thread. More...
 
void Stop (void)
 
void PushFrame (AVFrame *)
 Put a frame in the buffer to be filtered. More...
 
bool IsInputBufferFull (void)
 
int GetNumFramesToFilter (void)
 

Private Member Functions

void Action (void)
 

Private Attributes

cVideoRenderm_pRender
 
AVFilterGraph * m_pFilterGraph
 
AVFilterContext * m_pBuffersrcCtx
 
AVFilterContext * m_pBuffersinkCtx
 
bool m_filterBug
 flag for a ffmpeg bug More...
 
cQueue< AVFrame > m_frames {VIDEO_SURFACES_MAX}
 queue for frames to be filtered More...
 
std::function< void(AVFrame *)> m_frameOutput
 function to output the frame More...
 
cQueue< cDrmBuffer > * m_pDrmBufferQueue
 pointer to renderer's DRM buffer queue More...
 
int m_numFramesToFilter = 0
 number of frames to be filtered More...
 

Detailed Description

Filter thread class.

Definition at line 99 of file threads.h.

Constructor & Destructor Documentation

◆ cFilterThread()

cFilterThread::cFilterThread ( cVideoRender videoRender,
cQueue< cDrmBuffer > *  drmBufferQueue,
const char *  name,
std::function< void(AVFrame *)>  frameOutput 
)

Definition at line 167 of file threads.cpp.

References m_frameOutput, m_pDrmBufferQueue, and m_pRender.

◆ ~cFilterThread()

cFilterThread::~cFilterThread ( void  )
virtual

Definition at line 174 of file threads.cpp.

Member Function Documentation

◆ Action()

void cFilterThread::Action ( void  )
private

◆ GetNumFramesToFilter()

int cFilterThread::GetNumFramesToFilter ( void  )
inline

Definition at line 108 of file threads.h.

References m_numFramesToFilter.

Referenced by cVideoStream::RenderFrame().

◆ InitAndStart()

void cFilterThread::InitAndStart ( const AVCodecContext *  videoCtx,
AVFrame *  frame,
bool  enableDeinterlacer 
)

Init and start the video filter thread.

Parameters
videoCtxcodec context
frameAVFrame to take init parameters from
enableDeinterlacertrue, if the deinterlacer should be used

Definition at line 185 of file threads.cpp.

References L_CODEC, LOGDEBUG2, LOGFATAL, m_filterBug, m_numFramesToFilter, m_pBuffersinkCtx, m_pBuffersrcCtx, and m_pFilterGraph.

Referenced by cVideoStream::RenderFrame().

◆ IsInputBufferFull()

bool cFilterThread::IsInputBufferFull ( void  )
inline

Definition at line 107 of file threads.h.

References cQueue< T >::IsFull(), and m_frames.

Referenced by cVideoStream::DecodeInput().

◆ PushFrame()

void cFilterThread::PushFrame ( AVFrame *  frame)

Put a frame in the buffer to be filtered.

Definition at line 344 of file threads.cpp.

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

Referenced by cVideoStream::RenderFrame().

◆ Stop()

void cFilterThread::Stop ( void  )

Member Data Documentation

◆ m_filterBug

bool cFilterThread::m_filterBug
private

flag for a ffmpeg bug

Definition at line 117 of file threads.h.

Referenced by Action(), InitAndStart(), and Stop().

◆ m_frameOutput

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

function to output the frame

Definition at line 119 of file threads.h.

Referenced by Action(), and cFilterThread().

◆ m_frames

cQueue<AVFrame> cFilterThread::m_frames {VIDEO_SURFACES_MAX}
private

queue for frames to be filtered

Definition at line 118 of file threads.h.

Referenced by Action(), IsInputBufferFull(), PushFrame(), and Stop().

◆ m_numFramesToFilter

int cFilterThread::m_numFramesToFilter = 0
private

number of frames to be filtered

Definition at line 121 of file threads.h.

Referenced by Action(), GetNumFramesToFilter(), InitAndStart(), and Stop().

◆ m_pBuffersinkCtx

AVFilterContext* cFilterThread::m_pBuffersinkCtx
private

Definition at line 115 of file threads.h.

Referenced by Action(), and InitAndStart().

◆ m_pBuffersrcCtx

AVFilterContext* cFilterThread::m_pBuffersrcCtx
private

Definition at line 114 of file threads.h.

Referenced by Action(), and InitAndStart().

◆ m_pDrmBufferQueue

cQueue<cDrmBuffer>* cFilterThread::m_pDrmBufferQueue
private

pointer to renderer's DRM buffer queue

Definition at line 120 of file threads.h.

Referenced by Action(), and cFilterThread().

◆ m_pFilterGraph

AVFilterGraph* cFilterThread::m_pFilterGraph
private

Definition at line 113 of file threads.h.

Referenced by InitAndStart(), and Stop().

◆ m_pRender

cVideoRender* cFilterThread::m_pRender
private

Definition at line 111 of file threads.h.

Referenced by cFilterThread().


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