|
libxcoder
5.3.1
|
Application to query and print live performance/load info of registered NETINT video processing devices on system. More...
#include <stdio.h>#include <stdlib.h>#include <stdarg.h>#include <errno.h>#include <time.h>#include <ctype.h>#include <string.h>#include "ni_device_api.h"#include "ni_rsrc_api.h"#include "ni_rsrc_priv.h"#include "ni_util.h"Go to the source code of this file.
Data Structures | |
| struct | dyn_str_buf |
Macros | |
| #define | MAX_DEVICE_NAME_SIZE (9) |
| #define | ABSOLUTE_TEMP_ZERO (-273) |
| #define | NP_LOAD (0) |
| #define | TP_LOAD (1) |
| #define | PCIE_LOAD (2) |
| #define | DYN_STR_BUF_CHUNK_SIZE 4096 |
Typedefs | |
| typedef struct dyn_str_buf | dyn_str_buf_t |
Enumerations | |
| enum | outFormat { FMT_TEXT, FMT_FULL_TEXT, FMT_JSON, FMT_TEXT, FMT_FULL_TEXT, FMT_SIMPLE_TEXT, FMT_JSON, FMT_JSON1, FMT_JSON2, FMT_EXTRA } |
Functions | |
| int | remove_device_from_saved (ni_device_type_t device_type, int32_t module_id, ni_device_handle_t device_handle) |
| remove one device from stored device_handles More... | |
| int | argToI (char *numArray) |
| convert number from argv input to integer if safe More... | |
| int | compareInt32_t (const void *a, const void *b) |
| compare two int32_t for qsort More... | |
| char * | get_pixel_format (ni_device_context_t *p_device_context, int index) |
| char * | get_session_id (ni_device_context_t *p_device_context, int id) |
| unsigned int | get_modules (ni_device_type_t device_type, ni_device_queue_t *p_device_queue, char *device_name, int32_t **module_ids) |
| bool | open_and_query (ni_device_type_t device_type, ni_device_context_t *p_device_context, ni_session_context_t *p_session_context, char *device_name, int detail, ni_instance_mgr_detail_status_v1_t *detail_data_v1) |
| bool | open_and_get_log (ni_device_context_t *p_device_context, ni_session_context_t *p_session_context, void **p_log_buffer, bool gen_log_file) |
| void | dump_fw_log (ni_device_queue_t *coders, ni_session_context_t *sessionCtxt, int devid) |
| bool | swap_encoder_and_uploader (ni_device_type_t *p_device_type, char *device_name) |
| int | strcat_dyn_buf (dyn_str_buf_t *dyn_str_buf, const char *fmt,...) |
| Accumulate string data in a dynamically sized buffer. This is useful to separate error messages from json and table output. More... | |
| void | clear_dyn_str_buf (dyn_str_buf_t *dyn_str_buf) |
| void | print_full_text (ni_device_queue_t *p_device_queue, ni_session_context_t *p_session_context, int detail, ni_instance_mgr_detail_status_v1_t *detail_data_v1) |
| void | print_simple_text (ni_device_queue_t *p_device_queue, ni_session_context_t *p_session_context, int detail, ni_instance_mgr_detail_status_v1_t *detail_data_v1) |
| void | print_json_detail (ni_device_queue_t *p_device_queue, ni_session_context_t *p_session_context, ni_instance_mgr_detail_status_v1_t *detail_data_v1) |
| void | print_json (ni_device_queue_t *p_device_queue, ni_session_context_t *p_session_context, int detail, ni_instance_mgr_detail_status_v1_t *detail_data_v1) |
| void | print_json1 (ni_device_queue_t *p_device_queue, ni_session_context_t *p_session_context, int detail, ni_instance_mgr_detail_status_v1_t *detail_data_v1, int format) |
| void | print_text (ni_device_queue_t *coders, ni_session_context_t *sessionCtxt, int detail, ni_instance_mgr_detail_status_v1_t *detail_data_v1, ni_instance_mgr_detail_status_v1_t(*previous_detail_data_p)[NI_DEVICE_TYPE_XCODER_MAX], int checkInterval) |
| void | print_extra (ni_device_queue_t *p_device_queue, ni_session_context_t *p_session_context, int internal_call) |
| int | main (int argc, char *argv[]) |
Variables | |
| uint32_t * | g_temp_load = NULL |
| uint32_t * | g_temp_pload = NULL |
| uint32_t * | g_temp_pthroughput = NULL |
| uint32_t * | g_temp_sharemem = NULL |
| ni_device_handle_t | device_handles [NI_DEVICE_TYPE_XCODER_MAX][NI_MAX_DEVICE_CNT] = {0} |
Application to query and print live performance/load info of registered NETINT video processing devices on system.
Definition in file ni_rsrc_mon.c.
| #define ABSOLUTE_TEMP_ZERO (-273) |
Definition at line 48 of file ni_rsrc_mon.c.
| #define DYN_STR_BUF_CHUNK_SIZE 4096 |
Definition at line 551 of file ni_rsrc_mon.c.
| #define MAX_DEVICE_NAME_SIZE (9) |
Definition at line 47 of file ni_rsrc_mon.c.
| #define NP_LOAD (0) |
Definition at line 49 of file ni_rsrc_mon.c.
| #define PCIE_LOAD (2) |
Definition at line 51 of file ni_rsrc_mon.c.
| #define TP_LOAD (1) |
Definition at line 50 of file ni_rsrc_mon.c.
| typedef struct dyn_str_buf dyn_str_buf_t |
| enum outFormat |
| Enumerator | |
|---|---|
| FMT_TEXT | |
| FMT_FULL_TEXT | |
| FMT_JSON | |
| FMT_TEXT | |
| FMT_FULL_TEXT | |
| FMT_SIMPLE_TEXT | |
| FMT_JSON | |
| FMT_JSON1 | |
| FMT_JSON2 | |
| FMT_EXTRA | |
Definition at line 68 of file ni_rsrc_mon.c.
| int argToI | ( | char * | numArray | ) |
convert number from argv input to integer if safe
| char | *numArray |
Definition at line 236 of file ni_rsrc_mon.c.
| void clear_dyn_str_buf | ( | dyn_str_buf_t * | dyn_str_buf | ) |
Definition at line 627 of file ni_rsrc_mon.c.
| int compareInt32_t | ( | const void * | a, |
| const void * | b | ||
| ) |
compare two int32_t for qsort
| [in] | const | void *a |
| [in] | const | void *b |
Definition at line 267 of file ni_rsrc_mon.c.
| void dump_fw_log | ( | ni_device_queue_t * | coders, |
| ni_session_context_t * | sessionCtxt, | ||
| int | devid | ||
| ) |
Definition at line 477 of file ni_rsrc_mon.c.
| unsigned int get_modules | ( | ni_device_type_t | device_type, |
| ni_device_queue_t * | p_device_queue, | ||
| char * | device_name, | ||
| int32_t ** | module_ids | ||
| ) |
Definition at line 314 of file ni_rsrc_mon.c.
| char* get_pixel_format | ( | ni_device_context_t * | p_device_context, |
| int | index | ||
| ) |
Definition at line 274 of file ni_rsrc_mon.c.
| char* get_session_id | ( | ni_device_context_t * | p_device_context, |
| int | id | ||
| ) |
Definition at line 299 of file ni_rsrc_mon.c.
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
print out coders in their current order
Definition at line 2516 of file ni_rsrc_mon.c.
| bool open_and_get_log | ( | ni_device_context_t * | p_device_context, |
| ni_session_context_t * | p_session_context, | ||
| void ** | p_log_buffer, | ||
| bool | gen_log_file | ||
| ) |
Definition at line 447 of file ni_rsrc_mon.c.
| bool open_and_query | ( | ni_device_type_t | device_type, |
| ni_device_context_t * | p_device_context, | ||
| ni_session_context_t * | p_session_context, | ||
| char * | device_name, | ||
| int | detail, | ||
| ni_instance_mgr_detail_status_v1_t * | detail_data_v1 | ||
| ) |
Definition at line 348 of file ni_rsrc_mon.c.
| void print_extra | ( | ni_device_queue_t * | p_device_queue, |
| ni_session_context_t * | p_session_context, | ||
| int | internal_call | ||
| ) |
Definition at line 2408 of file ni_rsrc_mon.c.
| void print_full_text | ( | ni_device_queue_t * | p_device_queue, |
| ni_session_context_t * | p_session_context, | ||
| int | detail, | ||
| ni_instance_mgr_detail_status_v1_t * | detail_data_v1 | ||
| ) |
Definition at line 633 of file ni_rsrc_mon.c.
| void print_json | ( | ni_device_queue_t * | p_device_queue, |
| ni_session_context_t * | p_session_context, | ||
| int | detail, | ||
| ni_instance_mgr_detail_status_v1_t * | detail_data_v1 | ||
| ) |
Definition at line 1264 of file ni_rsrc_mon.c.
| void print_json1 | ( | ni_device_queue_t * | p_device_queue, |
| ni_session_context_t * | p_session_context, | ||
| int | detail, | ||
| ni_instance_mgr_detail_status_v1_t * | detail_data_v1, | ||
| int | format | ||
| ) |
Definition at line 1752 of file ni_rsrc_mon.c.
| void print_json_detail | ( | ni_device_queue_t * | p_device_queue, |
| ni_session_context_t * | p_session_context, | ||
| ni_instance_mgr_detail_status_v1_t * | detail_data_v1 | ||
| ) |
Definition at line 1112 of file ni_rsrc_mon.c.
| void print_simple_text | ( | ni_device_queue_t * | p_device_queue, |
| ni_session_context_t * | p_session_context, | ||
| int | detail, | ||
| ni_instance_mgr_detail_status_v1_t * | detail_data_v1 | ||
| ) |
Definition at line 951 of file ni_rsrc_mon.c.
| void print_text | ( | ni_device_queue_t * | coders, |
| ni_session_context_t * | sessionCtxt, | ||
| int | detail, | ||
| ni_instance_mgr_detail_status_v1_t * | detail_data_v1, | ||
| ni_instance_mgr_detail_status_v1_t(*) | previous_detail_data_p[NI_DEVICE_TYPE_XCODER_MAX], | ||
| int | checkInterval | ||
| ) |
query each coder and print out their status
libxcoder query to get status info including load and instances;
Definition at line 2198 of file ni_rsrc_mon.c.
| int remove_device_from_saved | ( | ni_device_type_t | device_type, |
| int32_t | module_id, | ||
| ni_device_handle_t | device_handle | ||
| ) |
remove one device from stored device_handles
| ni_device_type_t | device_type |
| int32_t | module_id |
| ni_device_handle_t | device_handle |
Definition at line 203 of file ni_rsrc_mon.c.
| int strcat_dyn_buf | ( | dyn_str_buf_t * | dyn_str_buf, |
| const char * | fmt, | ||
| ... | |||
| ) |
Accumulate string data in a dynamically sized buffer. This is useful to separate error messages from json and table output.
| [in] | *dyn_str_buf | pointer to structure holding dyn_str_buf info |
| [in] | *fmt | printf format specifier |
| [in] | ... | additional arguments |
Definition at line 569 of file ni_rsrc_mon.c.
| bool swap_encoder_and_uploader | ( | ni_device_type_t * | p_device_type, |
| char * | device_name | ||
| ) |
Definition at line 535 of file ni_rsrc_mon.c.
| ni_device_handle_t device_handles[NI_DEVICE_TYPE_XCODER_MAX][NI_MAX_DEVICE_CNT] = {0} |
Definition at line 59 of file ni_rsrc_mon.c.
| uint32_t* g_temp_load = NULL |
Definition at line 53 of file ni_rsrc_mon.c.
| uint32_t* g_temp_pload = NULL |
Definition at line 54 of file ni_rsrc_mon.c.
| uint32_t* g_temp_pthroughput = NULL |
Definition at line 55 of file ni_rsrc_mon.c.
| uint32_t* g_temp_sharemem = NULL |
Definition at line 56 of file ni_rsrc_mon.c.