Struct rsmpeg::ffi::AVHWAccel [−][src]
#[repr(C)]pub struct AVHWAccel {}Show fields
pub name: *const i8, pub type_: i32, pub id: u32, pub pix_fmt: i32, pub capabilities: i32, pub alloc_frame: Option<unsafe extern "C" fn(*mut AVCodecContext, *mut AVFrame) -> i32>, pub start_frame: Option<unsafe extern "C" fn(*mut AVCodecContext, *const u8, u32) -> i32>, pub decode_params: Option<unsafe extern "C" fn(*mut AVCodecContext, i32, *const u8, u32) -> i32>, pub decode_slice: Option<unsafe extern "C" fn(*mut AVCodecContext, *const u8, u32) -> i32>, pub end_frame: Option<unsafe extern "C" fn(*mut AVCodecContext) -> i32>, pub frame_priv_data_size: i32, pub decode_mb: Option<unsafe extern "C" fn(*mut MpegEncContext)>, pub init: Option<unsafe extern "C" fn(*mut AVCodecContext) -> i32>, pub uninit: Option<unsafe extern "C" fn(*mut AVCodecContext) -> i32>, pub priv_data_size: i32, pub caps_internal: i32, pub frame_params: Option<unsafe extern "C" fn(*mut AVCodecContext, *mut AVBufferRef) -> i32>,
Expand description
@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 i8
Expand description
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_: i32
Expand description
Type of codec implemented by the hardware accelerator.
See AVMEDIA_TYPE_xxx
id: u32
Expand description
Codec implemented by the hardware accelerator.
See AV_CODEC_ID_xxx
pix_fmt: i32
Expand description
Supported pixel format.
Only hardware accelerated formats are supported here.
capabilities: i32
Expand description
Hardware accelerated codec capabilities. see AV_HWACCEL_CODEC_CAP_*
alloc_frame: Option<unsafe extern "C" fn(*mut AVCodecContext, *mut AVFrame) -> i32>
Expand description
Allocate a custom buffer
start_frame: Option<unsafe extern "C" fn(*mut AVCodecContext, *const u8, u32) -> i32>
Expand description
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(*mut AVCodecContext, i32, *const u8, u32) -> i32>
Expand description
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(*mut AVCodecContext, *const u8, u32) -> i32>
Expand description
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(*mut AVCodecContext) -> i32>
Expand description
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: i32
Expand description
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(*mut MpegEncContext)>
Expand description
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(*mut AVCodecContext) -> i32>
Expand description
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(*mut AVCodecContext) -> i32>
Expand description
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: i32
Expand description
Size of the private data to allocate in AVCodecInternal.hwaccel_priv_data.
caps_internal: i32
Expand description
Internal hwaccel capabilities.
frame_params: Option<unsafe extern "C" fn(*mut AVCodecContext, *mut AVBufferRef) -> i32>
Expand description
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
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> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more