|
vdr-plugin-softhddevice-drm-gles 1.6.4-d0291bb
|
Video Filter. More...
#include <videofilter.h>
Public Member Functions | |
| cVideoFilter (cVideoRender *, cQueue< cDrmBuffer > *, const char *, std::function< void(AVFrame *)>) | |
| Initiate Filter. | |
| void | InitAndStart (const AVCodecContext *, AVFrame *, bool) |
| Init and start the video filter thread. | |
| void | Stop (void) |
| Stops the filter thread and does a cleanup. | |
| void | PushFrame (AVFrame *) |
| Puts a frame in the buffer to be filtered. | |
| bool | IsInputBufferFull (void) |
| int | GetNumFramesToFilter (void) |
Private Member Functions | |
| void | Action (void) |
| Main filter thread loop. | |
| void | SetFilterOutputPixFormat (AVPixelFormat) |
| Setup the filter output pixel format. | |
Private Attributes | |
| cVideoRender * | m_pRender |
| pointer to renderer | |
| AVFilterGraph * | m_pFilterGraph |
| filter graph | |
| AVFilterContext * | m_pBuffersrcCtx |
| buffer src context | |
| AVFilterContext * | m_pBuffersinkCtx |
| buffer sink context | |
| bool | m_filterBug |
| flag for a ffmpeg bug | |
| cQueue< AVFrame > | m_frames {VIDEO_SURFACES_MAX} |
| queue for frames to be filtered | |
| std::function< void(AVFrame *)> | m_frameOutput |
| function to output the frame | |
| cQueue< cDrmBuffer > * | m_pDrmBufferQueue |
| pointer to renderer's DRM buffer queue | |
| int | m_numFramesToFilter = 0 |
| number of frames to be filtered | |
Video Filter.
Definition at line 41 of file videofilter.h.
| cVideoFilter::cVideoFilter | ( | cVideoRender * | videoRender, |
| cQueue< cDrmBuffer > * | drmBufferQueue, | ||
| const char * | name, | ||
| std::function< void(AVFrame *)> | frameOutput | ||
| ) |
Initiate Filter.
| videoRender | renderer |
| drmBufferQueue | drm buffer queue |
| name | stream name |
| frameOutput | frame output function |
Definition at line 36 of file videofilter.cpp.
Main filter thread loop.
Pops unfiltered frames from the input queue, processes them and sends the filtered frames to the render queue
Definition at line 205 of file videofilter.cpp.
References av_err2str, cQueue< T >::IsEmpty(), cQueue< T >::IsFull(), isInterlacedFrame(), LOGDEBUG, LOGERROR, LOGFATAL, LOGWARNING, m_filterBug, m_frameOutput, m_frames, m_numFramesToFilter, m_pBuffersinkCtx, m_pBuffersrcCtx, m_pDrmBufferQueue, and cQueue< T >::Pop().
Definition at line 48 of file videofilter.h.
References m_numFramesToFilter.
Referenced by cVideoStream::RenderFrame().
| void cVideoFilter::InitAndStart | ( | const AVCodecContext * | videoCtx, |
| AVFrame * | frame, | ||
| bool | enableDeinterlacer | ||
| ) |
Init and start the video filter thread.
| videoCtx | codec context |
| frame | AVFrame to take init parameters from |
| enableDeinterlacer | true, if the deinterlacer should be used |
Definition at line 73 of file videofilter.cpp.
References L_CODEC, LOGDEBUG2, LOGFATAL, m_filterBug, m_numFramesToFilter, m_pBuffersinkCtx, m_pBuffersrcCtx, m_pFilterGraph, and SetFilterOutputPixFormat().
Referenced by cVideoStream::RenderFrame().
Definition at line 47 of file videofilter.h.
References cQueue< T >::IsFull(), and m_frames.
Referenced by cVideoStream::DecodeInput().
Puts a frame in the buffer to be filtered.
Definition at line 263 of file videofilter.cpp.
References m_frames, and cQueue< T >::Push().
Referenced by cVideoStream::RenderFrame().
|
private |
Setup the filter output pixel format.
| pixFmt | AV pixel format |
Definition at line 49 of file videofilter.cpp.
References LOGFATAL, and m_pBuffersinkCtx.
Referenced by InitAndStart().
Stops the filter thread and does a cleanup.
Definition at line 271 of file videofilter.cpp.
References cQueue< T >::IsEmpty(), LOGDEBUG, m_filterBug, m_frames, m_numFramesToFilter, m_pFilterGraph, and cQueue< T >::Pop().
Referenced by cVideoStream::CancelFilterThread().
|
private |
flag for a ffmpeg bug
Definition at line 57 of file videofilter.h.
Referenced by Action(), InitAndStart(), and Stop().
|
private |
queue for frames to be filtered
Definition at line 58 of file videofilter.h.
Referenced by Action(), IsInputBufferFull(), PushFrame(), and Stop().
|
private |
number of frames to be filtered
Definition at line 61 of file videofilter.h.
Referenced by Action(), GetNumFramesToFilter(), InitAndStart(), and Stop().
|
private |
buffer sink context
Definition at line 55 of file videofilter.h.
Referenced by Action(), InitAndStart(), and SetFilterOutputPixFormat().
|
private |
buffer src context
Definition at line 54 of file videofilter.h.
Referenced by Action(), and InitAndStart().
|
private |
pointer to renderer's DRM buffer queue
Definition at line 60 of file videofilter.h.
Referenced by Action().
|
private |
|
private |
pointer to renderer
Definition at line 51 of file videofilter.h.