 |
libxcoder
5.2.0
|
Go to the documentation of this file.
30 #include <sys/ioctl.h>
32 #include <sys/ioctl.h>
34 #include <sys/types.h>
57 "ERROR: ni_lat_meas_q_create() called with capacity less than 1"
66 "ERROR %d: Failed to allocate memory for "
67 "lat_meas-queue queue\n",
73 queue->
rear = capacity - 1;
80 "ERROR %d: Failed to allocate memory for "
81 "lat_meas_queue queue->array\n",
99 free(frame_time_q->
array);
135 if (queue->
size == 0)
202 uint64_t abs_time, int64_t ts_time)
207 uint32_t dequeue_count = 0;
221 while (entry->
ts_time < ts_time)
233 if ((entry == NULL) || (entry->
ts_time > ts_time))
237 }
else if (entry->
ts_time == ts_time)
Utility definitions for measuring frame/packet processing time in NETINT video processing devices.
void * ni_lat_meas_q_enqueue(ni_lat_meas_q_t *queue, ni_lat_meas_q_entry_t item)
Push an item onto the queue.
void * ni_lat_meas_q_front(ni_lat_meas_q_t *queue)
Get a pointer to front of queue.
uint64_t ni_gettime_ns(void)
void * ni_lat_meas_q_rear(ni_lat_meas_q_t *queue)
Get a pointer to rear of queue.
void * ni_lat_meas_q_add_entry(ni_lat_meas_q_t *frame_time_q, uint64_t abs_time, int64_t ts_time)
Add a new entry to latency queue.
uint64_t last_benchmark_time
uint64_t ni_lat_meas_q_check_latency(ni_lat_meas_q_t *frame_time_q, uint64_t abs_time, int64_t ts_time)
Check latency of a frame referenced by its timestamp.
void ni_log(ni_log_level_t level, const char *fmt,...)
print log message using ni_log_callback
ni_lat_meas_q_t * ni_lat_meas_q_create(int capacity)
Create a latency measurement queue object of a given capacity.
void ni_lat_meas_q_destroy(ni_lat_meas_q_t *frame_time_q)
Destroy a latency measurement queue object.
ni_lat_meas_q_entry_t * array
void * ni_lat_meas_q_dequeue(ni_lat_meas_q_t *queue)
Pop an item from the queue.