libxcoder  5.2.0
ni_rsrc_priv.h File Reference

Private definitions used by ni_rsrc_api.cpp for management of NETINT video processing devices. More...

#include "ni_device_api.h"

Go to the source code of this file.

Macros

#define LOCK_DIR   "/dev/shm"
 
#define CODERS_LCK_NAME   LOCK_DIR "/NI_LCK_CODERS"
 
#define CODERS_SHM_NAME   "NI_SHM_CODERS"
 
#define MAX_LOCK_RETRY   6000
 
#define LOCK_WAIT   10000
 

Functions

void ni_rsrc_get_lock_name (ni_device_type_t device_type, int32_t guid, char *p_name, size_t max_name_len)
 
void ni_rsrc_get_shm_name (ni_device_type_t device_type, int32_t guid, char *p_name, size_t max_name_len)
 
void ni_rsrc_update_record (ni_device_context_t *p_device_context, ni_session_context_t *p_session_ctx)
 
void ni_rsrc_get_one_device_info (ni_device_info_t *p_device_info)
 
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)
 
int ni_rsrc_enumerate_devices (char ni_devices[][NI_MAX_DEVICE_NAME_LEN], int max_handles)
 
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)
 
int ni_rsrc_strcmp (const void *p_str, const void *p_str1)
 
void get_dev_pcie_addr (char *device_name, char *pcie, char *domain, char *slot, char *dev, char *func)
 

Variables

LIB_API uint32_t g_xcoder_stop_process
 

Detailed Description

Private definitions used by ni_rsrc_api.cpp for management of NETINT video processing devices.


Definition in file ni_rsrc_priv.h.

Macro Definition Documentation

◆ CODERS_LCK_NAME

#define CODERS_LCK_NAME   LOCK_DIR "/NI_LCK_CODERS"

Definition at line 45 of file ni_rsrc_priv.h.

◆ CODERS_SHM_NAME

#define CODERS_SHM_NAME   "NI_SHM_CODERS"

Definition at line 46 of file ni_rsrc_priv.h.

◆ LOCK_DIR

#define LOCK_DIR   "/dev/shm"

Definition at line 42 of file ni_rsrc_priv.h.

◆ LOCK_WAIT

#define LOCK_WAIT   10000

Definition at line 59 of file ni_rsrc_priv.h.

◆ MAX_LOCK_RETRY

#define MAX_LOCK_RETRY   6000

Definition at line 58 of file ni_rsrc_priv.h.

Function Documentation

◆ add_to_shared_memory()

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 
)

Definition at line 408 of file ni_rsrc_priv.cpp.

◆ get_dev_pcie_addr()

void get_dev_pcie_addr ( char *  device_name,
char *  pcie,
char *  domain,
char *  slot,
char *  dev,
char *  func 
)

◆ ni_rsrc_enumerate_devices()

int ni_rsrc_enumerate_devices ( char  ni_devices[][NI_MAX_DEVICE_NAME_LEN],
int  max_handles 
)

◆ ni_rsrc_fill_device_info()

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 
)

Parameters

encoder

Definition at line 82 of file ni_rsrc_priv.cpp.

◆ ni_rsrc_get_lock_name()

void ni_rsrc_get_lock_name ( ni_device_type_t  device_type,
int32_t  guid,
char *  p_name,
size_t  max_name_len 
)

Parameters

Definition at line 242 of file ni_rsrc_priv.cpp.

◆ ni_rsrc_get_one_device_info()

void ni_rsrc_get_one_device_info ( ni_device_info_t p_device_info)

◆ ni_rsrc_get_shm_name()

void ni_rsrc_get_shm_name ( ni_device_type_t  device_type,
int32_t  guid,
char *  p_name,
size_t  max_name_len 
)

Parameters

assume there is enough space allocated in name

Definition at line 265 of file ni_rsrc_priv.cpp.

◆ ni_rsrc_init_priv()

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 
)

◆ ni_rsrc_strcmp()

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

Parameters

Definition at line 205 of file ni_rsrc_priv.cpp.

◆ ni_rsrc_update_record()

void ni_rsrc_update_record ( ni_device_context_t p_device_context,
ni_session_context_t p_session_ctx 
)

Variable Documentation

◆ g_xcoder_stop_process

LIB_API uint32_t g_xcoder_stop_process

Definition at line 73 of file ni_rsrc_priv.cpp.