From: jinhyuck-park Date: Thu, 25 Oct 2018 07:44:09 +0000 (+0900) Subject: [TensorDec] refactoring transform function with property X-Git-Tag: v0.0.3~177 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8c5f4dea963af3d40dd0d8323aa07b664302ebc3;p=platform%2Fupstream%2Fnnstreamer.git [TensorDec] refactoring transform function with property refactory transform function from property out-type to property mode Signed-off-by: jinhyuck-park --- diff --git a/gst/tensor_decoder/tensordec.c b/gst/tensor_decoder/tensordec.c index 4874f5e..d1838c4 100644 --- a/gst/tensor_decoder/tensordec.c +++ b/gst/tensor_decoder/tensordec.c @@ -831,35 +831,33 @@ gst_tensordec_transform (GstBaseTransform * trans, if (G_UNLIKELY (!self->configured)) goto unknown_format; - switch (self->output_type) { - case OUTPUT_VIDEO: - case OUTPUT_AUDIO: + switch (self->mode) { + case DIRECT_VIDEO: res = gst_tensordec_copy_buffer (self, inbuf, outbuf); break; - case OUTPUT_TEXT: - if (self->mode == IMAGE_LABELING) { - res = gst_tensordec_get_label (self, inbuf, outbuf); - } else { - res = gst_tensordec_copy_buffer (self, inbuf, outbuf); - } + case IMAGE_LABELING: + res = gst_tensordec_get_label (self, inbuf, outbuf); break; + case BOUNDING_BOXES: default: - err_print ("Unsupported Media Type (%d)\n", self->output_type); + err_print ("Unsupported mode (%d)\n", self->mode); goto unknown_type; } return res; unknown_format: + err_print ("Hit unknown_format"); GST_ELEMENT_ERROR (self, CORE, NOT_IMPLEMENTED, (NULL), ("unknown format")); return GST_FLOW_NOT_NEGOTIATED; unknown_tensor: + err_print ("Hit unknown_tensor"); GST_ELEMENT_ERROR (self, CORE, NOT_IMPLEMENTED, (NULL), ("unknown format for tensor")); return GST_FLOW_NOT_NEGOTIATED; unknown_type: GST_ELEMENT_ERROR (self, CORE, NOT_IMPLEMENTED, (NULL), - ("not implemented type of media")); + ("not implemented decoder mode")); return GST_FLOW_NOT_SUPPORTED; }