Line data Source code
1 : /* SPDX-License-Identifier: LGPL-2.1-only */
2 : /**
3 : * Copyright (C) 2021 Wook Song <wook16.song@samsung.com>
4 : */
5 : /**
6 : * @file mqttsink.c
7 : * @date 09 Mar 2021
8 : * @brief Register sub-plugins included in libgstmqtt
9 : * @see https://github.com/nnstreamer/nnstreamer
10 : * @author Wook Song <wook16.song@samsung.com>
11 : * @bug No known bugs except for NYI items
12 : */
13 :
14 : #include <gst/gst.h>
15 :
16 : #include "mqttcommon.h"
17 : #include "mqttsink.h"
18 : #include "mqttsrc.h"
19 :
20 : /**
21 : * @brief The entry point of the GStreamer MQTT plugin
22 : */
23 : static gboolean
24 22 : plugin_init (GstPlugin * plugin)
25 : {
26 22 : if (!gst_element_register (plugin, GST_MQTT_ELEM_NAME_SINK, GST_RANK_NONE,
27 : GST_TYPE_MQTT_SINK)) {
28 0 : return FALSE;
29 : }
30 :
31 22 : if (!gst_element_register (plugin, GST_MQTT_ELEM_NAME_SRC, GST_RANK_NONE,
32 : GST_TYPE_MQTT_SRC)) {
33 0 : return FALSE;
34 : }
35 :
36 22 : return TRUE;
37 : }
38 :
39 : #ifndef PACKAGE
40 : #define PACKAGE GST_MQTT_PACKAGE
41 : #endif
42 :
43 22 : GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, mqtt,
44 : "A collection of GStreamer plugins to support MQTT",
45 : plugin_init, VERSION, "LGPL", PACKAGE,
46 : "https://github.com/nnstreamer/nnstreamer")
|