From: Priya Kohli Date: Wed, 12 Aug 2020 09:10:55 +0000 (+0530) Subject: [ITC][nnstreamer][ACR-1571][Added changes to start, stop and destroy the pipeline] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=23f73ee84caaf9daed2d6fb509801250ab02e53c;p=test%2Ftct%2Fnative%2Fapi.git [ITC][nnstreamer][ACR-1571][Added changes to start, stop and destroy the pipeline] Change-Id: Id1e3c6da34c7ee48c1f4c3c8a02d5ae988b35626 Signed-off-by: Priya Kohli --- diff --git a/src/itc/nnstreamer/ITs-nnstreamer-capi.c b/src/itc/nnstreamer/ITs-nnstreamer-capi.c index bf075f776..9a0cd8283 100644 --- a/src/itc/nnstreamer/ITs-nnstreamer-capi.c +++ b/src/itc/nnstreamer/ITs-nnstreamer-capi.c @@ -736,6 +736,9 @@ int ITc_nnstreamer_ml_pipeline_custom_easy_filter_register_unregister_p(void) PRINT_RESULT_CLEANUP(ML_ERROR_NONE, nRet, "ml_pipeline_src_get_handle", NnStreamerGetError(nRet), ml_tensors_info_destroy (hTensorinfoOutHandle); ml_pipeline_destroy (hMlPipeline)); CHECK_HANDLE_CLEANUP(hPipeSrcHandle, "ml_pipeline_src_get_handle", ml_tensors_info_destroy (hTensorinfoInHandle); ml_tensors_info_destroy (hTensorinfoOutHandle); ml_pipeline_destroy (hMlPipeline)); + nRet = ml_pipeline_start (hMlPipeline); + PRINT_RESULT_CLEANUP(ML_ERROR_NONE, nRet, "ml_pipeline_start", NnStreamerGetError(nRet), ml_tensors_info_destroy (hTensorinfoOutHandle); ml_pipeline_destroy (hMlPipeline); ml_pipeline_src_release_handle (hPipeSrcHandle)); + for (nSt = 0; nSt < nEnd; nSt++) { nRet = ml_tensors_data_create (hTensorinfoInHandle, &hTensorsDataHandle); PRINT_RESULT(ML_ERROR_NONE, nRet, "ml_tensors_data_create", NnStreamerGetError(nRet)); @@ -748,6 +751,9 @@ int ITc_nnstreamer_ml_pipeline_custom_easy_filter_register_unregister_p(void) } PRINT_RESULT_CLEANUP(true, g_bCallbackHit, "ml_pipeline_custom_easy_filter_register", NnStreamerGetError(nRet), ml_tensors_info_destroy (hTensorinfoInHandle); ml_tensors_info_destroy (hTensorinfoOutHandle); ml_pipeline_destroy (hMlPipeline); ml_pipeline_src_release_handle (hPipeSrcHandle); ml_tensors_data_destroy(hTensorsDataHandle)); + nRet = ml_pipeline_stop (hMlPipeline); + PRINT_RESULT_CLEANUP(ML_ERROR_NONE, nRet, "ml_pipeline_stop", NnStreamerGetError(nRet), ml_tensors_info_destroy (hTensorinfoInHandle); ml_tensors_info_destroy (hTensorinfoOutHandle); ml_pipeline_destroy (hMlPipeline); ml_pipeline_src_release_handle (hPipeSrcHandle); ml_tensors_data_destroy(hTensorsDataHandle)); + nRet = ml_pipeline_custom_easy_filter_unregister (hCustom); PRINT_RESULT_CLEANUP(ML_ERROR_NONE, nRet, "ml_pipeline_custom_easy_filter_unregister", NnStreamerGetError(nRet), ml_tensors_info_destroy (hTensorinfoInHandle); ml_tensors_info_destroy (hTensorinfoOutHandle); ml_pipeline_destroy (hMlPipeline); ml_pipeline_src_release_handle (hPipeSrcHandle); ml_tensors_data_destroy(hTensorsDataHandle)); @@ -760,6 +766,9 @@ int ITc_nnstreamer_ml_pipeline_custom_easy_filter_register_unregister_p(void) nRet = ml_pipeline_src_release_handle (hPipeSrcHandle); PRINT_RESULT_NORETURN(ML_ERROR_NONE, nRet, "ml_pipeline_src_release_handle", NnStreamerGetError(nRet)); + nRet = ml_pipeline_destroy (hMlPipeline); + PRINT_RESULT_NORETURN(ML_ERROR_NONE, nRet, "ml_pipeline_destroy", NnStreamerGetError(nRet)); + g_free (filter_data_size); return 0;