Struct rsmpeg::ffi::AVCodec [−][src]
#[repr(C)]pub struct AVCodec {}Show fields
pub name: *const i8, pub long_name: *const i8, pub type_: i32, pub id: u32, pub capabilities: i32, pub supported_framerates: *const AVRational, pub pix_fmts: *const i32, pub supported_samplerates: *const i32, pub sample_fmts: *const i32, pub channel_layouts: *const u64, pub max_lowres: u8, pub priv_class: *const AVClass, pub profiles: *const AVProfile, pub wrapper_name: *const i8, pub priv_data_size: i32, pub next: *mut AVCodec, pub update_thread_context: Option<unsafe extern "C" fn(*mut AVCodecContext, *const AVCodecContext) -> i32>, pub defaults: *const AVCodecDefault, pub init_static_data: Option<unsafe extern "C" fn(*mut AVCodec)>, pub init: Option<unsafe extern "C" fn(*mut AVCodecContext) -> i32>, pub encode_sub: Option<unsafe extern "C" fn(*mut AVCodecContext, *mut u8, i32, *const AVSubtitle) -> i32>, pub encode2: Option<unsafe extern "C" fn(*mut AVCodecContext, *mut AVPacket, *const AVFrame, *mut i32) -> i32>, pub decode: Option<unsafe extern "C" fn(*mut AVCodecContext, *mut c_void, *mut i32, *mut AVPacket) -> i32>, pub close: Option<unsafe extern "C" fn(*mut AVCodecContext) -> i32>, pub receive_packet: Option<unsafe extern "C" fn(*mut AVCodecContext, *mut AVPacket) -> i32>, pub receive_frame: Option<unsafe extern "C" fn(*mut AVCodecContext, *mut AVFrame) -> i32>, pub flush: Option<unsafe extern "C" fn(*mut AVCodecContext)>, pub caps_internal: i32, pub bsfs: *const i8, pub hw_configs: *const *mut AVCodecHWConfigInternal, pub codec_tags: *const u32,
Expand description
AVCodec.
Fields
name: *const i8
Expand description
Name of the codec implementation. The name is globally unique among encoders and among decoders (but an encoder and a decoder can share the same name). This is the primary way to find a codec from the user perspective.
long_name: *const i8
Expand description
Descriptive name for the codec, meant to be more human readable than name. You should use the NULL_IF_CONFIG_SMALL() macro to define it.
type_: i32
id: u32
capabilities: i32
Expand description
Codec capabilities. see AV_CODEC_CAP_*
supported_framerates: *const AVRational
Expand description
< array of supported framerates, or NULL if any, array is terminated by {0,0}
pix_fmts: *const i32
Expand description
< array of supported pixel formats, or NULL if unknown, array is terminated by -1
supported_samplerates: *const i32
Expand description
< array of supported audio samplerates, or NULL if unknown, array is terminated by 0
sample_fmts: *const i32
Expand description
< array of supported sample formats, or NULL if unknown, array is terminated by -1
channel_layouts: *const u64
Expand description
< array of support channel layouts, or NULL if unknown. array is terminated by 0
max_lowres: u8
Expand description
< maximum value for lowres supported by the decoder
priv_class: *const AVClass
Expand description
< AVClass for the private context
profiles: *const AVProfile
Expand description
< array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN}
wrapper_name: *const i8
Expand description
Group name of the codec implementation. This is a short symbolic name of the wrapper backing this codec. A wrapper uses some kind of external implementation for the codec, such as an external library, or a codec implementation provided by the OS or the hardware. If this field is NULL, this is a builtin, libavcodec native codec. If non-NULL, this will be the suffix in AVCodec.name in most cases (usually AVCodec.name will be of the form “<codec_name>_<wrapper_name>”).
priv_data_size: i32
Expand description
No fields below this line are part of the public API. They may not be used outside of libavcodec and can be changed and removed at will. New public fields should be added right above.
next: *mut AVCodec
update_thread_context: Option<unsafe extern "C" fn(*mut AVCodecContext, *const AVCodecContext) -> i32>
Expand description
@name Frame-level threading support functions @{ Copy necessary context variables from a previous thread context to the current one. If not defined, the next thread will start automatically; otherwise, the codec must call ff_thread_finish_setup().
dst and src will (rarely) point to the same context, in which case memcpy should be skipped.
defaults: *const AVCodecDefault
Expand description
Private codec-specific defaults.
init_static_data: Option<unsafe extern "C" fn(*mut AVCodec)>
Expand description
Initialize codec static data, called from av_codec_iterate().
This is not intended for time consuming operations as it is run for every codec regardless of that codec being used.
init: Option<unsafe extern "C" fn(*mut AVCodecContext) -> i32>
encode_sub: Option<unsafe extern "C" fn(*mut AVCodecContext, *mut u8, i32, *const AVSubtitle) -> i32>
encode2: Option<unsafe extern "C" fn(*mut AVCodecContext, *mut AVPacket, *const AVFrame, *mut i32) -> i32>
Expand description
Encode data to an AVPacket.
@param avctx codec context @param avpkt output AVPacket @param[in] frame AVFrame containing the raw data to be encoded @param[out] got_packet_ptr encoder sets to 0 or 1 to indicate that a non-empty packet was returned in avpkt. @return 0 on success, negative error code on failure
decode: Option<unsafe extern "C" fn(*mut AVCodecContext, *mut c_void, *mut i32, *mut AVPacket) -> i32>
Expand description
Decode picture or subtitle data.
@param avctx codec context @param outdata codec type dependent output struct @param[out] got_frame_ptr decoder sets to 0 or 1 to indicate that a non-empty frame or subtitle was returned in outdata. @param[in] avpkt AVPacket containing the data to be decoded @return amount of bytes read from the packet on success, negative error code on failure
close: Option<unsafe extern "C" fn(*mut AVCodecContext) -> i32>
receive_packet: Option<unsafe extern "C" fn(*mut AVCodecContext, *mut AVPacket) -> i32>
Expand description
Encode API with decoupled frame/packet dataflow. This function is called to get one output packet. It should call ff_encode_get_frame() to obtain input data.
receive_frame: Option<unsafe extern "C" fn(*mut AVCodecContext, *mut AVFrame) -> i32>
Expand description
Decode API with decoupled packet/frame dataflow. This function is called to get one output frame. It should call ff_decode_get_packet() to obtain input data.
flush: Option<unsafe extern "C" fn(*mut AVCodecContext)>
Expand description
Flush buffers. Will be called when seeking
caps_internal: i32
Expand description
Internal codec capabilities. See FF_CODEC_CAP_* in internal.h
bsfs: *const i8
Expand description
Decoding only, a comma-separated list of bitstream filters to apply to packets before decoding.
hw_configs: *const *mut AVCodecHWConfigInternal
Expand description
Array of pointers to hardware configurations supported by the codec, or NULL if no hardware supported. The array is terminated by a NULL pointer.
The user can only access this field via avcodec_get_hw_config().
Expand description
List of supported codec_tags, terminated by FF_CODEC_TAGS_END.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for AVCodec
impl !Send for AVCodec
impl !Sync for AVCodec
impl Unpin for AVCodec
impl UnwindSafe for AVCodec
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