From 3e417b38a8940bdcb1f011ce782c1537ec8d6b95 Mon Sep 17 00:00:00 2001 From: Jaeyun Date: Thu, 18 Apr 2019 17:31:48 +0900 Subject: [PATCH] [Test/Repo] remove unnecessary header 1. In testcase of tensor-repo test, it does not need to include repo header. 2. Code clean tensor-repo src/sink Signed-off-by: Jaeyun Jung --- gst/nnstreamer/tensor_reposink/tensor_reposink.c | 6 +----- gst/nnstreamer/tensor_reposink/tensor_reposink.h | 5 +++-- gst/nnstreamer/tensor_reposrc/tensor_reposrc.c | 6 +----- gst/nnstreamer/tensor_reposrc/tensor_reposrc.h | 9 ++++++--- tests/nnstreamer_repo_dynamicity/tensor_repo_dynamic_test.c | 1 - 5 files changed, 11 insertions(+), 16 deletions(-) diff --git a/gst/nnstreamer/tensor_reposink/tensor_reposink.c b/gst/nnstreamer/tensor_reposink/tensor_reposink.c index 359ce00..8b0dce9 100644 --- a/gst/nnstreamer/tensor_reposink/tensor_reposink.c +++ b/gst/nnstreamer/tensor_reposink/tensor_reposink.c @@ -32,13 +32,9 @@ #include #endif +#include "tensor_repo.h" #include "tensor_reposink.h" -/** - * @brief tensor repository - */ -extern GstTensorRepo _repo; - GST_DEBUG_CATEGORY_STATIC (gst_tensor_reposink_debug); #define GST_CAT_DEFAULT gst_tensor_reposink_debug diff --git a/gst/nnstreamer/tensor_reposink/tensor_reposink.h b/gst/nnstreamer/tensor_reposink/tensor_reposink.h index 73d81dd..9cf01e6 100644 --- a/gst/nnstreamer/tensor_reposink/tensor_reposink.h +++ b/gst/nnstreamer/tensor_reposink/tensor_reposink.h @@ -29,7 +29,6 @@ #include #include -#include G_BEGIN_DECLS @@ -43,6 +42,7 @@ G_BEGIN_DECLS (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_TENSOR_REPOSINK)) #define GST_IS_TENSOR_REPOSINK_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TENSOR_REPOSINK)) + typedef struct _GstTensorRepoSink GstTensorRepoSink; typedef struct _GstTensorRepoSinkClass GstTensorRepoSinkClass; @@ -80,4 +80,5 @@ struct _GstTensorRepoSinkClass GType gst_tensor_reposink_get_type (void); G_END_DECLS -#endif /** __GST_TENSOR_REPOSINK_H__ */ + +#endif /* __GST_TENSOR_REPOSINK_H__ */ diff --git a/gst/nnstreamer/tensor_reposrc/tensor_reposrc.c b/gst/nnstreamer/tensor_reposrc/tensor_reposrc.c index 04ddde6..0e8d467 100644 --- a/gst/nnstreamer/tensor_reposrc/tensor_reposrc.c +++ b/gst/nnstreamer/tensor_reposrc/tensor_reposrc.c @@ -33,6 +33,7 @@ #endif #include +#include "tensor_repo.h" #include "tensor_reposrc.h" GST_DEBUG_CATEGORY_STATIC (gst_tensor_reposrc_debug); @@ -54,11 +55,6 @@ enum #define DEFAULT_INDEX 0 /** - * @brief external repo - */ -extern GstTensorRepo _repo; - -/** * @brief tensor_reposrc src template */ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", diff --git a/gst/nnstreamer/tensor_reposrc/tensor_reposrc.h b/gst/nnstreamer/tensor_reposrc/tensor_reposrc.h index 625edca..403959a 100644 --- a/gst/nnstreamer/tensor_reposrc/tensor_reposrc.h +++ b/gst/nnstreamer/tensor_reposrc/tensor_reposrc.h @@ -29,9 +29,9 @@ #include #include -#include G_BEGIN_DECLS + #define GST_TYPE_TENSOR_REPOSRC \ (gst_tensor_reposrc_get_type()) #define GST_TENSOR_REPOSRC(obj) \ @@ -42,6 +42,7 @@ G_BEGIN_DECLS (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_TENSOR_REPOSRC)) #define GST_IS_TENSOR_REPOSRC_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TENSOR_REPOSRC)) + typedef struct _GstTensorRepoSrc GstTensorRepoSrc; typedef struct _GstTensorRepoSrcClass GstTensorRepoSrcClass; @@ -59,7 +60,8 @@ struct _GstTensorRepoSrc guint o_myid; GstCaps *caps; gboolean ini; - gint fps_n, fps_d; + gint fps_n; + gint fps_d; gboolean negotiation; gboolean set_startid; }; @@ -80,4 +82,5 @@ struct _GstTensorRepoSrcClass GType gst_tensor_reposrc_get_type (void); G_END_DECLS -#endif /** __GST_TENSOR_REPOSRC_H__ */ + +#endif /* __GST_TENSOR_REPOSRC_H__ */ diff --git a/tests/nnstreamer_repo_dynamicity/tensor_repo_dynamic_test.c b/tests/nnstreamer_repo_dynamicity/tensor_repo_dynamic_test.c index 20e9159..0023fa3 100644 --- a/tests/nnstreamer_repo_dynamicity/tensor_repo_dynamic_test.c +++ b/tests/nnstreamer_repo_dynamicity/tensor_repo_dynamic_test.c @@ -23,7 +23,6 @@ #include #include #include -#include static GMainLoop *loop = NULL; -- 2.7.4