Doxygen Book
mqttsrc.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: LGPL-2.1-only */
14 #ifndef __GST_MQTT_SRC_H__
15 #define __GST_MQTT_SRC_H__
16 #include <gst/base/gstbasesrc.h>
17 #include <gst/base/gstdataqueue.h>
18 #include <gst/gst.h>
19 #include <MQTTAsync.h>
20 
21 #include "mqttcommon.h"
22 
23 G_BEGIN_DECLS
24 
25 #define GST_TYPE_MQTT_SRC \
26  (gst_mqtt_src_get_type())
27 #define GST_MQTT_SRC(obj) \
28  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_MQTT_SRC, GstMqttSrc))
29 #define GST_IS_MQTT_SRC(obj) \
30  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_MQTT_SRC))
31 #define GST_MQTT_SRC_CAST(obj) \
32  ((GstMqttSrc *) obj)
33 #define GST_MQTT_SRC_CLASS(klass) \
34  (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_MQTT_SRC, GstMqttSrcClass))
35 #define GST_IS_MQTT_SRC_CLASS(klass) \
36  (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_MQTT_SRC))
37 
38 typedef struct _GstMqttSrc GstMqttSrc;
40 
46 struct _GstMqttSrc {
47  GstBaseSrc parent;
48  GstCaps *caps;
50  GError *err;
52  GstClockTime latency;
56  gchar *mqtt_topic;
58  gboolean debug;
59  gboolean is_live;
60  guint64 num_dumped;
61  gint mqtt_qos;
62 
63  GAsyncQueue *aqueue;
66  gboolean is_connected;
67  gboolean is_subscribed;
68 
69  MQTTAsync mqtt_client_handle;
70  MQTTAsync_connectOptions mqtt_conn_opts;
71  MQTTAsync_responseOptions mqtt_respn_opts;
72 };
73 
80  GstBaseSrcClass parent_class;
81 };
82 
83 GType gst_mqtt_src_get_type (void);
84 
85 G_END_DECLS
86 #endif /* !__GST_MQTT_SRC_H__ */
_GstMqttSrc::is_connected
gboolean is_connected
Definition: mqttsrc.h:66
_GstMqttSrc::mqtt_sub_timeout
gint64 mqtt_sub_timeout
Definition: mqttsrc.h:57
_GstMqttSrc::latency
GstClockTime latency
Definition: mqttsrc.h:52
_GstMqttSrc
GstMqttSrc data structure.
Definition: mqttsrc.h:46
_GstMqttSrc::mqtt_conn_opts
MQTTAsync_connectOptions mqtt_conn_opts
Definition: mqttsrc.h:70
_GstMqttSrc::base_time_epoch
gint64 base_time_epoch
Definition: mqttsrc.h:51
_GstMqttSrc::mqtt_topic
gchar * mqtt_topic
Definition: mqttsrc.h:56
_GstMqttSrc::gquark_err_tag
GQuark gquark_err_tag
Definition: mqttsrc.h:49
_GstMqttSrc::mqtt_respn_opts
MQTTAsync_responseOptions mqtt_respn_opts
Definition: mqttsrc.h:71
gst_mqtt_src_get_type
GType gst_mqtt_src_get_type(void)
_GstMqttSrcClass::parent_class
GstBaseSrcClass parent_class
Definition: mqttsrc.h:80
_GstMqttSrc::caps
GstCaps * caps
Definition: mqttsrc.h:48
_GstMqttSrc::mqtt_host_address
gchar * mqtt_host_address
Definition: mqttsrc.h:54
_GstMqttSrc::aqueue
GAsyncQueue * aqueue
Definition: mqttsrc.h:63
_GstMqttSrc::debug
gboolean debug
Definition: mqttsrc.h:58
_GstMqttSrc::err
GError * err
Definition: mqttsrc.h:50
_GstMqttSrc::mqtt_host_port
gchar * mqtt_host_port
Definition: mqttsrc.h:55
_GstMqttSrc::mqtt_src_gcond
GCond mqtt_src_gcond
Definition: mqttsrc.h:65
_GstMqttSrc::mqtt_client_id
gchar * mqtt_client_id
Definition: mqttsrc.h:53
_GstMqttSrc::parent
GstBaseSrc parent
Definition: mqttsrc.h:47
_GstMqttSrc::is_live
gboolean is_live
Definition: mqttsrc.h:59
_GstMqttSrc::is_subscribed
gboolean is_subscribed
Definition: mqttsrc.h:67
mqttcommon.h
Common macros and utility functions for GStreamer MQTT plugins.
_GstMqttSrcClass
GstMqttSrcClass data structure.
Definition: mqttsrc.h:79
_GstMqttSrc::mqtt_src_mutex
GMutex mqtt_src_mutex
Definition: mqttsrc.h:64
_GstMqttSrc::mqtt_client_handle
MQTTAsync mqtt_client_handle
Definition: mqttsrc.h:69
_GstMqttSrc::mqtt_qos
gint mqtt_qos
Definition: mqttsrc.h:61
_GstMqttSrc::num_dumped
guint64 num_dumped
Definition: mqttsrc.h:60