Doxygen Book
edge_sink.c File Reference

Publish incoming streams. More...

#include "edge_sink.h"
Include dependency graph for edge_sink.c:

Go to the source code of this file.

Macros

#define GST_CAT_DEFAULT   gst_edgesink_debug
 
#define DEFAULT_MQTT_HOST   "127.0.0.1"
 
#define DEFAULT_MQTT_PORT   1883
 
#define gst_edgesink_parent_class   parent_class
 

Enumerations

enum  {
  PROP_0, PROP_HOST, PROP_PORT, PROP_DEST_HOST,
  PROP_DEST_PORT, PROP_CONNECT_TYPE, PROP_TOPIC, PROP_WAIT_CONNECTION,
  PROP_CONNECTION_TIMEOUT, PROP_CUSTOM_LIB, PROP_LAST
}
 edgesink properties More...
 

Functions

 GST_DEBUG_CATEGORY_STATIC (gst_edgesink_debug)
 
 G_DEFINE_TYPE (GstEdgeSink, gst_edgesink, GST_TYPE_BASE_SINK)
 
static void gst_edgesink_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
 set property More...
 
static void gst_edgesink_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
 get property More...
 
static void gst_edgesink_finalize (GObject *object)
 finalize the object More...
 
static gboolean gst_edgesink_start (GstBaseSink *basesink)
 start processing of edgesink More...
 
static gboolean gst_edgesink_stop (GstBaseSink *basesink)
 Stop processing of edgesink. More...
 
static GstFlowReturn gst_edgesink_render (GstBaseSink *basesink, GstBuffer *buffer)
 render buffer, send buffer More...
 
static gboolean gst_edgesink_set_caps (GstBaseSink *basesink, GstCaps *caps)
 An implementation of the set_caps vmethod in GstBaseSinkClass. More...
 
static gchar * gst_edgesink_get_host (GstEdgeSink *self)
 getter for the 'host' property. More...
 
static void gst_edgesink_set_host (GstEdgeSink *self, const gchar *host)
 setter for the 'host' property. More...
 
static guint16 gst_edgesink_get_port (GstEdgeSink *self)
 getter for the 'port' property. More...
 
static void gst_edgesink_set_port (GstEdgeSink *self, const guint16 port)
 setter for the 'port' property. More...
 
static nns_edge_connect_type_e gst_edgesink_get_connect_type (GstEdgeSink *self)
 getter for the 'connect_type' property. More...
 
static void gst_edgesink_set_connect_type (GstEdgeSink *self, const nns_edge_connect_type_e connect_type)
 setter for the 'connect_type' property. More...
 
static void gst_edgesink_class_init (GstEdgeSinkClass *klass)
 initialize the class More...
 
static void gst_edgesink_init (GstEdgeSink *self)
 initialize the new element More...
 
static int _nns_edge_event_cb (nns_edge_event_h event_h, void *user_data)
 nnstreamer-edge event callback. More...
 
static gboolean _wait_connection (GstEdgeSink *sink)
 If wait-connection is enabled, wait for connection until the connection is established or timeout occurs. Otherwise, return immediately. More...
 

Variables

static GstStaticPadTemplate sinktemplate
 the capabilities of the inputs. More...
 

Detailed Description

Publish incoming streams.

Copyright (C) 2022 Samsung Electronics Co., Ltd.

Date
01 Aug 2022
Author
Yechan Choi yecha.nosp@m.n9.c.nosp@m.hoi@s.nosp@m.amsu.nosp@m.ng.co.nosp@m.m
See also
http://github.com/nnstreamer/nnstreamer
Bug:
No known bugs

Definition in file edge_sink.c.

Macro Definition Documentation

◆ DEFAULT_MQTT_HOST

#define DEFAULT_MQTT_HOST   "127.0.0.1"

Definition at line 49 of file edge_sink.c.

◆ DEFAULT_MQTT_PORT

#define DEFAULT_MQTT_PORT   1883

Definition at line 50 of file edge_sink.c.

◆ GST_CAT_DEFAULT

#define GST_CAT_DEFAULT   gst_edgesink_debug

Definition at line 20 of file edge_sink.c.

◆ gst_edgesink_parent_class

#define gst_edgesink_parent_class   parent_class

Definition at line 52 of file edge_sink.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

edgesink properties

Enumerator
PROP_0 
PROP_HOST 
PROP_PORT 
PROP_DEST_HOST 
PROP_DEST_PORT 
PROP_CONNECT_TYPE 
PROP_TOPIC 
PROP_WAIT_CONNECTION 
PROP_CONNECTION_TIMEOUT 
PROP_CUSTOM_LIB 
PROP_LAST 

Definition at line 33 of file edge_sink.c.

Function Documentation

◆ _nns_edge_event_cb()

static int _nns_edge_event_cb ( nns_edge_event_h  event_h,
void *  user_data 
)
static

nnstreamer-edge event callback.

Definition at line 306 of file edge_sink.c.

Here is the caller graph for this function:

◆ _wait_connection()

static gboolean _wait_connection ( GstEdgeSink sink)
static

If wait-connection is enabled, wait for connection until the connection is established or timeout occurs. Otherwise, return immediately.

Definition at line 400 of file edge_sink.c.

Here is the caller graph for this function:

◆ G_DEFINE_TYPE()

G_DEFINE_TYPE ( GstEdgeSink  ,
gst_edgesink  ,
GST_TYPE_BASE_SINK   
)

◆ GST_DEBUG_CATEGORY_STATIC()

GST_DEBUG_CATEGORY_STATIC ( gst_edgesink_debug  )

◆ gst_edgesink_class_init()

static void gst_edgesink_class_init ( GstEdgeSinkClass klass)
static

initialize the class

Definition at line 84 of file edge_sink.c.

Here is the call graph for this function:

◆ gst_edgesink_finalize()

static void gst_edgesink_finalize ( GObject *  object)
static

finalize the object

Definition at line 275 of file edge_sink.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gst_edgesink_get_connect_type()

static nns_edge_connect_type_e gst_edgesink_get_connect_type ( GstEdgeSink self)
static

getter for the 'connect_type' property.

Definition at line 589 of file edge_sink.c.

Here is the caller graph for this function:

◆ gst_edgesink_get_host()

static gchar * gst_edgesink_get_host ( GstEdgeSink self)
static

getter for the 'host' property.

Definition at line 551 of file edge_sink.c.

Here is the caller graph for this function:

◆ gst_edgesink_get_port()

static guint16 gst_edgesink_get_port ( GstEdgeSink self)
static

getter for the 'port' property.

Definition at line 571 of file edge_sink.c.

Here is the caller graph for this function:

◆ gst_edgesink_get_property()

static void gst_edgesink_get_property ( GObject *  object,
guint  prop_id,
GValue *  value,
GParamSpec *  pspec 
)
static

get property

Definition at line 232 of file edge_sink.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gst_edgesink_init()

static void gst_edgesink_init ( GstEdgeSink self)
static

initialize the new element

Definition at line 158 of file edge_sink.c.

◆ gst_edgesink_render()

static GstFlowReturn gst_edgesink_render ( GstBaseSink *  basesink,
GstBuffer *  buffer 
)
static

render buffer, send buffer

Definition at line 450 of file edge_sink.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gst_edgesink_set_caps()

static gboolean gst_edgesink_set_caps ( GstBaseSink *  basesink,
GstCaps *  caps 
)
static

An implementation of the set_caps vmethod in GstBaseSinkClass.

Definition at line 524 of file edge_sink.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gst_edgesink_set_connect_type()

static void gst_edgesink_set_connect_type ( GstEdgeSink self,
const nns_edge_connect_type_e  connect_type 
)
static

setter for the 'connect_type' property.

Definition at line 598 of file edge_sink.c.

Here is the caller graph for this function:

◆ gst_edgesink_set_host()

static void gst_edgesink_set_host ( GstEdgeSink self,
const gchar *  host 
)
static

setter for the 'host' property.

Definition at line 560 of file edge_sink.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gst_edgesink_set_port()

static void gst_edgesink_set_port ( GstEdgeSink self,
const guint16  port 
)
static

setter for the 'port' property.

Definition at line 580 of file edge_sink.c.

Here is the caller graph for this function:

◆ gst_edgesink_set_property()

static void gst_edgesink_set_property ( GObject *  object,
guint  prop_id,
const GValue *  value,
GParamSpec *  pspec 
)
static

set property

Definition at line 178 of file edge_sink.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gst_edgesink_start()

static gboolean gst_edgesink_start ( GstBaseSink *  basesink)
static

start processing of edgesink

Definition at line 338 of file edge_sink.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gst_edgesink_stop()

static gboolean gst_edgesink_stop ( GstBaseSink *  basesink)
static

Stop processing of edgesink.

Definition at line 432 of file edge_sink.c.

Here is the caller graph for this function:

Variable Documentation

◆ sinktemplate

GstStaticPadTemplate sinktemplate
static
Initial value:
= GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS_ANY)

the capabilities of the inputs.

Definition at line 25 of file edge_sink.c.