pub struct EncodeAPI {
Show 42 fields pub open_encode_session: unsafe extern "C" fn(_: *mut c_void, _: u32, _: *mut *mut c_void) -> NVENCSTATUS, pub open_encode_session_ex: unsafe extern "C" fn(_: *mut NV_ENC_OPEN_ENCODE_SESSION_EX_PARAMS, _: *mut *mut c_void) -> NVENCSTATUS, pub initialize_encoder: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_INITIALIZE_PARAMS) -> NVENCSTATUS, pub reconfigure_encoder: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_RECONFIGURE_PARAMS) -> NVENCSTATUS, pub destroy_encoder: unsafe extern "C" fn(encoder: *mut c_void) -> NVENCSTATUS, pub get_encode_guid_count: unsafe extern "C" fn(_: *mut c_void, _: *mut u32) -> NVENCSTATUS, pub get_encode_guids: unsafe extern "C" fn(_: *mut c_void, _: *mut GUID, _: u32, _: *mut u32) -> NVENCSTATUS, pub get_encode_profile_guid_count: unsafe extern "C" fn(_: *mut c_void, _: GUID, _: *mut u32) -> NVENCSTATUS, pub get_encode_profile_guids: unsafe extern "C" fn(_: *mut c_void, _: GUID, _: *mut GUID, _: u32, _: *mut u32) -> NVENCSTATUS, pub get_input_format_count: unsafe extern "C" fn(_: *mut c_void, _: GUID, _: *mut u32) -> NVENCSTATUS, pub get_input_formats: unsafe extern "C" fn(_: *mut c_void, _: GUID, _: *mut NV_ENC_BUFFER_FORMAT, _: u32, _: *mut u32) -> NVENCSTATUS, pub get_encode_preset_count: unsafe extern "C" fn(_: *mut c_void, _: GUID, _: *mut u32) -> NVENCSTATUS, pub get_encode_preset_guids: unsafe extern "C" fn(_: *mut c_void, _: GUID, _: *mut GUID, _: u32, _: *mut u32) -> NVENCSTATUS, pub get_encode_preset_config: unsafe extern "C" fn(_: *mut c_void, _: GUID, _: GUID, _: *mut NV_ENC_PRESET_CONFIG) -> NVENCSTATUS, pub get_encode_preset_config_ex: unsafe extern "C" fn(_: *mut c_void, _: GUID, _: GUID, _: NV_ENC_TUNING_INFO, _: *mut NV_ENC_PRESET_CONFIG) -> NVENCSTATUS, pub get_encode_caps: unsafe extern "C" fn(_: *mut c_void, _: GUID, _: *mut NV_ENC_CAPS_PARAM, _: *mut c_int) -> NVENCSTATUS, pub create_input_buffer: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_CREATE_INPUT_BUFFER) -> NVENCSTATUS, pub destroy_input_buffer: unsafe extern "C" fn(_: *mut c_void, _: NV_ENC_INPUT_PTR) -> NVENCSTATUS, pub lock_input_buffer: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_LOCK_INPUT_BUFFER) -> NVENCSTATUS, pub unlock_input_buffer: unsafe extern "C" fn(_: *mut c_void, _: NV_ENC_INPUT_PTR) -> NVENCSTATUS, pub create_bitstream_buffer: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_CREATE_BITSTREAM_BUFFER) -> NVENCSTATUS, pub destroy_bitstream_buffer: unsafe extern "C" fn(_: *mut c_void, _: NV_ENC_OUTPUT_PTR) -> NVENCSTATUS, pub lock_bitstream: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_LOCK_BITSTREAM) -> NVENCSTATUS, pub unlock_bitstream: unsafe extern "C" fn(_: *mut c_void, _: NV_ENC_OUTPUT_PTR) -> NVENCSTATUS, pub map_input_resource: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_MAP_INPUT_RESOURCE) -> NVENCSTATUS, pub unmap_input_resource: unsafe extern "C" fn(_: *mut c_void, _: NV_ENC_INPUT_PTR) -> NVENCSTATUS, pub register_resource: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_REGISTER_RESOURCE) -> NVENCSTATUS, pub unregister_resource: unsafe extern "C" fn(_: *mut c_void, _: NV_ENC_REGISTERED_PTR) -> NVENCSTATUS, pub create_mv_buffer: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_CREATE_MV_BUFFER) -> NVENCSTATUS, pub destroy_mv_buffer: unsafe extern "C" fn(_: *mut c_void, _: NV_ENC_OUTPUT_PTR) -> NVENCSTATUS, pub encode_picture: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_PIC_PARAMS) -> NVENCSTATUS, pub get_encode_stats: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_STAT) -> NVENCSTATUS, pub get_sequence_params: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_SEQUENCE_PARAM_PAYLOAD) -> NVENCSTATUS, pub get_sequence_param_ex: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_INITIALIZE_PARAMS, _: *mut NV_ENC_SEQUENCE_PARAM_PAYLOAD) -> NVENCSTATUS, pub register_async_event: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_EVENT_PARAMS) -> NVENCSTATUS, pub unregister_async_event: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_EVENT_PARAMS) -> NVENCSTATUS, pub invalidate_ref_frames: unsafe extern "C" fn(_: *mut c_void, _: u64) -> NVENCSTATUS, pub run_motion_estimation_only: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_MEONLY_PARAMS) -> NVENCSTATUS, pub get_last_error_string: unsafe extern "C" fn(encoder: *mut c_void) -> *const c_char, pub set_io_cuda_streams: unsafe extern "C" fn(_: *mut c_void, _: NV_ENC_CUSTREAM_PTR, _: NV_ENC_CUSTREAM_PTR) -> NVENCSTATUS, pub restore_encoder_state: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_RESTORE_ENCODER_STATE_PARAMS) -> NVENCSTATUS, pub lookahead_picture: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_LOOKAHEAD_PIC_PARAMS) -> NVENCSTATUS,
}
Expand description

An instance of the NvEncodeAPI interface, containing function pointers which should be used to interface with the rest of the Encoder API.

Fields§

§open_encode_session: unsafe extern "C" fn(_: *mut c_void, _: u32, _: *mut *mut c_void) -> NVENCSTATUS§open_encode_session_ex: unsafe extern "C" fn(_: *mut NV_ENC_OPEN_ENCODE_SESSION_EX_PARAMS, _: *mut *mut c_void) -> NVENCSTATUS§initialize_encoder: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_INITIALIZE_PARAMS) -> NVENCSTATUS§reconfigure_encoder: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_RECONFIGURE_PARAMS) -> NVENCSTATUS§destroy_encoder: unsafe extern "C" fn(encoder: *mut c_void) -> NVENCSTATUS§get_encode_guid_count: unsafe extern "C" fn(_: *mut c_void, _: *mut u32) -> NVENCSTATUS§get_encode_guids: unsafe extern "C" fn(_: *mut c_void, _: *mut GUID, _: u32, _: *mut u32) -> NVENCSTATUS§get_encode_profile_guid_count: unsafe extern "C" fn(_: *mut c_void, _: GUID, _: *mut u32) -> NVENCSTATUS§get_encode_profile_guids: unsafe extern "C" fn(_: *mut c_void, _: GUID, _: *mut GUID, _: u32, _: *mut u32) -> NVENCSTATUS§get_input_format_count: unsafe extern "C" fn(_: *mut c_void, _: GUID, _: *mut u32) -> NVENCSTATUS§get_input_formats: unsafe extern "C" fn(_: *mut c_void, _: GUID, _: *mut NV_ENC_BUFFER_FORMAT, _: u32, _: *mut u32) -> NVENCSTATUS§get_encode_preset_count: unsafe extern "C" fn(_: *mut c_void, _: GUID, _: *mut u32) -> NVENCSTATUS§get_encode_preset_guids: unsafe extern "C" fn(_: *mut c_void, _: GUID, _: *mut GUID, _: u32, _: *mut u32) -> NVENCSTATUS§get_encode_preset_config: unsafe extern "C" fn(_: *mut c_void, _: GUID, _: GUID, _: *mut NV_ENC_PRESET_CONFIG) -> NVENCSTATUS§get_encode_preset_config_ex: unsafe extern "C" fn(_: *mut c_void, _: GUID, _: GUID, _: NV_ENC_TUNING_INFO, _: *mut NV_ENC_PRESET_CONFIG) -> NVENCSTATUS§get_encode_caps: unsafe extern "C" fn(_: *mut c_void, _: GUID, _: *mut NV_ENC_CAPS_PARAM, _: *mut c_int) -> NVENCSTATUS§create_input_buffer: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_CREATE_INPUT_BUFFER) -> NVENCSTATUS§destroy_input_buffer: unsafe extern "C" fn(_: *mut c_void, _: NV_ENC_INPUT_PTR) -> NVENCSTATUS§lock_input_buffer: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_LOCK_INPUT_BUFFER) -> NVENCSTATUS§unlock_input_buffer: unsafe extern "C" fn(_: *mut c_void, _: NV_ENC_INPUT_PTR) -> NVENCSTATUS§create_bitstream_buffer: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_CREATE_BITSTREAM_BUFFER) -> NVENCSTATUS§destroy_bitstream_buffer: unsafe extern "C" fn(_: *mut c_void, _: NV_ENC_OUTPUT_PTR) -> NVENCSTATUS§lock_bitstream: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_LOCK_BITSTREAM) -> NVENCSTATUS§unlock_bitstream: unsafe extern "C" fn(_: *mut c_void, _: NV_ENC_OUTPUT_PTR) -> NVENCSTATUS§map_input_resource: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_MAP_INPUT_RESOURCE) -> NVENCSTATUS§unmap_input_resource: unsafe extern "C" fn(_: *mut c_void, _: NV_ENC_INPUT_PTR) -> NVENCSTATUS§register_resource: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_REGISTER_RESOURCE) -> NVENCSTATUS§unregister_resource: unsafe extern "C" fn(_: *mut c_void, _: NV_ENC_REGISTERED_PTR) -> NVENCSTATUS§create_mv_buffer: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_CREATE_MV_BUFFER) -> NVENCSTATUS§destroy_mv_buffer: unsafe extern "C" fn(_: *mut c_void, _: NV_ENC_OUTPUT_PTR) -> NVENCSTATUS§encode_picture: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_PIC_PARAMS) -> NVENCSTATUS§get_encode_stats: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_STAT) -> NVENCSTATUS§get_sequence_params: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_SEQUENCE_PARAM_PAYLOAD) -> NVENCSTATUS§get_sequence_param_ex: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_INITIALIZE_PARAMS, _: *mut NV_ENC_SEQUENCE_PARAM_PAYLOAD) -> NVENCSTATUS§register_async_event: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_EVENT_PARAMS) -> NVENCSTATUS§unregister_async_event: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_EVENT_PARAMS) -> NVENCSTATUS§invalidate_ref_frames: unsafe extern "C" fn(_: *mut c_void, _: u64) -> NVENCSTATUS§run_motion_estimation_only: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_MEONLY_PARAMS) -> NVENCSTATUS§get_last_error_string: unsafe extern "C" fn(encoder: *mut c_void) -> *const c_char§set_io_cuda_streams: unsafe extern "C" fn(_: *mut c_void, _: NV_ENC_CUSTREAM_PTR, _: NV_ENC_CUSTREAM_PTR) -> NVENCSTATUS§restore_encoder_state: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_RESTORE_ENCODER_STATE_PARAMS) -> NVENCSTATUS§lookahead_picture: unsafe extern "C" fn(_: *mut c_void, _: *mut NV_ENC_LOOKAHEAD_PIC_PARAMS) -> NVENCSTATUS

Trait Implementations§

source§

impl Clone for EncodeAPI

source§

fn clone(&self) -> EncodeAPI

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for EncodeAPI

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.