libxcoder  3.5.1
ni_rsrc_priv_logan.h File Reference

Private definitions related to resource management of NI T-408 devices. More...

Go to the source code of this file.

Macros

#define LOCK_DIR   "/dev/shm"
 
#define CODERS_LCK_NAME   "/dev/shm/NI_LOGAN_LCK_CODERS"
 
#define CODERS_RETRY_DELCK_NAME   "/dev/shm/NI_LOGAN_RETRY_LCK_DECODERS"
 
#define CODERS_RETRY_ENLCK_NAME   "/dev/shm/NI_LOGAN_RETRY_LCK_ENCODERS"
 
#define CODERS_SHM_NAME   "NI_LOGAN_SHM_CODERS"
 
#define MAX_LOCK_RETRY   6000
 
#define LOCK_WAIT   10000
 

Functions

void ni_logan_rsrc_get_lock_name (ni_logan_device_type_t device_type, int32_t guid, char *p_name, size_t max_name_len)
 Returns the device lock name. More...
 
void ni_logan_rsrc_get_shm_name (ni_logan_device_type_t device_type, int32_t guid, char *p_name, size_t max_name_len)
 Returns the name of shared memory of the codec record. More...
 
void ni_logan_rsrc_update_record (ni_logan_device_context_t *p_device_context, ni_logan_session_context_t *p_session_ctx)
 Updates the codec record. More...
 
void ni_logan_rsrc_get_one_device_info (ni_logan_device_info_t *p_device_info)
 Retrieve codec record info. More...
 
ni_logan_retcode_t ni_logan_rsrc_fill_device_info (ni_logan_device_info_t *p_device_info, ni_codec_t fmt, ni_logan_device_type_t type, ni_logan_hw_capability_t *p_hw_cap)
 Update codec record info with retrieved device info from HW. More...
 
int ni_logan_rsrc_enumerate_devices (char ni_logan_devices[][NI_LOGAN_MAX_DEVICE_NAME_LEN], int max_handles)
 List NETINT nvme devices. More...
 
int ni_logan_rsrc_strcmp (const void *p_str, const void *p_str1)
 String comparison function. More...
 
int ni_logan_is_fw_compatible (uint8_t fw_rev[8])
 Check if a FW_rev retrieved from card is supported by libxcoder. Support is checked for API flavor, API version, and SW/FW release version. More...
 

Variables

LIB_API uint32_t g_logan_xcoder_stop_process
 

Detailed Description

Private definitions related to resource management of NI T-408 devices.


Definition in file ni_rsrc_priv_logan.h.

Macro Definition Documentation

◆ CODERS_LCK_NAME

#define CODERS_LCK_NAME   "/dev/shm/NI_LOGAN_LCK_CODERS"

Definition at line 50 of file ni_rsrc_priv_logan.h.

◆ CODERS_RETRY_DELCK_NAME

#define CODERS_RETRY_DELCK_NAME   "/dev/shm/NI_LOGAN_RETRY_LCK_DECODERS"

Definition at line 51 of file ni_rsrc_priv_logan.h.

◆ CODERS_RETRY_ENLCK_NAME

#define CODERS_RETRY_ENLCK_NAME   "/dev/shm/NI_LOGAN_RETRY_LCK_ENCODERS"

Definition at line 52 of file ni_rsrc_priv_logan.h.

◆ CODERS_SHM_NAME

#define CODERS_SHM_NAME   "NI_LOGAN_SHM_CODERS"

Definition at line 55 of file ni_rsrc_priv_logan.h.

◆ LOCK_DIR

#define LOCK_DIR   "/dev/shm"

Definition at line 49 of file ni_rsrc_priv_logan.h.

◆ LOCK_WAIT

#define LOCK_WAIT   10000

Definition at line 59 of file ni_rsrc_priv_logan.h.

◆ MAX_LOCK_RETRY

#define MAX_LOCK_RETRY   6000

Definition at line 58 of file ni_rsrc_priv_logan.h.

Function Documentation

◆ ni_logan_is_fw_compatible()

int ni_logan_is_fw_compatible ( uint8_t  fw_rev[8])

Check if a FW_rev retrieved from card is supported by libxcoder. Support is checked for API flavor, API version, and SW/FW release version.


Parameters
[in]fw_revFW revision queried from card firmware
Returns
If FW is fully compatible return 1 If FW not compatible return 0 If FW is partially compatible return 2

Definition at line 271 of file ni_rsrc_priv_logan.cpp.

◆ ni_logan_rsrc_enumerate_devices()

int ni_logan_rsrc_enumerate_devices ( char  ni_logan_devices[][NI_LOGAN_MAX_DEVICE_NAME_LEN],
int  max_handles 
)

List NETINT nvme devices.


Parameters

◆ ni_logan_rsrc_fill_device_info()

ni_logan_retcode_t ni_logan_rsrc_fill_device_info ( ni_logan_device_info_t p_device_info,
ni_codec_t  fmt,
ni_logan_device_type_t  type,
ni_logan_hw_capability_t p_hw_cap 
)

Update codec record info with retrieved device info from HW.


Parameters

encoder

Definition at line 64 of file ni_rsrc_priv_logan.cpp.

◆ ni_logan_rsrc_get_lock_name()

void ni_logan_rsrc_get_lock_name ( ni_logan_device_type_t  device_type,
int32_t  guid,
char *  p_name,
size_t  max_name_len 
)

Returns the device lock name.


Parameters

Definition at line 229 of file ni_rsrc_priv_logan.cpp.

◆ ni_logan_rsrc_get_one_device_info()

void ni_logan_rsrc_get_one_device_info ( ni_logan_device_info_t p_device_info)

Retrieve codec record info.


Parameters

◆ ni_logan_rsrc_get_shm_name()

void ni_logan_rsrc_get_shm_name ( ni_logan_device_type_t  device_type,
int32_t  guid,
char *  p_name,
size_t  max_name_len 
)

Returns the name of shared memory of the codec record.


Parameters

assume there is enough space allocated in name

Definition at line 248 of file ni_rsrc_priv_logan.cpp.

◆ ni_logan_rsrc_strcmp()

int ni_logan_rsrc_strcmp ( const void *  p_str,
const void *  p_str1 
)

String comparison function.


Parameters

Definition at line 192 of file ni_rsrc_priv_logan.cpp.

◆ ni_logan_rsrc_update_record()

void ni_logan_rsrc_update_record ( ni_logan_device_context_t p_device_context,
ni_logan_session_context_t p_session_ctx 
)

Updates the codec record.


Parameters

Variable Documentation

◆ g_logan_xcoder_stop_process

LIB_API uint32_t g_logan_xcoder_stop_process
extern

Definition at line 55 of file ni_rsrc_priv_logan.cpp.