libxcoder 5.6.0
Loading...
Searching...
No Matches
ni_lat_meas.h
Go to the documentation of this file.
1/*******************************************************************************
2 *
3 * Copyright (C) 2022 NETINT Technologies
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a copy
6 * of this software and associated documentation files (the "Software"), to deal
7 * in the Software without restriction, including without limitation the rights
8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 * copies of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18 * SOFTWARE.
19 *
20 ******************************************************************************/
21
22/*!*****************************************************************************
23 * \file ni_lat_meas.h
24 *
25 * \brief Utility definitions for measuring frame/packet processing time in
26 * NETINT video processing devices
27 ******************************************************************************/
28
29#pragma once
30
31#include <stdint.h>
32
38
45
46// NI latency measurement queue operations
48
49void ni_lat_meas_q_destroy(ni_lat_meas_q_t *frame_time_q);
50
51void *ni_lat_meas_q_add_entry(ni_lat_meas_q_t *frame_time_q, uint64_t abs_time,
52 int64_t ts_time);
53
54uint64_t ni_lat_meas_q_check_latency(ni_lat_meas_q_t *frame_time_q,
55 uint64_t abs_time, int64_t ts_time);
ni_lat_meas_q_t * ni_lat_meas_q_create(int capacity)
Create a latency measurement queue object of a given capacity.
Definition ni_lat_meas.c:52
void ni_lat_meas_q_destroy(ni_lat_meas_q_t *frame_time_q)
Destroy a latency measurement queue object.
Definition ni_lat_meas.c:97
struct _ni_lat_meas_q_t ni_lat_meas_q_t
struct _ni_lat_meas_q_entry_t ni_lat_meas_q_entry_t
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 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.
Definition ni_lat_meas.h:34
int64_t ts_time
Definition ni_lat_meas.h:36
uint64_t abs_timenano
Definition ni_lat_meas.h:35
uint64_t last_benchmark_time
Definition ni_lat_meas.h:42
ni_lat_meas_q_entry_t * array
Definition ni_lat_meas.h:43