[Common] pad info struct
authorJaeyun <jy1210.jung@samsung.com>
Wed, 24 Apr 2019 06:33:39 +0000 (15:33 +0900)
committerJijoong Moon <jijoong.moon@samsung.com>
Thu, 25 Apr 2019 04:44:50 +0000 (13:44 +0900)
define common tensor-pad struct used in split/demux

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
gst/nnstreamer/tensor_common.h
gst/nnstreamer/tensor_demux/gsttensordemux.h
gst/nnstreamer/tensor_split/gsttensorsplit.h

index 21baae7..fa9f598 100644 (file)
@@ -96,6 +96,17 @@ typedef struct
 } GstTensorCollectPadData;
 
 /**
+ * @brief Internal data structure for pad in demux / split
+ */
+typedef struct
+{
+  GstPad *pad;
+  GstClockTime last_ts;
+  GstFlowReturn last_ret;
+  gint nth;
+} GstTensorPad;
+
+/**
  * @brief A callback for typefind, trying to find whether a file is other/tensors or not.
  * For the concrete definition of headers, please look at the wiki page of nnstreamer:
  * https://github.com/nnsuite/nnstreamer/wiki/Design-External-Save-Format-for-other-tensor-and-other-tensors-Stream-for-TypeFind
index faa3119..f6aa3f5 100644 (file)
@@ -32,6 +32,7 @@
 #include <tensor_common.h>
 
 G_BEGIN_DECLS
+
 #define GST_TYPE_TENSOR_DEMUX (gst_tensor_demux_get_type ())
 #define GST_TENSOR_DEMUX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_TENSOR_DEMUX, GstTensorDemux))
 #define GST_TENSOR_DEMUX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_TENSOR_DEMUX, GstTensorDemuxClass))
@@ -39,17 +40,10 @@ G_BEGIN_DECLS
 #define GST_IS_TENSOR_DEMUX(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_TENSOR_DEMUX))
 #define GST_IS_TENSOR_DEMUX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TENSOR_DEMUX))
 #define GST_TENSOR_DEMUX_CAST(obj)((GstTensorDemux*)(obj))
+
 typedef struct _GstTensorDemux GstTensorDemux;
 typedef struct _GstTensorDemuxClass GstTensorDemuxClass;
 
-typedef struct
-{
-  GstPad *pad;
-  GstClockTime last_ts;
-  GstFlowReturn last_ret;
-  gint nth;
-} GstTensorPad;
-
 /**
  * @brief Tensor Muxer data structure
  */
@@ -82,4 +76,5 @@ struct _GstTensorDemuxClass
 GType gst_tensor_demux_get_type (void);
 
 G_END_DECLS
+
 #endif  /** __GST_TENSOR_DEMUX_H__ **/
index 11078c3..0d4d14c 100644 (file)
@@ -44,15 +44,6 @@ G_BEGIN_DECLS
 typedef struct _GstTensorSplit GstTensorSplit;
 typedef struct _GstTensorSplitClass GstTensorSplitClass;
 
-/** @todo consider to move this to common header */
-typedef struct
-{
-  GstPad *pad;
-  GstClockTime last_ts;
-  GstFlowReturn last_ret;
-  gint nth;
-} GstTensorPad;
-
 /**
  * @brief Tensor Spliter data structure
  */