38 #define NI_LOGAN_MAX_PROFILE_NAME_LEN 128
39 #define NI_LOGAN_MAX_LEVEL_NAME_LEN 64
40 #define NI_LOGAN_MAX_ADDITIONAL_INFO_LEN 64
222 const char *dev_name);
282 int* p_device_count);
392 unsigned long *p_load);
423 unsigned long *p_load);
487 int load_threshold,
int task_num_threshold,
Common NETINT definitions used by all modules.
#define LOGAN_MAX_DEVICE_CNT
#define NI_LOGAN_MAX_CONTEXTS_PER_HW_INSTANCE
#define NI_LOGAN_MAX_DEVICE_NAME_LEN
LIB_API int ni_logan_rsrc_codec_is_available(int guid, ni_logan_device_type_t device_type)
check the NetInt h/w device in resource pool on the host.
LIB_API int ni_logan_rsrc_init(int should_match_rev, int timeout_seconds)
Initialize and create all resources required to work with NETINT NVMe transcoder devices....
struct _ni_logan_device_info ni_logan_device_info_t
LIB_API int ni_logan_check_hw_info(hw_device_info_t *p_hw_device_info, int task_mode, int load_threshold, int task_num_threshold, ni_logan_device_type_t device_type, int resolution)
check hw info, return the appropriate card number to use depends on the load&task_num&used resource
LIB_API void ni_logan_rsrc_free_device_pool(ni_logan_device_pool_t *p_device_pool)
Free all resources taken by the device pool.
struct hw_device_info hw_device_info_t
LIB_API int ni_logan_find_device_index_by_name(void *device_pool, ni_logan_device_type_t device_type, const char *dev_name)
the card with the card name like /dev/nvme0n1 get the device index.
LIB_API void ni_logan_rsrc_print_device_info(const ni_logan_device_info_t *p_device_info)
Print the content of the ni_logan_device_info_t struct.
struct _ni_logan_rsrc_video_ref_cap ni_logan_rsrc_device_video_ref_cap_t
struct _ni_logan_device_pool ni_logan_device_pool_t
struct _ni_logan_sw_instance_info ni_logan_sw_instance_info_t
LIB_API ni_logan_device_info_t * ni_logan_rsrc_get_device_info(ni_logan_device_type_t device_type, int guid)
Query a specific device with detailed information on the system.
#define NI_LOGAN_MAX_ADDITIONAL_INFO_LEN
LIB_API ni_logan_device_pool_t * ni_logan_rsrc_get_device_pool(void)
Create and return the allocated ni_logan_device_pool_t struct.
LIB_API int ni_logan_rsrc_remove_device(const char *p_dev)
Remove an NetInt h/w device from resource pool on the host.
LIB_API ni_logan_retcode_t ni_logan_rsrc_list_all_devices(ni_logan_device_t *p_device)
List all devices with full information including s/w instances on the system.
#define NI_LOGAN_MAX_LEVEL_NAME_LEN
LIB_API int ni_logan_rsrc_get_local_device_list(char ni_logan_devices[][NI_LOGAN_MAX_DEVICE_NAME_LEN], int max_handles)
Scans system for all NVMe devices and returns the system device names to the user which were identifi...
struct _ni_logan_device ni_logan_device_t
#define NI_LOGAN_MAX_PROFILE_NAME_LEN
LIB_API ni_logan_device_context_t * ni_logan_rsrc_allocate_auto(ni_logan_device_type_t device_type, ni_alloc_rule_t rule, ni_codec_t codec, int width, int height, int frame_rate, unsigned long *p_load)
Allocate resources for decoding/encoding, based on the provided rule.
LIB_API int ni_logan_rsrc_update_device_load(ni_logan_device_context_t *p_ctxt, int load, int sw_instance_cnt, const ni_logan_sw_instance_info_t sw_instance_info[])
Update the load value and s/w instances info of a specific decoder or encoder. This is used by resour...
LIB_API ni_logan_device_context_t * ni_logan_rsrc_allocate_simple_direct(ni_logan_device_type_t device_type, int guid)
Allocate resources for decoding/encoding, by designating explicitly the device to use....
LIB_API int ni_logan_rsrc_get_available_device(int width, int height, int frame_rate, ni_codec_t codec, ni_logan_device_type_t device_type, ni_logan_device_info_t *p_device_info)
Get the least used device that can handle decoding or encoding a video stream of certain resolution/f...
LIB_API int ni_logan_rsrc_check_hw_available(int guid, ni_logan_device_type_t device_type)
check the NetInt h/w device in resource pool on the host.
LIB_API ni_logan_device_context_t * ni_logan_rsrc_get_device_context(ni_logan_device_type_t type, int guid)
Allocates and returns a pointer to ni_logan_device_context_t struct based on provided device_type and...
LIB_API ni_logan_device_context_t * ni_logan_rsrc_allocate_direct(ni_logan_device_type_t device_type, int guid, ni_codec_t codec, int width, int height, int frame_rate, unsigned long *p_load)
Allocate resources for decoding/encoding, by designating explicitly the device to use.
struct _ni_logan_device_context ni_logan_device_context_t
struct _ni_logan_device_video_capability ni_logan_device_video_capability_t
LIB_API int ni_logan_rsrc_add_device(const char *p_dev, int should_match_rev)
Add an NetInt h/w device into resource pool on the host.
struct _ni_logan_card_info ni_logan_card_info_t
@ EN_ALLOC_LEAST_INSTANCE
LIB_API void ni_logan_rsrc_print_all_devices_capability(void)
Print detailed capability information of all devices on the system.
LIB_API void ni_logan_rsrc_release_resource(ni_logan_device_context_t *p_ctxt, ni_codec_t codec, unsigned long load)
Release resources allocated for decoding/encoding. function This must be called at the end of transco...
LIB_API ni_logan_retcode_t ni_logan_rsrc_list_devices(ni_logan_device_type_t device_type, ni_logan_device_info_t *p_device_info, int *p_device_count)
List device(s) based on device type with full information including s/w instances on the system.
LIB_API int ni_logan_rsrc_unlock(int device_type, ni_lock_handle_t lock)
unlock a file lock
LIB_API void ni_logan_rsrc_free_device_context(ni_logan_device_context_t *p_ctxt)
Free previously allocated device context.
struct _ni_logan_device_queue ni_logan_device_queue_t
struct card_info card_info_t
LIB_API int ni_logan_rsrc_lock_and_open(int device_type, ni_lock_handle_t *lock)
lock a file lock and open a session on a device
LIB_API ni_logan_retcode_t ni_logan_rsrc_refresh(int should_match_rev)
Scan and refresh all resources on the host, taking into account hot-plugged and pulled out cards.
char shm_name[NI_LOGAN_MAX_DEVICE_NAME_LEN]
ni_logan_device_info_t * p_device_info
uint8_t fw_commit_time[26]
uint8_t fw_commit_hash[41]
ni_logan_device_video_capability_t h264_cap
int fw_ver_compat_warning
ni_logan_device_type_t device_type
uint8_t fw_branch_name[256]
char dev_name[NI_LOGAN_MAX_DEVICE_NAME_LEN]
ni_logan_device_video_capability_t h265_cap
char blk_name[NI_LOGAN_MAX_DEVICE_NAME_LEN]
ni_logan_sw_instance_info_t sw_instance[NI_LOGAN_MAX_CONTEXTS_PER_HW_INSTANCE]
unsigned long xcode_load_pixel
ni_logan_device_queue_t * p_device_queue
int32_t decoders[LOGAN_MAX_DEVICE_CNT]
int32_t encoders[LOGAN_MAX_DEVICE_CNT]
char level[NI_LOGAN_MAX_LEVEL_NAME_LEN]
char additional_info[NI_LOGAN_MAX_ADDITIONAL_INFO_LEN]
char profiles_supported[NI_LOGAN_MAX_PROFILE_NAME_LEN]
ni_logan_device_info_t encoders[LOGAN_MAX_DEVICE_CNT]
ni_logan_device_info_t decoders[LOGAN_MAX_DEVICE_CNT]
ni_sw_instance_status_t status