[Api/Pipeline] set state paused while constructing the pipeline
authorJaeyun <jy1210.jung@samsung.com>
Wed, 7 Aug 2019 09:41:42 +0000 (18:41 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Fri, 16 Aug 2019 10:28:20 +0000 (19:28 +0900)
when called construct(), set the pipeline state paused.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
api/capi/src/nnstreamer-capi-pipeline.c
tests/tizen_capi/unittest_tizen_capi.cpp

index 473bb41..6bbd08e 100644 (file)
@@ -477,6 +477,11 @@ ml_pipeline_construct (const char *pipeline_description,
 
   g_mutex_unlock (&pipe_h->lock);
 
+  /* set pipeline state to PAUSED */
+  if (status == ML_ERROR_NONE) {
+    status = ml_pipeline_stop (*pipe);
+  }
+
   if (status != ML_ERROR_NONE) {
     /* failed to construct the pipeline */
     ml_pipeline_destroy (*pipe);
index 764b8a8..ff0be71 100644 (file)
@@ -747,7 +747,7 @@ TEST (nnstreamer_capi_src, failure_01_n)
  */
 TEST (nnstreamer_capi_src, failure_02_n)
 {
-  const char *pipeline = "appsrc is-live=true name=mysource ! valve name=valvex ! filesink";
+  const char *pipeline = "appsrc name=mysource ! other/tensor,dimension=(string)4:1:1:1,type=(string)uint8,framerate=(fraction)0/1 ! valve name=valvex ! tensor_sink";
   ml_pipeline_h handle;
   ml_pipeline_src_h srchandle;