#include <libavcodec/avcodec.h>
Definition at line 3591 of file avcodec.h.
◆ name
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).
Definition at line 3597 of file avcodec.h.
◆ type
Type of codec implemented by the hardware accelerator.
See AVMEDIA_TYPE_xxx
Definition at line 3604 of file avcodec.h.
◆ id
Codec implemented by the hardware accelerator.
See AV_CODEC_ID_xxx
Definition at line 3611 of file avcodec.h.
◆ pix_fmt
Supported pixel format.
Only hardware accelerated formats are supported here.
Definition at line 3618 of file avcodec.h.
◆ capabilities
int AVHWAccel::capabilities |
Hardware accelerated codec capabilities.
see AV_HWACCEL_CODEC_CAP_*
Definition at line 3624 of file avcodec.h.
◆ alloc_frame
Allocate a custom buffer.
Definition at line 3637 of file avcodec.h.
◆ start_frame
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
-
avctx | the codec context |
buf | the frame data buffer base |
buf_size | the size of the frame in bytes |
- Returns
- zero if successful, a negative value otherwise
Definition at line 3653 of file avcodec.h.
◆ decode_params
int(* AVHWAccel::decode_params) (AVCodecContext *avctx, int type, const uint8_t *buf, uint32_t buf_size) |
Callback for parameter data (SPS/PPS/VPS etc).
Useful for hardware decoders which keep persistent state about the video parameters, and need to receive any changes to update that state.
- Parameters
-
avctx | the codec context |
type | the nal unit type |
buf | the nal unit data buffer |
buf_size | the size of the nal unit in bytes |
- Returns
- zero if successful, a negative value otherwise
Definition at line 3667 of file avcodec.h.
◆ decode_slice
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
-
avctx | the codec context |
buf | the slice data buffer base |
buf_size | the size of the slice in bytes |
- Returns
- zero if successful, a negative value otherwise
Definition at line 3681 of file avcodec.h.
◆ end_frame
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
-
- Returns
- zero if successful, a negative value otherwise
Definition at line 3692 of file avcodec.h.
◆ frame_priv_data_size
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().
Definition at line 3701 of file avcodec.h.
◆ decode_mb
void(* AVHWAccel::decode_mb) (struct MpegEncContext *s) |
Called for every Macroblock in a slice.
XvMC uses it to replace the ff_mpv_reconstruct_mb(). Instead of decoding to raw picture, MB parameters are stored in an array provided by the video driver.
- Parameters
-
Definition at line 3712 of file avcodec.h.
◆ init
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.
Definition at line 3721 of file avcodec.h.
◆ uninit
Uninitialize the hwaccel private data.
This will be called from get_format() or avcodec_close(), after hwaccel and hwaccel_context are already uninitialized.
Definition at line 3729 of file avcodec.h.
◆ priv_data_size
int AVHWAccel::priv_data_size |
Size of the private data to allocate in AVCodecInternal.hwaccel_priv_data.
Definition at line 3735 of file avcodec.h.
◆ caps_internal
int AVHWAccel::caps_internal |
Internal hwaccel capabilities.
Definition at line 3740 of file avcodec.h.
◆ frame_params
◆ abort_frame
Called if parsing fails.
An error has occured, end_frame will not be called start_frame & decode_slice may or may not have been called Optional
- Parameters
-
Definition at line 3761 of file avcodec.h.
The documentation for this struct was generated from the following file: