[−][src]Struct ffmpeg_sys_next::AVHWAccel
@defgroup lavc_hwaccel AVHWAccel
@note Nothing in this structure should be accessed by the user. At some point in future it will not be externally visible at all.
@{
Fields
name: *const c_char
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).
type_: AVMediaType
Type of codec implemented by the hardware accelerator.
See AVMEDIA_TYPE_xxx
id: AVCodecID
Codec implemented by the hardware accelerator.
See AV_CODEC_ID_xxx
pix_fmt: AVPixelFormat
Supported pixel format.
Only hardware accelerated formats are supported here.
capabilities: c_int
Hardware accelerated codec capabilities. see AV_HWACCEL_CODEC_CAP_*
alloc_frame: Option<unsafe extern "C" fn(avctx: *mut AVCodecContext, frame: *mut AVFrame) -> c_int>
Allocate a custom buffer
start_frame: Option<unsafe extern "C" fn(avctx: *mut AVCodecContext, buf: *const u8, buf_size: u32) -> c_int>
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.
@param avctx the codec context @param buf the frame data buffer base @param buf_size the size of the frame in bytes @return zero if successful, a negative value otherwise
decode_params: Option<unsafe extern "C" fn(avctx: *mut AVCodecContext, type_: c_int, buf: *const u8, buf_size: u32) -> c_int>
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.
@param avctx the codec context @param type the nal unit type @param buf the nal unit data buffer @param buf_size the size of the nal unit in bytes @return zero if successful, a negative value otherwise
decode_slice: Option<unsafe extern "C" fn(avctx: *mut AVCodecContext, buf: *const u8, buf_size: u32) -> c_int>
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.
@param avctx the codec context @param buf the slice data buffer base @param buf_size the size of the slice in bytes @return zero if successful, a negative value otherwise
end_frame: Option<unsafe extern "C" fn(avctx: *mut AVCodecContext) -> c_int>
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.
@param avctx the codec context @return zero if successful, a negative value otherwise
frame_priv_data_size: c_int
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().
decode_mb: Option<unsafe extern "C" fn(s: *mut MpegEncContext)>
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.
@param s the mpeg context
init: Option<unsafe extern "C" fn(avctx: *mut AVCodecContext) -> c_int>
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.
uninit: Option<unsafe extern "C" fn(avctx: *mut AVCodecContext) -> c_int>
Uninitialize the hwaccel private data.
This will be called from get_format() or avcodec_close(), after hwaccel and hwaccel_context are already uninitialized.
priv_data_size: c_int
Size of the private data to allocate in AVCodecInternal.hwaccel_priv_data.
caps_internal: c_int
Internal hwaccel capabilities.
frame_params: Option<unsafe extern "C" fn(avctx: *mut AVCodecContext, hw_frames_ctx: *mut AVBufferRef) -> c_int>
Fill the given hw_frames context with current codec parameters. Called from get_format. Refer to avcodec_get_hw_frames_parameters() for details.
This CAN be called before AVHWAccel.init is called, and you must assume that avctx->hwaccel_priv_data is invalid.
Trait Implementations
impl Clone for AVHWAccel
[src]
impl Copy for AVHWAccel
[src]
impl Debug for AVHWAccel
[src]
impl Eq for AVHWAccel
[src]
impl PartialEq<AVHWAccel> for AVHWAccel
[src]
impl StructuralEq for AVHWAccel
[src]
impl StructuralPartialEq for AVHWAccel
[src]
Auto Trait Implementations
impl RefUnwindSafe for AVHWAccel
impl !Send for AVHWAccel
impl !Sync for AVHWAccel
impl Unpin for AVHWAccel
impl UnwindSafe for AVHWAccel
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,