Doxygen Book
mqttcommon.h File Reference

Common macros and utility functions for GStreamer MQTT plugins. More...

#include <stdint.h>
Include dependency graph for mqttcommon.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _GstMQTTMessageHdr
 Defined a custom data type, GstMQTTMessageHdr. More...
 

Macros

#define UNUSED(expr)   do { (void)(expr); } while (0)
 
#define GST_MQTT_PACKAGE   "GStreamer MQTT Plugins"
 
#define GST_MQTT_ELEM_NAME_SINK   "mqttsink"
 
#define GST_MQTT_ELEM_NAME_SRC   "mqttsrc"
 
#define GST_MQTT_LEN_MSG_HDR   1024
 
#define GST_MQTT_MAX_LEN_GST_CAPS_STR   512
 
#define GST_MQTT_MAX_NUM_MEMS   16
 GST_BUFFER_MEM_MAX in gstreamer/gstbuffer.c is 16. To represent each size of the memory block that the GstBuffer contains, GST_MQTT_MAX_NUM_MEMS should be 16. More...
 
#define GST_US_TO_NS_MULTIPLIER   1000
 
#define DEFAULT_MQTT_CONN_TIMEOUT_SEC   5
 

Typedefs

typedef struct _GstMQTTMessageHdr GstMQTTMessageHdr
 Defined a custom data type, GstMQTTMessageHdr. More...
 
typedef int64_t(* mqtt_get_unix_epoch) (uint32_t, char **, uint16_t *)
 

Functions

static int64_t default_mqtt_get_unix_epoch (uint32_t hnum, char **hnames, uint16_t *hports)
 A wrapper function of g_get_real_time () to assign it to the function pointer, mqtt_get_unix_epoch. More...
 

Detailed Description

Common macros and utility functions for GStreamer MQTT plugins.

Copyright (C) 2021 Wook Song wook1.nosp@m.6.so.nosp@m.ng@sa.nosp@m.msun.nosp@m.g.com

Date
08 Mar 2021
See also
https://github.com/nnstreamer/nnstreamer
Author
Wook Song wook1.nosp@m.6.so.nosp@m.ng@sa.nosp@m.msun.nosp@m.g.com
Bug:
No known bugs except for NYI items

Definition in file mqttcommon.h.

Macro Definition Documentation

◆ DEFAULT_MQTT_CONN_TIMEOUT_SEC

#define DEFAULT_MQTT_CONN_TIMEOUT_SEC   5

Definition at line 40 of file mqttcommon.h.

◆ GST_MQTT_ELEM_NAME_SINK

#define GST_MQTT_ELEM_NAME_SINK   "mqttsink"

Definition at line 26 of file mqttcommon.h.

◆ GST_MQTT_ELEM_NAME_SRC

#define GST_MQTT_ELEM_NAME_SRC   "mqttsrc"

Definition at line 27 of file mqttcommon.h.

◆ GST_MQTT_LEN_MSG_HDR

#define GST_MQTT_LEN_MSG_HDR   1024

Definition at line 29 of file mqttcommon.h.

◆ GST_MQTT_MAX_LEN_GST_CAPS_STR

#define GST_MQTT_MAX_LEN_GST_CAPS_STR   512

Definition at line 30 of file mqttcommon.h.

◆ GST_MQTT_MAX_NUM_MEMS

#define GST_MQTT_MAX_NUM_MEMS   16

GST_BUFFER_MEM_MAX in gstreamer/gstbuffer.c is 16. To represent each size of the memory block that the GstBuffer contains, GST_MQTT_MAX_NUM_MEMS should be 16.

Definition at line 36 of file mqttcommon.h.

◆ GST_MQTT_PACKAGE

#define GST_MQTT_PACKAGE   "GStreamer MQTT Plugins"

Definition at line 23 of file mqttcommon.h.

◆ GST_US_TO_NS_MULTIPLIER

#define GST_US_TO_NS_MULTIPLIER   1000

Definition at line 38 of file mqttcommon.h.

◆ UNUSED

#define UNUSED (   expr)    do { (void)(expr); } while (0)

Definition at line 19 of file mqttcommon.h.

Typedef Documentation

◆ GstMQTTMessageHdr

Defined a custom data type, GstMQTTMessageHdr.

GstMQTTMessageHdr contains the information needed to parse the message data at the subscriber side and is prepended to the original message data at the publisher side.

◆ mqtt_get_unix_epoch

typedef int64_t(* mqtt_get_unix_epoch) (uint32_t, char **, uint16_t *)

Definition at line 65 of file mqttcommon.h.

Function Documentation

◆ default_mqtt_get_unix_epoch()

static int64_t default_mqtt_get_unix_epoch ( uint32_t  hnum,
char **  hnames,
uint16_t *  hports 
)
inlinestatic

A wrapper function of g_get_real_time () to assign it to the function pointer, mqtt_get_unix_epoch.

Definition at line 71 of file mqttcommon.h.

Here is the caller graph for this function: