Doxygen Book
tensor_query_serversrc.c File Reference

GStreamer plugin to handle tensor query_server src. More...

Include dependency graph for tensor_query_serversrc.c:

Go to the source code of this file.

Macros

#define GST_CAT_DEFAULT   gst_tensor_query_serversrc_debug
 
#define DEFAULT_PORT_SRC   3000
 
#define DEFAULT_IS_LIVE   TRUE
 
#define DEFAULT_MQTT_HOST   "127.0.0.1"
 
#define DEFAULT_MQTT_PORT   1883
 
#define DEFAULT_DATA_POP_TIMEOUT   100000U
 
#define gst_tensor_query_serversrc_parent_class   parent_class
 

Enumerations

enum  {
  PROP_0, PROP_HOST, PROP_PORT, PROP_DEST_HOST,
  PROP_DEST_PORT, PROP_CONNECT_TYPE, PROP_TIMEOUT, PROP_TOPIC,
  PROP_ID, PROP_IS_LIVE
}
 query_serversrc properties More...
 

Functions

 GST_DEBUG_CATEGORY_STATIC (gst_tensor_query_serversrc_debug)
 
 G_DEFINE_TYPE (GstTensorQueryServerSrc, gst_tensor_query_serversrc, GST_TYPE_PUSH_SRC)
 
static GstStateChangeReturn gst_tensor_query_serversrc_change_state (GstElement *element, GstStateChange transition)
 Change state of query server src. More...
 
static void gst_tensor_query_serversrc_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
 set property of query_serversrc More...
 
static void gst_tensor_query_serversrc_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
 get property of query_serversrc More...
 
static void gst_tensor_query_serversrc_finalize (GObject *object)
 finalize the query_serversrc object More...
 
static GstFlowReturn gst_tensor_query_serversrc_create (GstPushSrc *psrc, GstBuffer **outbuf)
 create query_serversrc, wait on socket and receive data More...
 
static gboolean gst_tensor_query_serversrc_set_caps (GstBaseSrc *bsrc, GstCaps *caps)
 An implementation of the set_caps vmethod in GstBaseSrcClass. More...
 
static void gst_tensor_query_serversrc_class_init (GstTensorQueryServerSrcClass *klass)
 initialize the query_serversrc class More...
 
static void gst_tensor_query_serversrc_init (GstTensorQueryServerSrc *src)
 initialize the new query_serversrc element More...
 
static int _nns_edge_event_cb (nns_edge_event_h event_h, void *user_data)
 nnstreamer-edge event callback. More...
 
static gboolean _gst_tensor_query_serversrc_start (GstTensorQueryServerSrc *src)
 start processing of query_serversrc, setting up the server More...
 
static gboolean _gst_tensor_query_serversrc_playing (GstTensorQueryServerSrc *src, nns_edge_connect_type_e connect_type)
 start processing of query_serversrc, setting up the server More...
 
static GstBuffer * _gst_tensor_query_serversrc_get_buffer (GstTensorQueryServerSrc *src)
 Get buffer from message queue. More...
 

Variables

static GstStaticPadTemplate srctemplate
 the capabilities of the outputs More...
 

Detailed Description

GStreamer plugin to handle tensor query_server src.

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

Date
09 Jul 2021
Author
Junhwan Kim jejud.nosp@m.o.ki.nosp@m.m@sam.nosp@m.sung.nosp@m..com
See also
http://github.com/nnstreamer/nnstreamer
Bug:
No known bugs

Definition in file tensor_query_serversrc.c.

Macro Definition Documentation

◆ DEFAULT_DATA_POP_TIMEOUT

#define DEFAULT_DATA_POP_TIMEOUT   100000U

Definition at line 30 of file tensor_query_serversrc.c.

◆ DEFAULT_IS_LIVE

#define DEFAULT_IS_LIVE   TRUE

Definition at line 27 of file tensor_query_serversrc.c.

◆ DEFAULT_MQTT_HOST

#define DEFAULT_MQTT_HOST   "127.0.0.1"

Definition at line 28 of file tensor_query_serversrc.c.

◆ DEFAULT_MQTT_PORT

#define DEFAULT_MQTT_PORT   1883

Definition at line 29 of file tensor_query_serversrc.c.

◆ DEFAULT_PORT_SRC

#define DEFAULT_PORT_SRC   3000

Definition at line 26 of file tensor_query_serversrc.c.

◆ GST_CAT_DEFAULT

#define GST_CAT_DEFAULT   gst_tensor_query_serversrc_debug

Definition at line 24 of file tensor_query_serversrc.c.

◆ gst_tensor_query_serversrc_parent_class

#define gst_tensor_query_serversrc_parent_class   parent_class

Definition at line 57 of file tensor_query_serversrc.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

query_serversrc properties

Enumerator
PROP_0 
PROP_HOST 
PROP_PORT 
PROP_DEST_HOST 
PROP_DEST_PORT 
PROP_CONNECT_TYPE 
PROP_TIMEOUT 
PROP_TOPIC 
PROP_ID 
PROP_IS_LIVE 

Definition at line 43 of file tensor_query_serversrc.c.

Function Documentation

◆ _gst_tensor_query_serversrc_get_buffer()

static GstBuffer* _gst_tensor_query_serversrc_get_buffer ( GstTensorQueryServerSrc src)
static

Get buffer from message queue.

Definition at line 434 of file tensor_query_serversrc.c.

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

◆ _gst_tensor_query_serversrc_playing()

static gboolean _gst_tensor_query_serversrc_playing ( GstTensorQueryServerSrc src,
nns_edge_connect_type_e  connect_type 
)
static

start processing of query_serversrc, setting up the server

Definition at line 252 of file tensor_query_serversrc.c.

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

◆ _gst_tensor_query_serversrc_start()

static gboolean _gst_tensor_query_serversrc_start ( GstTensorQueryServerSrc src)
static

start processing of query_serversrc, setting up the server

Definition at line 235 of file tensor_query_serversrc.c.

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

◆ _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 199 of file tensor_query_serversrc.c.

Here is the caller graph for this function:

◆ G_DEFINE_TYPE()

G_DEFINE_TYPE ( GstTensorQueryServerSrc  ,
gst_tensor_query_serversrc  ,
GST_TYPE_PUSH_SRC   
)

◆ GST_DEBUG_CATEGORY_STATIC()

GST_DEBUG_CATEGORY_STATIC ( gst_tensor_query_serversrc_debug  )

◆ gst_tensor_query_serversrc_change_state()

static GstStateChangeReturn gst_tensor_query_serversrc_change_state ( GstElement *  element,
GstStateChange  transition 
)
static

Change state of query server src.

Definition at line 275 of file tensor_query_serversrc.c.

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

◆ gst_tensor_query_serversrc_class_init()

static void gst_tensor_query_serversrc_class_init ( GstTensorQueryServerSrcClass klass)
static

initialize the query_serversrc class

Definition at line 77 of file tensor_query_serversrc.c.

Here is the call graph for this function:

◆ gst_tensor_query_serversrc_create()

static GstFlowReturn gst_tensor_query_serversrc_create ( GstPushSrc *  psrc,
GstBuffer **  buf 
)
static

create query_serversrc, wait on socket and receive data

Definition at line 495 of file tensor_query_serversrc.c.

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

◆ gst_tensor_query_serversrc_finalize()

static void gst_tensor_query_serversrc_finalize ( GObject *  object)
static

finalize the query_serversrc object

Definition at line 175 of file tensor_query_serversrc.c.

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

◆ gst_tensor_query_serversrc_get_property()

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

get property of query_serversrc

Definition at line 390 of file tensor_query_serversrc.c.

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

◆ gst_tensor_query_serversrc_init()

static void gst_tensor_query_serversrc_init ( GstTensorQueryServerSrc src)
static

initialize the new query_serversrc element

set the timestamps on each buffer

set the source to be live

Definition at line 150 of file tensor_query_serversrc.c.

◆ gst_tensor_query_serversrc_set_caps()

static gboolean gst_tensor_query_serversrc_set_caps ( GstBaseSrc *  bsrc,
GstCaps *  caps 
)
static

An implementation of the set_caps vmethod in GstBaseSrcClass.

Definition at line 533 of file tensor_query_serversrc.c.

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

◆ gst_tensor_query_serversrc_set_property()

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

set property of query_serversrc

Definition at line 331 of file tensor_query_serversrc.c.

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

Variable Documentation

◆ srctemplate

GstStaticPadTemplate srctemplate
static
Initial value:
= GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS_ANY)

the capabilities of the outputs

Definition at line 35 of file tensor_query_serversrc.c.