From b3abfaef39b1c56fcf6bf654930908cb064fd2d2 Mon Sep 17 00:00:00 2001 From: Jaeyun Date: Mon, 29 Apr 2019 17:29:42 +0900 Subject: [PATCH] [Decoder/Api] remove output type Remove output type in sub-plugin definition. Output mime-type depends on sub-plugins out caps. Signed-off-by: Jaeyun Jung --- ext/nnstreamer/tensor_decoder/tensordec-boundingbox.c | 3 +-- ext/nnstreamer/tensor_decoder/tensordec-directvideo.c | 3 +-- ext/nnstreamer/tensor_decoder/tensordec-imagelabel.c | 3 +-- gst/nnstreamer/nnstreamer_plugin_api_decoder.h | 13 ------------- 4 files changed, 3 insertions(+), 19 deletions(-) diff --git a/ext/nnstreamer/tensor_decoder/tensordec-boundingbox.c b/ext/nnstreamer/tensor_decoder/tensordec-boundingbox.c index d91e464..79db973 100644 --- a/ext/nnstreamer/tensor_decoder/tensordec-boundingbox.c +++ b/ext/nnstreamer/tensor_decoder/tensordec-boundingbox.c @@ -991,13 +991,12 @@ static gchar decoder_subplugin_bounding_box[] = "bounding_boxes"; /** @brief Bounding box tensordec-plugin GstTensorDecoderDef instance */ static GstTensorDecoderDef boundingBox = { .modename = decoder_subplugin_bounding_box, - .type = OUTPUT_VIDEO, .init = bb_init, .exit = bb_exit, .setOption = bb_setOption, .getOutCaps = bb_getOutCaps, .getTransformSize = bb_getTransformSize, - .decode = bb_decode, + .decode = bb_decode }; /** @brief Initialize this object for tensordec-plugin */ diff --git a/ext/nnstreamer/tensor_decoder/tensordec-directvideo.c b/ext/nnstreamer/tensor_decoder/tensordec-directvideo.c index b730189..d238530 100644 --- a/ext/nnstreamer/tensor_decoder/tensordec-directvideo.c +++ b/ext/nnstreamer/tensor_decoder/tensordec-directvideo.c @@ -196,13 +196,12 @@ static gchar decoder_subplugin_direct_video[] = "direct_video"; /** @brief Direct-Video tensordec-plugin GstTensorDecoderDef instance */ static GstTensorDecoderDef directVideo = { .modename = decoder_subplugin_direct_video, - .type = OUTPUT_VIDEO, .init = dv_init, .exit = dv_exit, .setOption = dv_setOption, .getOutCaps = dv_getOutCaps, .getTransformSize = dv_getTransformSize, - .decode = dv_decode, + .decode = dv_decode }; /** @brief Initialize this object for tensordec-plugin */ diff --git a/ext/nnstreamer/tensor_decoder/tensordec-imagelabel.c b/ext/nnstreamer/tensor_decoder/tensordec-imagelabel.c index 2f635ac..99b9bbb 100644 --- a/ext/nnstreamer/tensor_decoder/tensordec-imagelabel.c +++ b/ext/nnstreamer/tensor_decoder/tensordec-imagelabel.c @@ -278,13 +278,12 @@ static gchar decoder_subplugin_image_labeling[] = "image_labeling"; /** @brief Image Labeling tensordec-plugin GstTensorDecoderDef instance */ static GstTensorDecoderDef imageLabeling = { .modename = decoder_subplugin_image_labeling, - .type = OUTPUT_TEXT, .init = il_init, .exit = il_exit, .setOption = il_setOption, .getOutCaps = il_getOutCaps, .getTransformSize = il_getTransformSize, - .decode = il_decode, + .decode = il_decode }; /** @brief Initialize this object for tensordec-plugin */ diff --git a/gst/nnstreamer/nnstreamer_plugin_api_decoder.h b/gst/nnstreamer/nnstreamer_plugin_api_decoder.h index 3ae8fcb..93a0c61 100644 --- a/gst/nnstreamer/nnstreamer_plugin_api_decoder.h +++ b/gst/nnstreamer/nnstreamer_plugin_api_decoder.h @@ -28,17 +28,6 @@ #include /** - * @brief Tensor Decoder Output type. - */ -typedef enum -{ - OUTPUT_VIDEO, - OUTPUT_AUDIO, - OUTPUT_TEXT, - OUTPUT_UNKNOWN -} GstDecMediaType; - -/** * @brief Decoder definitions for different semantics of tensors * This allows developers to create their own decoders. */ @@ -46,8 +35,6 @@ typedef struct _GstTensorDecoderDef { char *modename; /**< Unique decoder name. GST users choose decoders with mode="modename". */ - GstDecMediaType type; - /**< Output media type. VIDEO/AUDIO/TEXT are supported */ int (*init) (void **private_data); /**< Object initialization for the decoder */ void (*exit) (void **private_data); -- 2.7.4