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§
Auto Trait Implementations§
impl Freeze for EncodeAPI
impl RefUnwindSafe for EncodeAPI
impl Send for EncodeAPI
impl Sync for EncodeAPI
impl Unpin for EncodeAPI
impl UnwindSafe for EncodeAPI
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more