World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
VDPAU Decoder and Renderer
+ Граф связей класса VDPAU Decoder and Renderer:

Файлы

файл  vdpau.h
 

Классы

struct  AVVDPAUContext
 

Определения типов

typedef int(* AVVDPAU_Render2) (struct AVCodecContext *, struct AVFrame *, const VdpPictureInfo *, uint32_t, const VdpBitstreamBuffer *)
 
typedef struct AVVDPAUContext AVVDPAUContext
 

Функции

AVVDPAUContextav_alloc_vdpaucontext (void)
 allocation function for AVVDPAUContext Подробнее...
 
AVVDPAU_Render2 av_vdpau_hwaccel_get_render2 (const AVVDPAUContext *)
 
void av_vdpau_hwaccel_set_render2 (AVVDPAUContext *, AVVDPAU_Render2)
 
int av_vdpau_bind_context (AVCodecContext *avctx, VdpDevice device, VdpGetProcAddress *get_proc_address, unsigned flags)
 
int av_vdpau_get_surface_parameters (AVCodecContext *avctx, VdpChromaType *type, uint32_t *width, uint32_t *height)
 
AVVDPAUContextav_vdpau_alloc_context (void)
 
attribute_deprecated int av_vdpau_get_profile (AVCodecContext *avctx, VdpDecoderProfile *profile)
 

Переменные

VdpDecoder AVVDPAUContext::decoder
 
VdpDecoderRender * AVVDPAUContext::render
 
AVVDPAU_Render2 AVVDPAUContext::render2
 

Подробное описание

VDPAU hardware acceleration has two modules

The VDPAU decoding module parses all headers using FFmpeg parsing mechanisms and uses VDPAU for the actual decoding.

As per the current implementation, the actual decoding and rendering (API calls) are done as part of the VDPAU presentation (vo_vdpau.c) module.

Типы

◆ AVVDPAU_Render2

typedef int(* AVVDPAU_Render2) (struct AVCodecContext *, struct AVFrame *, const VdpPictureInfo *, uint32_t, const VdpBitstreamBuffer *)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/vdpau.h>

См. определение в файле vdpau.h строка 63

◆ AVVDPAUContext

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/vdpau.h>

This structure is used to share data between the libavcodec library and the client video application. The user shall allocate the structure via the av_alloc_vdpau_hwaccel function and make it available as AVCodecContext.hwaccel_context. Members can be set by the user once during initialization or through each AVCodecContext.get_buffer() function call. In any case, they must be valid prior to calling decoding functions.

The size of this structure is not a part of the public ABI and must not be used outside of libavcodec. Use av_vdpau_alloc_context() to allocate an AVVDPAUContext.

Функции

◆ av_alloc_vdpaucontext()

AVVDPAUContext* av_alloc_vdpaucontext ( void  )

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/vdpau.h>

allocation function for AVVDPAUContext

Allows extending the struct without breaking API/ABI

◆ av_vdpau_hwaccel_get_render2()

◆ av_vdpau_hwaccel_set_render2()

◆ av_vdpau_bind_context()

int av_vdpau_bind_context ( AVCodecContext avctx,
VdpDevice  device,
VdpGetProcAddress *  get_proc_address,
unsigned  flags 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/vdpau.h>

Associate a VDPAU device with a codec context for hardware acceleration. This function is meant to be called from the get_format() codec callback, or earlier. It can also be called after avcodec_flush_buffers() to change the underlying VDPAU device mid-stream (e.g. to recover from non-transparent display preemption).

Заметки
get_format() must return AV_PIX_FMT_VDPAU if this function completes successfully.
Аргументы
avctxdecoding context whose get_format() callback is invoked
deviceVDPAU device handle to use for hardware acceleration
get_proc_addressVDPAU device driver
flagszero of more OR'd AV_HWACCEL_FLAG_* flags
Возвращает
0 on success, an AVERROR code on failure.

◆ av_vdpau_get_surface_parameters()

int av_vdpau_get_surface_parameters ( AVCodecContext avctx,
VdpChromaType *  type,
uint32_t width,
uint32_t height 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/vdpau.h>

Gets the parameters to create an adequate VDPAU video surface for the codec context using VDPAU hardware decoding acceleration.

Заметки
Behavior is undefined if the context was not successfully bound to a VDPAU device using av_vdpau_bind_context().
Аргументы
avctxthe codec context being used for decoding the stream
typestorage space for the VDPAU video surface chroma type (or NULL to ignore)
widthstorage space for the VDPAU video surface pixel width (or NULL to ignore)
heightstorage space for the VDPAU video surface pixel height (or NULL to ignore)
Возвращает
0 on success, a negative AVERROR code on failure.

◆ av_vdpau_alloc_context()

AVVDPAUContext* av_vdpau_alloc_context ( void  )

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/vdpau.h>

Allocate an AVVDPAUContext.

Возвращает
Newly-allocated AVVDPAUContext or NULL on failure.

◆ av_vdpau_get_profile()

attribute_deprecated int av_vdpau_get_profile ( AVCodecContext avctx,
VdpDecoderProfile *  profile 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/vdpau.h>

Get a decoder profile that should be used for initializing a VDPAU decoder. Should be called from the AVCodecContext.get_format() callback.

Уст.:
Use av_vdpau_bind_context() instead.
Аргументы
avctxthe codec context being used for decoding the stream
profilea pointer into which the result will be written on success. The contents of profile are undefined if this function returns an error.
Возвращает
0 on success (non-negative), a negative AVERROR on failure.

Переменные

◆ decoder

VdpDecoder AVVDPAUContext::decoder

VDPAU decoder handle

Set by user.

См. определение в файле vdpau.h строка 87

◆ render

VdpDecoderRender* AVVDPAUContext::render

VDPAU decoder render callback

Set by the user.

См. определение в файле vdpau.h строка 94

◆ render2

AVVDPAU_Render2 AVVDPAUContext::render2

См. определение в файле vdpau.h строка 96