onnx: fix formating

Code alignement was not alway consistent

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7205>
This commit is contained in:
Daniel Morin 2024-07-19 14:00:45 -04:00 committed by GStreamer Marge Bot
parent 43edff4e29
commit 4ff98d66bb

View file

@ -323,8 +323,9 @@ GstOnnxClient::GstOnnxClient (GstElement *debug_parent):debug_parent(debug_paren
height = newHeight; height = newHeight;
} }
// copy tensor data to a GstTensorMeta // copy tensor data to a GstTensorMeta
GstTensorMeta *GstOnnxClient::copy_tensors_to_meta (std::vector < Ort::Value > GstTensorMeta *
GstOnnxClient::copy_tensors_to_meta (std::vector < Ort::Value >
&outputs, GstBuffer * buffer) &outputs, GstBuffer * buffer)
{ {
size_t num_tensors = outputNamesRaw.size (); size_t num_tensors = outputNamesRaw.size ();
@ -372,8 +373,9 @@ GstOnnxClient::GstOnnxClient (GstElement *debug_parent):debug_parent(debug_paren
buffer_size); buffer_size);
tensor->data_type = GST_TENSOR_TYPE_INT32; tensor->data_type = GST_TENSOR_TYPE_INT32;
} else { } else {
GST_ERROR_OBJECT (debug_parent, "Output tensor is not FLOAT32 or INT32, not supported"); GST_ERROR_OBJECT (debug_parent,
gst_buffer_remove_meta (buffer, (GstMeta*) tmeta); "Output tensor is not FLOAT32 or INT32, not supported");
gst_buffer_remove_meta (buffer, (GstMeta *) tmeta);
return NULL; return NULL;
} }
} }
@ -383,7 +385,8 @@ GstOnnxClient::GstOnnxClient (GstElement *debug_parent):debug_parent(debug_paren
} }
std::vector < Ort::Value > GstOnnxClient::run (uint8_t * img_data, std::vector < Ort::Value > GstOnnxClient::run (uint8_t * img_data,
GstVideoInfo vinfo) { GstVideoInfo vinfo)
{
std::vector < Ort::Value > modelOutput; std::vector < Ort::Value > modelOutput;
doRun (img_data, vinfo, modelOutput); doRun (img_data, vinfo, modelOutput);