Struct ffav_sys::AVCodec [−][src]
#[repr(C)]pub struct AVCodec {}Show fields
pub name: *const c_char, pub long_name: *const c_char, pub type_: AVMediaType, pub id: AVCodecID, pub capabilities: c_int, pub supported_framerates: *const AVRational, pub pix_fmts: *const AVPixelFormat, pub supported_samplerates: *const c_int, pub sample_fmts: *const AVSampleFormat, pub channel_layouts: *const u64, pub max_lowres: u8, pub priv_class: *const AVClass, pub profiles: *const AVProfile, pub wrapper_name: *const c_char, pub priv_data_size: c_int, pub next: *mut AVCodec, pub init_thread_copy: Option<unsafe extern "C" fn(arg1: *mut AVCodecContext) -> c_int>, pub update_thread_context: Option<unsafe extern "C" fn(dst: *mut AVCodecContext, src: *const AVCodecContext) -> c_int>, pub defaults: *const AVCodecDefault, pub init_static_data: Option<unsafe extern "C" fn(codec: *mut AVCodec)>, pub init: Option<unsafe extern "C" fn(arg1: *mut AVCodecContext) -> c_int>, pub encode_sub: Option<unsafe extern "C" fn(arg1: *mut AVCodecContext, buf: *mut u8, buf_size: c_int, sub: *const AVSubtitle) -> c_int>, pub encode2: Option<unsafe extern "C" fn(avctx: *mut AVCodecContext, avpkt: *mut AVPacket, frame: *const AVFrame, got_packet_ptr: *mut c_int) -> c_int>, pub decode: Option<unsafe extern "C" fn(arg1: *mut AVCodecContext, outdata: *mut c_void, outdata_size: *mut c_int, avpkt: *mut AVPacket) -> c_int>, pub close: Option<unsafe extern "C" fn(arg1: *mut AVCodecContext) -> c_int>, pub send_frame: Option<unsafe extern "C" fn(avctx: *mut AVCodecContext, frame: *const AVFrame) -> c_int>, pub receive_packet: Option<unsafe extern "C" fn(avctx: *mut AVCodecContext, avpkt: *mut AVPacket) -> c_int>, pub receive_frame: Option<unsafe extern "C" fn(avctx: *mut AVCodecContext, frame: *mut AVFrame) -> c_int>, pub flush: Option<unsafe extern "C" fn(arg1: *mut AVCodecContext)>, pub caps_internal: c_int, pub bsfs: *const c_char, pub hw_configs: *mut *mut AVCodecHWConfigInternal,
Expand description
AVCodec.
Fields
name: *const c_char
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 c_char
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_: AVMediaType
id: AVCodecID
capabilities: c_int
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 AVPixelFormat
Expand description
< array of supported pixel formats, or NULL if unknown, array is terminated by -1
supported_samplerates: *const c_int
Expand description
< array of supported audio samplerates, or NULL if unknown, array is terminated by 0
sample_fmts: *const AVSampleFormat
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 c_char
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: c_int
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
init_thread_copy: Option<unsafe extern "C" fn(arg1: *mut AVCodecContext) -> c_int>
Expand description
@name Frame-level threading support functions @{ If defined, called on thread contexts when they are created. If the codec allocates writable tables in init(), re-allocate them here. priv_data will be set to a copy of the original.
update_thread_context: Option<unsafe extern "C" fn(dst: *mut AVCodecContext, src: *const AVCodecContext) -> c_int>
Expand description
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(codec: *mut AVCodec)>
Expand description
Initialize codec static data, called from avcodec_register().
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(arg1: *mut AVCodecContext) -> c_int>
encode_sub: Option<unsafe extern "C" fn(arg1: *mut AVCodecContext, buf: *mut u8, buf_size: c_int, sub: *const AVSubtitle) -> c_int>
encode2: Option<unsafe extern "C" fn(avctx: *mut AVCodecContext, avpkt: *mut AVPacket, frame: *const AVFrame, got_packet_ptr: *mut c_int) -> c_int>
Expand description
Encode data to an AVPacket.
@param avctx codec context @param avpkt output AVPacket (may contain a user-provided buffer) @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(arg1: *mut AVCodecContext, outdata: *mut c_void, outdata_size: *mut c_int, avpkt: *mut AVPacket) -> c_int>
close: Option<unsafe extern "C" fn(arg1: *mut AVCodecContext) -> c_int>
send_frame: Option<unsafe extern "C" fn(avctx: *mut AVCodecContext, frame: *const AVFrame) -> c_int>
Expand description
Encode API with decoupled packet/frame dataflow. The API is the same as the avcodec_ prefixed APIs (avcodec_send_frame() etc.), except that:
- never called if the codec is closed or the wrong type,
- if AV_CODEC_CAP_DELAY is not set, drain frames are never sent,
- only one drain frame is ever passed down,
receive_packet: Option<unsafe extern "C" fn(avctx: *mut AVCodecContext, avpkt: *mut AVPacket) -> c_int>
receive_frame: Option<unsafe extern "C" fn(avctx: *mut AVCodecContext, frame: *mut AVFrame) -> c_int>
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(arg1: *mut AVCodecContext)>
Expand description
Flush buffers. Will be called when seeking
caps_internal: c_int
Expand description
Internal codec capabilities. See FF_CODEC_CAP_* in internal.h
bsfs: *const c_char
Expand description
Decoding only, a comma-separated list of bitstream filters to apply to packets before decoding.
hw_configs: *mut *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().
Trait Implementations
impl Copy for AVCodec
[src]
impl Eq for AVCodec
[src]
impl StructuralEq for AVCodec
[src]
impl StructuralPartialEq for AVCodec
[src]
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