Miam-Player  0.8.0
A nice music player
AVHWAccel Struct Reference

#include <avcodec.h>

Public Attributes

const char * name
 
enum AVMediaType type
 
enum AVCodecID id
 
enum AVPixelFormat pix_fmt
 
int capabilities
 
struct AVHWAccelnext
 
int(* alloc_frame )(AVCodecContext *avctx, AVFrame *frame)
 
int(* start_frame )(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size)
 
int(* decode_slice )(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size)
 
int(* end_frame )(AVCodecContext *avctx)
 
int frame_priv_data_size
 
void(* decode_mb )(struct MpegEncContext *s)
 
int(* init )(AVCodecContext *avctx)
 
int(* uninit )(AVCodecContext *avctx)
 
int priv_data_size
 

Member Data Documentation

int(* AVHWAccel::alloc_frame) (AVCodecContext *avctx, AVFrame *frame)

Allocate a custom buffer

int AVHWAccel::capabilities

Hardware accelerated codec capabilities. see HWACCEL_CODEC_CAP_*

void(* AVHWAccel::decode_mb) (struct MpegEncContext *s)

Called for every Macroblock in a slice.

XvMC uses it to replace the ff_mpv_decode_mb(). Instead of decoding to raw picture, MB parameters are stored in an array provided by the video driver.

Parameters
sthe mpeg context
int(* AVHWAccel::decode_slice) (AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size)

Callback for each slice.

Meaningful slice information (codec specific) is guaranteed to be parsed at this point. This function is mandatory. The only exception is XvMC, that works on MB level.

Parameters
avctxthe codec context
bufthe slice data buffer base
buf_sizethe size of the slice in bytes
Returns
zero if successful, a negative value otherwise
int(* AVHWAccel::end_frame) (AVCodecContext *avctx)

Called at the end of each frame or field picture.

The whole picture is parsed at this point and can now be sent to the hardware accelerator. This function is mandatory.

Parameters
avctxthe codec context
Returns
zero if successful, a negative value otherwise
int AVHWAccel::frame_priv_data_size

Size of per-frame hardware accelerator private data.

Private data is allocated with av_mallocz() before AVCodecContext.get_buffer() and deallocated after AVCodecContext.release_buffer().

enum AVCodecID AVHWAccel::id

Codec implemented by the hardware accelerator.

See AV_CODEC_ID_xxx

int(* AVHWAccel::init) (AVCodecContext *avctx)

Initialize the hwaccel private data.

This will be called from ff_get_format(), after hwaccel and hwaccel_context are set and the hwaccel private data in AVCodecInternal is allocated.

const char* AVHWAccel::name

Name of the hardware accelerated codec. The name is globally unique among encoders and among decoders (but an encoder and a decoder can share the same name).

struct AVHWAccel* AVHWAccel::next
enum AVPixelFormat AVHWAccel::pix_fmt

Supported pixel format.

Only hardware accelerated formats are supported here.

int AVHWAccel::priv_data_size

Size of the private data to allocate in AVCodecInternal.hwaccel_priv_data.

int(* AVHWAccel::start_frame) (AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size)

Called at the beginning of each frame or field picture.

Meaningful frame information (codec specific) is guaranteed to be parsed at this point. This function is mandatory.

Note that buf can be NULL along with buf_size set to 0. Otherwise, this means the whole frame is available at this point.

Parameters
avctxthe codec context
bufthe frame data buffer base
buf_sizethe size of the frame in bytes
Returns
zero if successful, a negative value otherwise
enum AVMediaType AVHWAccel::type

Type of codec implemented by the hardware accelerator.

See AVMEDIA_TYPE_xxx

int(* AVHWAccel::uninit) (AVCodecContext *avctx)

Uninitialize the hwaccel private data.

This will be called from get_format() or avcodec_close(), after hwaccel and hwaccel_context are already uninitialized.


The documentation for this struct was generated from the following file: