|
vdr-plugin-softhddevice-drm-gles 1.6.2
|
FFMpeg Video Decoder Frontend. More...
Classes | |
| class | cVideoDecoder |
| Video Decoder. More... | |
FFMpeg Video Decoder Frontend.
Video Decoder.
Close video decoder.
Definition at line 314 of file codec_video.cpp.
References L_CODEC, LOGDEBUG2, cVideoDecoder::m_cntFramesReceived, cVideoDecoder::m_cntPacketsSent, cVideoDecoder::m_identifier, cVideoDecoder::m_lastCodedHeight, cVideoDecoder::m_lastCodedWidth, cVideoDecoder::m_mutex, and cVideoDecoder::m_pVideoCtx.
Referenced by cVideoStream::CloseDecoder(), cVideoStream::Exit(), and cVideoDecoder::ReopenCodec().
Create a new video decoder.
| hardwareQuirks | hardware specific quirks for decoder |
| identifier | string to identify decoder for video or pip stream (used within logging only) |
Definition at line 145 of file codec_video.cpp.
References cSoftHdLogger::LogFFmpegCallback().
|
static |
Find a hardware based video decoder config.
| codec | codec for which we should find a hw config |
Definition at line 84 of file codec_video.cpp.
Referenced by FindHWDecoder(), and cVideoDecoder::Open().
Find a suitable video codec (hardware decoding)
| codecId | video codec id |
Definition at line 107 of file codec_video.cpp.
References FindHWConfig().
Referenced by cVideoDecoder::Open().
Find a suitable video codec (software decoding)
| codecId | video codec id |
Definition at line 133 of file codec_video.cpp.
Referenced by cVideoDecoder::Open().
Flush the video decoder buffers.
Also reset packet sent/ frame received counter
Definition at line 572 of file codec_video.cpp.
References L_CODEC, LOGDEBUG2, cVideoDecoder::m_cntFramesReceived, cVideoDecoder::m_cntPacketsSent, cVideoDecoder::m_identifier, cVideoDecoder::m_mutex, and cVideoDecoder::m_pVideoCtx.
Referenced by cVideoStream::FlushDecoder().
Get extradata from avpkt.
| avpkt | video packet |
| 0 | extradata set |
| -1 | something went wrong |
Definition at line 336 of file codec_video.cpp.
References LOGERROR, cVideoDecoder::m_identifier, and cVideoDecoder::m_pVideoCtx.
Referenced by cVideoDecoder::SendPacket().
|
static |
Callback to negotiate the PixelFormat.
| videoCtx | video codec context |
| fmt | the list of formats which are supported by the codec, it is terminated by -1 as 0 is a valid format, the formats are ordered by quality |
Definition at line 55 of file codec_video.cpp.
References L_CODEC, LOGDEBUG2, and LOGWARNING.
Referenced by cVideoDecoder::Open().
Check, if this is a key frame.
| frame | AVFrame |
Definition at line 589 of file codec_video.cpp.
Referenced by cVideoDecoder::ReceiveFrame().
| int cVideoDecoder::Open | ( | enum AVCodecID | codecId, |
| AVCodecParameters * | par, | ||
| AVRational | timebase, | ||
| bool | forceSoftwareDecoder, | ||
| int | width, | ||
| int | height | ||
| ) |
Open the video decoder.
| codecId | video codec id |
| par | codec parameters |
| timebase | timebase |
| forceSoftwareDecoder | force software decoding |
| width | force width (only for H264 and if par is not set) |
| height | force height (only for H264 and if par is not set) |
| 0 | decoder successfully opend |
| -1 | opening the decoder failed |
Definition at line 169 of file codec_video.cpp.
References av_err2str, FindHWConfig(), FindHWDecoder(), FindSWDecoder(), GetFormat(), L_CODEC, LOGDEBUG2, LOGERROR, LOGINFO, cVideoDecoder::m_cntFramesReceived, cVideoDecoder::m_cntPacketsSent, cVideoDecoder::m_cntStartKeyFrames, cVideoDecoder::m_hardwareQuirks, cVideoDecoder::m_identifier, cVideoDecoder::m_isHardwareDecoder, cVideoDecoder::m_mutex, cVideoDecoder::m_pCodecString, cVideoDecoder::m_pVideoCtx, cVideoDecoder::Open(), QUIRK_CODEC_DISABLE_H264_HW, and QUIRK_CODEC_DISABLE_MPEG_HW.
Referenced by cVideoDecoder::Open(), cVideoStream::OpenDecoder(), and cVideoDecoder::ReopenCodec().
Receive a decoded a video frame.
| [out] | frame | decoded AVFrame |
| instance | instance name for logging |
| 0 | received frame |
| AVERROR(EAGAIN) | get no frame, send avpkt again |
| AVERROR_EOF | EOF, needs flushing |
| AVERROR(EINVAL) | get no frame, something went wrong |
| ret | return other ffmpeg error |
Definition at line 477 of file codec_video.cpp.
References av_err2str, isInterlacedFrame(), cVideoDecoder::IsKeyFrame(), L_CODEC, L_PACKET, LOGDEBUG2, LOGFATAL, cVideoDecoder::m_cntFramesReceived, cVideoDecoder::m_cntPacketsSent, cVideoDecoder::m_cntStartKeyFrames, cVideoDecoder::m_hardwareQuirks, cVideoDecoder::m_identifier, cVideoDecoder::m_mutex, cVideoDecoder::m_pVideoCtx, QUIRK_CODEC_SKIP_FIRST_FRAMES, QUIRK_CODEC_SKIP_NUM_FRAMES, and Timestamp2String().
Referenced by cVideoStream::DecodeInput().
| int cVideoDecoder::ReopenCodec | ( | enum AVCodecID | codecId, |
| AVCodecParameters * | par, | ||
| AVRational | timebase, | ||
| int | forceSoftwareDecoding | ||
| ) |
Reopen the video decoder.
| codecId | video codec id |
| par | codec parameters |
| timebase | timebase |
| forceSoftwareDecoding | force software decoding |
| 0 | success |
| -1 | reopen decoder failed |
Definition at line 554 of file codec_video.cpp.
References cVideoDecoder::Close(), L_CODEC, LOGDEBUG2, cVideoDecoder::m_cntFramesReceived, cVideoDecoder::m_cntPacketsSent, cVideoDecoder::m_cntStartKeyFrames, cVideoDecoder::m_identifier, cVideoDecoder::m_lastCodedHeight, cVideoDecoder::m_lastCodedWidth, cVideoDecoder::m_pVideoCtx, and cVideoDecoder::Open().
Referenced by cVideoStream::DecodeInput(), and cVideoStream::FlushDecoder().
Send a video packet to be decoded.
| avpkt | video packet |
| 0 | packet was sent |
| AVERROR(EAGAIN) | packet was not accepted, first receive frame and send packet again |
| AVERROR(EINVAL) | invalid input or missing m_pVideoCtx |
| ret | other ffmpeg error |
Definition at line 422 of file codec_video.cpp.
References av_err2str, cVideoDecoder::GetExtraData(), L_CODEC, L_PACKET, LOGDEBUG2, cVideoDecoder::m_cntPacketsSent, cVideoDecoder::m_identifier, cVideoDecoder::m_mutex, cVideoDecoder::m_pVideoCtx, and Timestamp2String().
Referenced by cVideoStream::CheckForcingFrameDecode(), and cVideoStream::DecodeInput().