NVIDIA DeepStream SDK API Reference

7.0 Release
gstnvmsgbroker.h
Go to the documentation of this file.
1 
13 #ifndef _GST_NVMSGBROKER_H_
14 #define _GST_NVMSGBROKER_H_
15 
16 #include <gst/base/gstbasesink.h>
17 #include "nvds_msgapi.h"
18 #include "nvmsgbroker.h"
19 
20 G_BEGIN_DECLS
21 
22 #define GST_TYPE_NVMSGBROKER (gst_nvmsgbroker_get_type())
23 #define GST_NVMSGBROKER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_NVMSGBROKER,GstNvMsgBroker))
24 #define GST_NVMSGBROKER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_NVMSGBROKER,GstNvMsgBrokerClass))
25 #define GST_IS_NVMSGBROKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_NVMSGBROKER))
26 #define GST_IS_NVMSGBROKER_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_NVMSGBROKER))
27 
30 
31 typedef NvDsMsgApiHandle (*nvds_msgapi_connect_ptr)(const char *connection_str,
32  nvds_msgapi_connect_cb_t connect_cb, const char *config_path);
33 
34 typedef NvDsMsgApiErrorType (*nvds_msgapi_send_ptr)(NvDsMsgApiHandle conn, const char *topic,
35  const uint8_t *payload, size_t nbuf);
36 
38  char *topic, const uint8_t *payload, size_t nbuf,
39  nvds_msgapi_send_cb_t send_callback, void *user_ptr);
40 
41 typedef void (*nvds_msgapi_do_work_ptr) (NvDsMsgApiHandle h_ptr);
42 
44 
46 {
47  GstBaseSink parent;
48 
49  GQuark dsMetaQuark;
50 
51  // Classic support via NvDsMsgApi
52  gpointer libHandle;
53  gchar *configFile;
54  gchar *protoLib;
55  gchar *connStr;
56  gchar *topic;
57  guint compId;
58  guint sleepTime;
62  gboolean is_video;
63  GMutex flowLock;
64  GCond flowCond;
65  GThread *doWorkThread;
66  gboolean isRunning;
67  gboolean asyncSend;
75 
76  // New experimental support via NvMsgBroker lib
77  gboolean newAPI;
80 };
81 
83 {
84  GstBaseSinkClass parent_class;
85 };
86 
87 GType gst_nvmsgbroker_get_type (void);
88 
89 G_END_DECLS
90 
91 #endif
NvMsgBrokerClientHandle
void * NvMsgBrokerClientHandle
Definition: nvmsgbroker.h:53
_GstNvMsgBroker
Definition: gstnvmsgbroker.h:45
nvds_msgapi.h
nvds_msgapi_connect_cb_t
void(* nvds_msgapi_connect_cb_t)(NvDsMsgApiHandle h_ptr, NvDsMsgApiEventType ds_evt)
Type definition for a "handle" callback.
Definition: nvds_msgapi.h:98
NvDsMsgApiErrorType
NvDsMsgApiErrorType
Defines completion codes for operations in the messaging API.
Definition: nvds_msgapi.h:57
nvds_msgapi_send_ptr
NvDsMsgApiErrorType(* nvds_msgapi_send_ptr)(NvDsMsgApiHandle conn, const char *topic, const uint8_t *payload, size_t nbuf)
Definition: gstnvmsgbroker.h:34
gst_nvmsgbroker_get_type
GType gst_nvmsgbroker_get_type(void)
nvmsgbroker.h
_GstNvMsgBroker::lastError
NvDsMsgApiErrorType lastError
Definition: gstnvmsgbroker.h:69
_GstNvMsgBroker::pendingCbCount
gint pendingCbCount
Definition: gstnvmsgbroker.h:68
_GstNvMsgBroker::parent
GstBaseSink parent
Definition: gstnvmsgbroker.h:47
_GstNvMsgBroker::topic
gchar * topic
Definition: gstnvmsgbroker.h:56
_GstNvMsgBroker::asyncSend
gboolean asyncSend
Definition: gstnvmsgbroker.h:67
_GstNvMsgBroker::newConnHandle
NvMsgBrokerClientHandle newConnHandle
Definition: gstnvmsgbroker.h:78
_GstNvMsgBroker::is_video
gboolean is_video
Identifies from input cap capability if the incoming data is video/audio.
Definition: gstnvmsgbroker.h:62
_GstNvMsgBroker::flowCond
GCond flowCond
Definition: gstnvmsgbroker.h:64
_GstNvMsgBroker::newAPI
gboolean newAPI
Definition: gstnvmsgbroker.h:77
NvDsMsgApiHandle
void * NvDsMsgApiHandle
Defines the handle used by messaging API functions.
Definition: nvds_msgapi.h:40
_GstNvMsgBroker::doWorkThread
GThread * doWorkThread
Definition: gstnvmsgbroker.h:65
_GstNvMsgBroker::connStr
gchar * connStr
Definition: gstnvmsgbroker.h:55
_GstNvMsgBroker::flowLock
GMutex flowLock
Definition: gstnvmsgbroker.h:63
_GstNvMsgBroker::compId
guint compId
Definition: gstnvmsgbroker.h:57
_GstNvMsgBroker::nvds_msgapi_disconnect
nvds_msgapi_disconnect_ptr nvds_msgapi_disconnect
Definition: gstnvmsgbroker.h:74
_GstNvMsgBroker::newLastError
NvMsgBrokerErrorType newLastError
Definition: gstnvmsgbroker.h:79
_GstNvMsgBroker::nvds_msgapi_connect
nvds_msgapi_connect_ptr nvds_msgapi_connect
Definition: gstnvmsgbroker.h:70
_GstNvMsgBroker::nvds_msgapi_send_async
nvds_msgapi_send_async_ptr nvds_msgapi_send_async
Definition: gstnvmsgbroker.h:72
_GstNvMsgBroker::sleepTime
guint sleepTime
Definition: gstnvmsgbroker.h:58
_GstNvMsgBroker::configFile
gchar * configFile
Definition: gstnvmsgbroker.h:53
_GstNvMsgBroker::nvds_msgapi_do_work
nvds_msgapi_do_work_ptr nvds_msgapi_do_work
Definition: gstnvmsgbroker.h:73
_GstNvMsgBroker::dsMetaQuark
GQuark dsMetaQuark
Definition: gstnvmsgbroker.h:49
_GstNvMsgBrokerClass
Definition: gstnvmsgbroker.h:82
nvds_msgapi_connect_ptr
NvDsMsgApiHandle(* nvds_msgapi_connect_ptr)(const char *connection_str, nvds_msgapi_connect_cb_t connect_cb, const char *config_path)
Definition: gstnvmsgbroker.h:31
nvds_msgapi_do_work_ptr
void(* nvds_msgapi_do_work_ptr)(NvDsMsgApiHandle h_ptr)
Definition: gstnvmsgbroker.h:41
nvds_msgapi_disconnect_ptr
NvDsMsgApiErrorType(* nvds_msgapi_disconnect_ptr)(NvDsMsgApiHandle conn)
Definition: gstnvmsgbroker.h:43
nvds_msgapi_send_cb_t
void(* nvds_msgapi_send_cb_t)(void *user_ptr, NvDsMsgApiErrorType completion_flag)
Type definition for a "send" callback.
Definition: nvds_msgapi.h:71
nvds_msgapi_send_async_ptr
NvDsMsgApiErrorType(* nvds_msgapi_send_async_ptr)(NvDsMsgApiHandle h_ptr, char *topic, const uint8_t *payload, size_t nbuf, nvds_msgapi_send_cb_t send_callback, void *user_ptr)
Definition: gstnvmsgbroker.h:37
NvMsgBrokerErrorType
NvMsgBrokerErrorType
Definition: nvmsgbroker.h:33
_GstNvMsgBroker::nvds_msgapi_send
nvds_msgapi_send_ptr nvds_msgapi_send
Definition: gstnvmsgbroker.h:71
_GstNvMsgBroker::connHandle
NvMsgBrokerClientHandle connHandle
Definition: gstnvmsgbroker.h:59
_GstNvMsgBroker::isRunning
gboolean isRunning
Definition: gstnvmsgbroker.h:66
_GstNvMsgBrokerClass::parent_class
GstBaseSinkClass parent_class
Definition: gstnvmsgbroker.h:84
_GstNvMsgBroker::libHandle
gpointer libHandle
Definition: gstnvmsgbroker.h:52
_GstNvMsgBroker::protoLib
gchar * protoLib
Definition: gstnvmsgbroker.h:54