vdr-plugin-softhddevice-drm-gles 1.5.9-20e15de
codec_video.cpp File Reference

Video decoder class. More...

#include <libavcodec/avcodec.h>
#include <libavcodec/bsf.h>
#include <libavutil/pixdesc.h>
#include <vdr/thread.h>
#include "codec_video.h"
#include "logger.h"
#include "misc.h"
#include "videostream.h"

Go to the source code of this file.

Functions

static enum AVPixelFormat GetFormat (AVCodecContext *videoCtx, const enum AVPixelFormat *fmt)
 Callback to negotiate the PixelFormat.
 
static const AVCodecHWConfig * FindHWConfig (const AVCodec *codec)
 Find a hardware based video decoder config.
 
static const AVCodec * FindHWDecoder (enum AVCodecID codecId)
 Find a suitable video codec (hardware decoding)
 
static const AVCodec * FindSWDecoder (enum AVCodecID codecId)
 Find a suitable video codec (software decoding)
 

Detailed Description

Video decoder class.

This file defines cVideoDecoder, which has all the functions to decode video data. It's the video interface to ffmpeg.

Definition in file codec_video.cpp.

Function Documentation

◆ FindHWConfig()

static const AVCodecHWConfig * FindHWConfig ( const AVCodec *  codec)
static

Find a hardware based video decoder config.

Parameters
codeccodec for which we should find a hw config
Returns
AVCodecHWConfig if found, NULL otherwise

Definition at line 83 of file codec_video.cpp.

Referenced by FindHWDecoder(), and cVideoDecoder::Open().

◆ FindHWDecoder()

static const AVCodec * FindHWDecoder ( enum AVCodecID  codecId)
static

Find a suitable video codec (hardware decoding)

Parameters
codecIdvideo codec id
Returns
AVCodec if found, NULL otherwise

Definition at line 107 of file codec_video.cpp.

References FindHWConfig().

Referenced by cVideoDecoder::Open().

◆ FindSWDecoder()

static const AVCodec * FindSWDecoder ( enum AVCodecID  codecId)
static

Find a suitable video codec (software decoding)

Parameters
codecIdvideo codec id
Returns
AVCodec if found, NULL otherwise

Definition at line 134 of file codec_video.cpp.

Referenced by cVideoDecoder::Open().

◆ GetFormat()

static enum AVPixelFormat GetFormat ( AVCodecContext *  videoCtx,
const enum AVPixelFormat *  fmt 
)
static

Callback to negotiate the PixelFormat.

Parameters
videoCtxvideo codec context
fmtthe 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 54 of file codec_video.cpp.

References L_CODEC, LOGDEBUG2, and LOGWARNING.

Referenced by cVideoDecoder::Open().