NVIDIA DeepStream SDK API Reference

6.2 Release
nvds_rest_server.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: MIT
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a
6  * copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9  * and/or sell copies of the Software, and to permit persons to whom the
10  * Software is furnished to do so, subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included in
13  * all copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21  * DEALINGS IN THE SOFTWARE.
22  */
23 
24 #ifndef _NVDS_SERVER_H_
25 #define _NVDS_SERVER_H_
26 
27 #include <string>
28 #include <vector>
29 #include <functional>
30 
31 #include "gst-nvcustomevent.h"
32 
33 typedef enum
34 {
40 
41 typedef enum
42 {
46 
47 typedef enum
48 {
52 
53 typedef enum
54 {
58 
59 typedef struct NvDsDecInfo
60 {
61  std::string root_key;
62  std::string stream_id;
65 } NvDsDecInfo;
66 
67 typedef struct NvDsRoiInfo
68 {
69  std::string root_key;
70  std::string stream_id;
71  guint roi_count;
72  std::vector < RoiDimension > vect;
74 } NvDsRoiInfo;
75 
76 typedef struct NvDsStreamInfo
77 {
78  std::string key;
79  std::string value_camera_id;
80  std::string value_camera_name;
81  std::string value_camera_url;
82  std::string value_change;
83 
84  std::string metadata_resolution;
85  std::string metadata_codec;
86  std::string metadata_framerate;
87 
88  std::string headers_source;
89  std::string headers_created_at;
92 
93 typedef struct NvDsInferInfo
94 {
95  std::string root_key;
96  std::string stream_id;
97  guint interval;
100 
101 typedef struct NvDsResponseInfo
102 {
103  std::string status;
104  std::string reason;
106 
107 typedef struct NvDsServerConfig
108 {
109  std::string ip;
110  std::string port;
112 
113 typedef struct NvDsServerCallbacks
114 {
115  std::function < void (NvDsRoiInfo * roi_info, void *ctx) > roi_cb;
116  std::function < void (NvDsDecInfo * dec_info, void *ctx) > dec_cb;
117  std::function < void (NvDsStreamInfo * stream_info, void *ctx) > stream_cb;
118  std::function < void (NvDsInferInfo * infer_info, void *ctx) > infer_cb;
120 
121 class NvDsRestServer;
122 NvDsRestServer* nvds_rest_server_start (NvDsServerConfig * server_config, NvDsServerCallbacks * server_cb);
123 void nvds_rest_server_stop (NvDsRestServer *ctx);
124 
125 #endif
NvDsStreamInfo::metadata_resolution
std::string metadata_resolution
Definition: nvds_rest_server.h:84
NvDsStreamInfo::headers_source
std::string headers_source
Definition: nvds_rest_server.h:88
NvDsStreamInfo::metadata_codec
std::string metadata_codec
Definition: nvds_rest_server.h:85
NvDsDecInfo
struct NvDsDecInfo NvDsDecInfo
NvDsInferInfo::stream_id
std::string stream_id
Definition: nvds_rest_server.h:96
NvDsInferInfo
Definition: nvds_rest_server.h:93
NvDsResponseInfo
Definition: nvds_rest_server.h:101
ROI_UPDATE_SUCCESS
@ ROI_UPDATE_SUCCESS
Definition: nvds_rest_server.h:43
NvDsStreamInfo::value_camera_name
std::string value_camera_name
Definition: nvds_rest_server.h:80
NvDsDecInfo
Definition: nvds_rest_server.h:59
NvDsServerConfig::ip
std::string ip
Definition: nvds_rest_server.h:109
STREAM_REMOVE_FAIL
@ STREAM_REMOVE_FAIL
Definition: nvds_rest_server.h:38
NvDsInferInfo
struct NvDsInferInfo NvDsInferInfo
NvDsDecInfo::stream_id
std::string stream_id
Definition: nvds_rest_server.h:62
INFER_INTERVAL_UPDATE_SUCCESS
@ INFER_INTERVAL_UPDATE_SUCCESS
Definition: nvds_rest_server.h:55
NvDsResponseInfo
struct NvDsResponseInfo NvDsResponseInfo
NvDsStreamInfo::key
std::string key
Definition: nvds_rest_server.h:78
DROP_FRAME_INTERVAL_UPDATE_FAIL
@ DROP_FRAME_INTERVAL_UPDATE_FAIL
Definition: nvds_rest_server.h:50
NvDsServerCallbacks
Definition: nvds_rest_server.h:113
NvDsServerConfig::port
std::string port
Definition: nvds_rest_server.h:110
NvDsStreamInfo
Definition: nvds_rest_server.h:76
NvDsStreamInfo::metadata_framerate
std::string metadata_framerate
Definition: nvds_rest_server.h:86
NvDsRoiInfo::vect
std::vector< RoiDimension > vect
Definition: nvds_rest_server.h:72
NvDsRoiInfo::stream_id
std::string stream_id
Definition: nvds_rest_server.h:70
NvDsDecInfo::drop_frame_interval
guint drop_frame_interval
Definition: nvds_rest_server.h:63
NvDsStreamInfo::value_camera_url
std::string value_camera_url
Definition: nvds_rest_server.h:81
STREAM_ADD_SUCCESS
@ STREAM_ADD_SUCCESS
Definition: nvds_rest_server.h:35
NvDsInferInfo::root_key
std::string root_key
Definition: nvds_rest_server.h:95
NvDsServerCallbacks::infer_cb
std::function< void(NvDsInferInfo *infer_info, void *ctx) > infer_cb
Definition: nvds_rest_server.h:118
NvDsServerConfig
struct NvDsServerConfig NvDsServerConfig
NvDsServerConfig
Definition: nvds_rest_server.h:107
NvDsDecInfo::status
NvDsDecStatus status
Definition: nvds_rest_server.h:64
INFER_INTERVAL_UPDATE_FAIL
@ INFER_INTERVAL_UPDATE_FAIL
Definition: nvds_rest_server.h:56
NvDsStreamInfo
struct NvDsStreamInfo NvDsStreamInfo
NvDsStreamStatus
NvDsStreamStatus
Definition: nvds_rest_server.h:33
NvDsResponseInfo::reason
std::string reason
Definition: nvds_rest_server.h:104
NvDsDecStatus
NvDsDecStatus
Definition: nvds_rest_server.h:47
STREAM_REMOVE_SUCCESS
@ STREAM_REMOVE_SUCCESS
Definition: nvds_rest_server.h:37
NvDsStreamInfo::value_camera_id
std::string value_camera_id
Definition: nvds_rest_server.h:79
NvDsServerCallbacks::stream_cb
std::function< void(NvDsStreamInfo *stream_info, void *ctx) > stream_cb
Definition: nvds_rest_server.h:117
NvDsRoiInfo
struct NvDsRoiInfo NvDsRoiInfo
NvDsRoiInfo
Definition: nvds_rest_server.h:67
NvDsStreamInfo::status
NvDsStreamStatus status
Definition: nvds_rest_server.h:90
NvDsServerCallbacks::roi_cb
std::function< void(NvDsRoiInfo *roi_info, void *ctx) > roi_cb
Definition: nvds_rest_server.h:115
nvds_rest_server_stop
void nvds_rest_server_stop(NvDsRestServer *ctx)
NvDsInferInfo::status
NvDsInferStatus status
Definition: nvds_rest_server.h:98
DROP_FRAME_INTERVAL_UPDATE_SUCCESS
@ DROP_FRAME_INTERVAL_UPDATE_SUCCESS
Definition: nvds_rest_server.h:49
NvDsResponseInfo::status
std::string status
Definition: nvds_rest_server.h:103
NvDsInferInfo::interval
guint interval
Definition: nvds_rest_server.h:97
NvDsRoiInfo::roi_count
guint roi_count
Definition: nvds_rest_server.h:71
NvDsStreamInfo::value_change
std::string value_change
Definition: nvds_rest_server.h:82
nvds_rest_server_start
NvDsRestServer * nvds_rest_server_start(NvDsServerConfig *server_config, NvDsServerCallbacks *server_cb)
NvDsInferStatus
NvDsInferStatus
Definition: nvds_rest_server.h:53
gst-nvcustomevent.h
NvDsRoiInfo::root_key
std::string root_key
Definition: nvds_rest_server.h:69
NvDsServerCallbacks::dec_cb
std::function< void(NvDsDecInfo *dec_info, void *ctx) > dec_cb
Definition: nvds_rest_server.h:116
NvDsRoiInfo::status
NvDsRoiStatus status
Definition: nvds_rest_server.h:73
NvDsStreamInfo::headers_created_at
std::string headers_created_at
Definition: nvds_rest_server.h:89
NvDsDecInfo::root_key
std::string root_key
Definition: nvds_rest_server.h:61
ROI_UPDATE_FAIL
@ ROI_UPDATE_FAIL
Definition: nvds_rest_server.h:44
NvDsServerCallbacks
struct NvDsServerCallbacks NvDsServerCallbacks
NvDsRoiStatus
NvDsRoiStatus
Definition: nvds_rest_server.h:41
STREAM_ADD_FAIL
@ STREAM_ADD_FAIL
Definition: nvds_rest_server.h:36