FFmpeg
|
Files | |
file | vdpau.h |
Data Structures | |
struct | AVVDPAUContext |
This structure is used to share data between the libavcodec library and the client video application. More... | |
Typedefs | |
typedef int(* | AVVDPAU_Render2) (struct AVCodecContext *, struct AVFrame *, const VdpPictureInfo *, uint32_t, const VdpBitstreamBuffer *) |
Functions | |
AVVDPAUContext * | av_alloc_vdpaucontext (void) |
allocation function for AVVDPAUContext More... | |
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) |
Associate a VDPAU device with a codec context for hardware acceleration. More... | |
int | av_vdpau_get_surface_parameters (AVCodecContext *avctx, VdpChromaType *type, uint32_t *width, uint32_t *height) |
Gets the parameters to create an adequate VDPAU video surface for the codec context using VDPAU hardware decoding acceleration. More... | |
AVVDPAUContext * | av_vdpau_alloc_context (void) |
Allocate an AVVDPAUContext. More... | |
attribute_deprecated int | av_vdpau_get_profile (AVCodecContext *avctx, VdpDecoderProfile *profile) |
Get a decoder profile that should be used for initializing a VDPAU decoder. More... | |
Variables | |
VdpDecoder | AVVDPAUContext::decoder |
VDPAU decoder handle. More... | |
VdpDecoderRender * | AVVDPAUContext::render |
VDPAU decoder render callback. More... | |
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.
typedef int(* AVVDPAU_Render2) (struct AVCodecContext *, struct AVFrame *, const VdpPictureInfo *, uint32_t, const VdpBitstreamBuffer *) |
AVVDPAUContext* av_alloc_vdpaucontext | ( | void | ) |
allocation function for AVVDPAUContext
Allows extending the struct without breaking API/ABI
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 | ||
) |
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).
avctx | decoding context whose get_format() callback is invoked |
device | VDPAU device handle to use for hardware acceleration |
get_proc_address | VDPAU device driver |
flags | zero of more OR'd AV_HWACCEL_FLAG_* flags |
int av_vdpau_get_surface_parameters | ( | AVCodecContext * | avctx, |
VdpChromaType * | type, | ||
uint32_t * | width, | ||
uint32_t * | height | ||
) |
Gets the parameters to create an adequate VDPAU video surface for the codec context using VDPAU hardware decoding acceleration.
avctx | the codec context being used for decoding the stream |
type | storage space for the VDPAU video surface chroma type (or NULL to ignore) |
width | storage space for the VDPAU video surface pixel width (or NULL to ignore) |
height | storage space for the VDPAU video surface pixel height (or NULL to ignore) |
Definition at line 74 of file vdpau.c.
Referenced by ff_vdpau_common_frame_params(), and ff_vdpau_common_init().
AVVDPAUContext* av_vdpau_alloc_context | ( | void | ) |
Allocate an AVVDPAUContext.
Definition at line 449 of file vdpau.c.
Referenced by av_alloc_vdpaucontext().
attribute_deprecated int av_vdpau_get_profile | ( | AVCodecContext * | avctx, |
VdpDecoderProfile * | profile | ||
) |
Get a decoder profile that should be used for initializing a VDPAU decoder.
Should be called from the AVCodecContext.get_format() callback.
avctx | the codec context being used for decoding the stream |
profile | a pointer into which the result will be written on success. The contents of profile are undefined if this function returns an error. |
VdpDecoder AVVDPAUContext::decoder |
VDPAU decoder handle.
Set by user.
Definition at line 87 of file vdpau.h.
Referenced by av_vdpau_bind_context(), and ff_vdpau_common_init().
VdpDecoderRender* AVVDPAUContext::render |
VDPAU decoder render callback.
Set by the user.
Definition at line 94 of file vdpau.h.
Referenced by ff_vdpau_common_end_frame(), and ff_vdpau_common_init().
AVVDPAU_Render2 AVVDPAUContext::render2 |
Definition at line 96 of file vdpau.h.
Referenced by ff_vdpau_common_end_frame().