 |
libxcoder
5.2.0
|
Go to the documentation of this file.
38 #define LOCK_DIR "/tmp"
40 #define LOCK_DIR "/dev/shm"
43 #define CODERS_LCK_NAME LOCK_DIR "/NI_QUADRA_LCK_CODERS"
44 #define CODERS_SHM_NAME "NI_QUADRA_SHM_CODERS"
46 #ifdef __OPENHARMONY__
47 #define PROJ_ID 818565 //the ascii value for "QUA": 81 85 65
50 NI_UNUSED static const char *XCODERS_RETRY_LCK_NAME[] = {
51 LOCK_DIR "/NI_QUADRA_RETRY_LCK_DECODERS",
LOCK_DIR "/NI_QUADRA_RETRY_LCK_ENCODERS",
52 LOCK_DIR "/NI_QUADRA_RETRY_LCK_SCALERS",
LOCK_DIR "/NI_QUADRA_RETRY_LCK_AI"};
54 #define MAX_LOCK_RETRY 6000
55 #define LOCK_WAIT 10000 // wait in us
66 const int existing_number_of_devices,
70 const int existing_number_of_devices,
77 const bool device_open_should_succeed,
78 const int should_match_rev,
88 char *domain,
char *slot,
char *dev,
char *func);
90 #if __linux__ || __APPLE__
91 typedef enum _ni_rsrc_shm_state
93 NI_RSRC_SHM_IS_INVALID = -1,
94 NI_RSRC_SHM_IS_CREATED = 0,
95 NI_RSRC_SHM_IS_EXISTED = 1,
99 ni_retcode_t ni_rsrc_try_get_shm_lock(
const char *lck_name,
106 ni_rsrc_shm_state *state,
ni_retcode_t ni_rsrc_fill_device_info(ni_device_info_t *p_device_info, ni_codec_t fmt, ni_device_type_t type, ni_hw_capability_t *p_hw_cap)
int ni_rsrc_init_priv(const int should_match_rev, const int existing_number_of_devices, const char device_names[NI_MAX_DEVICE_CNT][NI_MAX_DEVICE_NAME_LEN], int limit_depth)
void ni_rsrc_update_record(ni_device_context_t *p_device_context, ni_session_context_t *p_session_ctx)
int ni_rsrc_strcmp(const void *p_str, const void *p_str1)
int ni_is_fw_compatible(uint8_t fw_rev[8])
void ni_rsrc_get_one_device_info(ni_device_info_t *p_device_info)
#define NI_MAX_DEVICE_CNT
#define NI_MAX_DEVICE_NAME_LEN
LIB_API uint32_t g_xcoder_stop_process
int ni_rsrc_enumerate_devices(char ni_devices[][NI_MAX_DEVICE_NAME_LEN], int max_handles)
void ni_rsrc_get_lock_name(ni_device_type_t device_type, int32_t guid, char *p_name, size_t max_name_len)
Public definitions for operating NETINT video processing devices for video processing.
void ni_rsrc_get_shm_name(ni_device_type_t device_type, int32_t guid, char *p_name, size_t max_name_len)
bool add_to_shared_memory(const char device_name[NI_MAX_DEVICE_NAME_LEN], const bool device_open_should_succeed, const int should_match_rev, ni_device_queue_t *device_queue)
void get_dev_pcie_addr(char *device_name, char *pcie, char *domain, char *slot, char *dev, char *func)