GStreamer plugin to handle tensor query client. More...
#include "nnstreamer_util.h"
#include "tensor_query_client.h"
#include <gio/gio.h>
#include <glib.h>
#include <string.h>
#include "tensor_query_common.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
Go to the source code of this file.
Macros | |
#define | DBG (!self->silent) |
Macro for debug mode. More... | |
#define | TCP_HIGHEST_PORT 65535 |
#define | TCP_DEFAULT_HOST "localhost" |
#define | TCP_DEFAULT_SRV_SRC_PORT 3000 |
#define | TCP_DEFAULT_CLIENT_SRC_PORT 3001 |
#define | DEFAULT_CLIENT_TIMEOUT 0 |
#define | DEFAULT_SILENT TRUE |
#define | DEFAULT_MAX_REQUEST 2 |
#define | GST_CAT_DEFAULT gst_tensor_query_client_debug |
#define | gst_tensor_query_client_parent_class parent_class |
Enumerations | |
enum | { PROP_0, PROP_HOST, PROP_PORT, PROP_DEST_HOST, PROP_DEST_PORT, PROP_CONNECT_TYPE, PROP_TOPIC, PROP_TIMEOUT, PROP_SILENT, PROP_MAX_REQUEST } |
Properties. More... | |
Functions | |
GST_DEBUG_CATEGORY_STATIC (gst_tensor_query_client_debug) | |
G_DEFINE_TYPE (GstTensorQueryClient, gst_tensor_query_client, GST_TYPE_ELEMENT) | |
static void | gst_tensor_query_client_finalize (GObject *object) |
finalize the object More... | |
static void | gst_tensor_query_client_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) |
set property More... | |
static void | gst_tensor_query_client_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) |
get property More... | |
static gboolean | gst_tensor_query_client_sink_event (GstPad *pad, GstObject *parent, GstEvent *event) |
This function handles sink event. More... | |
static gboolean | gst_tensor_query_client_sink_query (GstPad *pad, GstObject *parent, GstQuery *query) |
This function handles sink pad query. More... | |
static GstFlowReturn | gst_tensor_query_client_chain (GstPad *pad, GstObject *parent, GstBuffer *buf) |
Chain function, this function does the actual processing. More... | |
static GstCaps * | gst_tensor_query_client_query_caps (GstTensorQueryClient *self, GstPad *pad, GstCaps *filter) |
Get pad caps for caps negotiation. More... | |
static void | gst_tensor_query_client_class_init (GstTensorQueryClientClass *klass) |
initialize the class More... | |
static void | gst_tensor_query_client_init (GstTensorQueryClient *self) |
initialize the new element More... | |
static gboolean | gst_tensor_query_client_update_caps (GstTensorQueryClient *self, const gchar *caps_str) |
Update src pad caps from tensors config. More... | |
static gchar * | _nns_edge_parse_caps (gchar *caps_str, gboolean is_src) |
Parse caps from received event data. 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_client_create_edge_handle (GstTensorQueryClient *self) |
Internal function to create edge handle. More... | |
Variables | |
static GstStaticPadTemplate | sinktemplate |
the capabilities of the inputs. More... | |
static GstStaticPadTemplate | srctemplate |
the capabilities of the outputs. More... | |
GStreamer plugin to handle tensor query client.
Copyright (C) 2021 Samsung Electronics Co., Ltd.
Definition in file tensor_query_client.c.
#define DBG (!self->silent) |
Macro for debug mode.
Definition at line 32 of file tensor_query_client.c.
#define DEFAULT_CLIENT_TIMEOUT 0 |
Definition at line 56 of file tensor_query_client.c.
#define DEFAULT_MAX_REQUEST 2 |
Definition at line 58 of file tensor_query_client.c.
#define DEFAULT_SILENT TRUE |
Definition at line 57 of file tensor_query_client.c.
#define GST_CAT_DEFAULT gst_tensor_query_client_debug |
Definition at line 61 of file tensor_query_client.c.
#define gst_tensor_query_client_parent_class parent_class |
Definition at line 79 of file tensor_query_client.c.
#define TCP_DEFAULT_CLIENT_SRC_PORT 3001 |
Definition at line 55 of file tensor_query_client.c.
#define TCP_DEFAULT_HOST "localhost" |
Definition at line 53 of file tensor_query_client.c.
#define TCP_DEFAULT_SRV_SRC_PORT 3000 |
Definition at line 54 of file tensor_query_client.c.
#define TCP_HIGHEST_PORT 65535 |
Definition at line 52 of file tensor_query_client.c.
anonymous enum |
Properties.
Enumerator | |
---|---|
PROP_0 | |
PROP_HOST | |
PROP_PORT | |
PROP_DEST_HOST | |
PROP_DEST_PORT | |
PROP_CONNECT_TYPE | |
PROP_TOPIC | |
PROP_TIMEOUT | |
PROP_SILENT | |
PROP_MAX_REQUEST |
Definition at line 38 of file tensor_query_client.c.
|
static |
nnstreamer-edge event callback.
Server framerate may vary. Let's skip comparing the framerate.
Update client src caps
Definition at line 435 of file tensor_query_client.c.
|
static |
Parse caps from received event data.
Definition at line 400 of file tensor_query_client.c.
G_DEFINE_TYPE | ( | GstTensorQueryClient | , |
gst_tensor_query_client | , | ||
GST_TYPE_ELEMENT | |||
) |
GST_DEBUG_CATEGORY_STATIC | ( | gst_tensor_query_client_debug | ) |
|
static |
Chain function, this function does the actual processing.
Definition at line 674 of file tensor_query_client.c.
|
static |
initialize the class
install property goes here
Definition at line 101 of file tensor_query_client.c.
|
static |
Internal function to create edge handle.
Definition at line 521 of file tensor_query_client.c.
|
static |
finalize the object
Definition at line 213 of file tensor_query_client.c.
|
static |
get property
Definition at line 309 of file tensor_query_client.c.
|
static |
initialize the new element
setup sink pad
setup src pad
Definition at line 175 of file tensor_query_client.c.
|
static |
Get pad caps for caps negotiation.
pad don't have current caps. use the template caps
Definition at line 784 of file tensor_query_client.c.
|
static |
set property
Definition at line 250 of file tensor_query_client.c.
|
static |
This function handles sink event.
Definition at line 587 of file tensor_query_client.c.
|
static |
This function handles sink pad query.
Definition at line 623 of file tensor_query_client.c.
|
static |
Update src pad caps from tensors config.
If pad caps is updated, prepare the tensor information here. It will be used in chain function, to push tensor buffer into src pad.
Don't need to update when the capability is the same.
Definition at line 352 of file tensor_query_client.c.
|
static |
the capabilities of the inputs.
Definition at line 66 of file tensor_query_client.c.
|
static |
the capabilities of the outputs.
Definition at line 74 of file tensor_query_client.c.