{
START_TEST;
int nRet = -1;
- char *pszPipeLine = "videotestsrc ! video/x-raw,format=RGB,width=640,height=480 ! videorate max-rate=1 ! " \
- "tensor_converter ! tensor_mux ! tensor_demux name=demux ! tensor_sink";
+ char *pszPipeLine = "videotestsrc is-live=true ! videoconvert ! videoscale ! " \
+ "video/x-raw,width=640,height=480,framerate=30/1 ! tensor_converter ! " \
+ "tensor_rate name=trate framerate=45/1 throttle=false ! tensor_sink";
+
+
ml_pipeline_h hMlPipeline = NULL;
- ml_pipeline_element_h hMlDemux = NULL;
- const char *pszElementName = "demux";
- const char *pszPropertyName = "tensorpick";
- const char *pszSetProperty = "0";
+ ml_pipeline_element_h hMlRate = NULL;
+ const char *pszElementName = "trate";
+ const char *pszPropertyName = "framerate";
+ const char *pszSetProperty = "60/1";
char *pszGetProperty = NULL;
nRet = ml_pipeline_construct (pszPipeLine, NULL, NULL, &hMlPipeline);
PRINT_RESULT(ML_ERROR_NONE, nRet, "ml_pipeline_construct", NnStreamerGetError(nRet));
CHECK_HANDLE(hMlPipeline, "ml_pipeline_construct");
- nRet = ml_pipeline_element_get_handle (hMlPipeline, pszElementName, &hMlDemux);
+ nRet = ml_pipeline_element_get_handle (hMlPipeline, pszElementName, &hMlRate);
PRINT_RESULT_CLEANUP(ML_ERROR_NONE, nRet, "ml_pipeline_element_get_handle", NnStreamerGetError(nRet),ml_pipeline_destroy (hMlPipeline));
- CHECK_HANDLE_CLEANUP(hMlDemux, "ml_pipeline_element_get_handle", ml_pipeline_destroy (hMlPipeline));
+ CHECK_HANDLE_CLEANUP(hMlRate, "ml_pipeline_element_get_handle", ml_pipeline_destroy (hMlPipeline));
- nRet = ml_pipeline_element_set_property_string (hMlDemux, pszPropertyName, pszSetProperty);
- PRINT_RESULT_CLEANUP(ML_ERROR_NONE, nRet, "ml_pipeline_element_set_property_string", NnStreamerGetError(nRet),ml_pipeline_destroy (hMlPipeline); ml_pipeline_element_release_handle (hMlDemux));
+ nRet = ml_pipeline_element_set_property_string (hMlRate, pszPropertyName, pszSetProperty);
+ PRINT_RESULT_CLEANUP(ML_ERROR_NONE, nRet, "ml_pipeline_element_set_property_string", NnStreamerGetError(nRet),ml_pipeline_destroy (hMlPipeline); ml_pipeline_element_release_handle (hMlRate));
- nRet = ml_pipeline_element_get_property_string (hMlDemux, pszPropertyName, &pszGetProperty);
- PRINT_RESULT_CLEANUP(ML_ERROR_NONE, nRet, "ml_pipeline_element_get_property_string", NnStreamerGetError(nRet),ml_pipeline_destroy (hMlPipeline); ml_pipeline_element_release_handle (hMlDemux));
+ nRet = ml_pipeline_element_get_property_string (hMlRate, pszPropertyName, &pszGetProperty);
+ PRINT_RESULT_CLEANUP(ML_ERROR_NONE, nRet, "ml_pipeline_element_get_property_string", NnStreamerGetError(nRet),ml_pipeline_destroy (hMlPipeline); ml_pipeline_element_release_handle (hMlRate));
if ( 0 != strncmp(pszSetProperty, pszGetProperty, strlen(pszSetProperty)) )
{
FPRINTF("[%s:%d] TC Failed Reason; Set Value %s and Get value %s of property name is not same\\n", __FILE__, __LINE__, pszSetProperty, pszGetProperty);
- nRet = ml_pipeline_element_release_handle (hMlDemux);
+ nRet = ml_pipeline_element_release_handle (hMlRate);
PRINT_RESULT_NORETURN(ML_ERROR_NONE, nRet, "ml_pipeline_element_release_handle", NnStreamerGetError(nRet));
nRet = ml_pipeline_destroy (hMlPipeline);
return 1;
}
- nRet = ml_pipeline_element_release_handle (hMlDemux);
+ nRet = ml_pipeline_element_release_handle (hMlRate);
PRINT_RESULT_NORETURN(ML_ERROR_NONE, nRet, "ml_pipeline_element_release_handle", NnStreamerGetError(nRet));
nRet = ml_pipeline_destroy (hMlPipeline);
{
IS_SUPPORT_FEATURE;
ml_pipeline_h handle = NULL;
- ml_pipeline_element_h demux_h = NULL;
+ ml_pipeline_element_h rate_h = NULL;
gchar *pipeline;
int status;
- pipeline = g_strdup("videotestsrc ! video/x-raw,format=RGB,width=640,height=480 ! videorate max-rate=1 ! " \
- "tensor_converter ! tensor_mux ! tensor_demux name=demux ! tensor_sink");
+ pipeline = g_strdup("videotestsrc is-live=true ! videoconvert ! videoscale ! " \
+ "video/x-raw,width=640,height=480,framerate=30/1 ! tensor_converter ! " \
+ "tensor_rate name=trate framerate=45/1 throttle=false ! tensor_sink");
status = ml_pipeline_construct (pipeline, NULL, NULL, &handle);
assert_eq (status, ML_ERROR_NONE);
- status = ml_pipeline_element_get_handle (handle, "demux", &demux_h);
+ status = ml_pipeline_element_get_handle (handle, "trate", &rate_h);
assert_eq (status, ML_ERROR_NONE);
/* Test Code */
- status = ml_pipeline_element_set_property_string (demux_h, "tensorpick", "0");
+ status = ml_pipeline_element_set_property_string (rate_h, "framerate", "60/1");
assert_eq (status, ML_ERROR_NONE);
- status = ml_pipeline_element_release_handle (demux_h);
+ status = ml_pipeline_element_release_handle (rate_h);
assert_eq (status, ML_ERROR_NONE);
status = ml_pipeline_destroy (handle);
int status;
/* Test Code */
- status = ml_pipeline_element_set_property_string (NULL, "tensorpick", "0");
+ status = ml_pipeline_element_set_property_string (NULL, "framerate", "60/1");
assert_neq (status, ML_ERROR_NONE);
return 0;
{
IS_SUPPORT_FEATURE;
ml_pipeline_h handle = NULL;
- ml_pipeline_element_h demux_h = NULL;
+ ml_pipeline_element_h rate_h = NULL;
gchar *pipeline;
int status;
- pipeline = g_strdup("videotestsrc ! video/x-raw,format=RGB,width=640,height=480 ! videorate max-rate=1 ! " \
- "tensor_converter ! tensor_mux ! tensor_demux name=demux ! tensor_sink");
+ pipeline = g_strdup("videotestsrc is-live=true ! videoconvert ! videoscale ! " \
+ "video/x-raw,width=640,height=480,framerate=30/1 ! tensor_converter ! " \
+ "tensor_rate name=trate framerate=45/1 throttle=false ! tensor_sink");
status = ml_pipeline_construct (pipeline, NULL, NULL, &handle);
assert_eq (status, ML_ERROR_NONE);
- status = ml_pipeline_element_get_handle (handle, "demux", &demux_h);
+ status = ml_pipeline_element_get_handle (handle, "trate", &rate_h);
assert_eq (status, ML_ERROR_NONE);
/* Test Code */
- status = ml_pipeline_element_set_property_string (demux_h, "WRONG_NAME", "0");
+ status = ml_pipeline_element_set_property_string (rate_h, "WRONG_NAME", "60/1");
assert_neq (status, ML_ERROR_NONE);
- status = ml_pipeline_element_release_handle (demux_h);
+ status = ml_pipeline_element_release_handle (rate_h);
assert_eq (status, ML_ERROR_NONE);
status = ml_pipeline_destroy (handle);
{
IS_SUPPORT_FEATURE;
ml_pipeline_h handle = NULL;
- ml_pipeline_element_h demux_h = NULL;
+ ml_pipeline_element_h rate_h = NULL;
gchar *pipeline;
- gchar *ret_tensorpick;
+ gchar *ret_trate;
int status;
- pipeline = g_strdup("videotestsrc ! video/x-raw,format=RGB,width=640,height=480 ! videorate max-rate=1 ! " \
- "tensor_converter ! tensor_mux ! tensor_demux name=demux ! tensor_sink");
+ pipeline = g_strdup("videotestsrc is-live=true ! videoconvert ! videoscale ! " \
+ "video/x-raw,width=640,height=480,framerate=30/1 ! tensor_converter ! " \
+ "tensor_rate name=trate framerate=45/1 throttle=false ! tensor_sink");
status = ml_pipeline_construct (pipeline, NULL, NULL, &handle);
assert_eq (status, ML_ERROR_NONE);
- status = ml_pipeline_element_get_handle (handle, "demux", &demux_h);
+ status = ml_pipeline_element_get_handle (handle, "trate", &rate_h);
assert_eq (status, ML_ERROR_NONE);
- status = ml_pipeline_element_set_property_string (demux_h, "tensorpick", "0");
+ status = ml_pipeline_element_set_property_string (rate_h, "framerate", "60/1");
assert_eq (status, ML_ERROR_NONE);
/* Test Code */
- status = ml_pipeline_element_get_property_string (demux_h, "tensorpick", &ret_tensorpick);
+ status = ml_pipeline_element_get_property_string (rate_h, "framerate", &ret_trate);
assert_eq (status, ML_ERROR_NONE);
- assert_eq (g_str_equal (ret_tensorpick, "0"), TRUE);
- g_free (ret_tensorpick);
+ assert_eq (g_str_equal (ret_trate, "60/1"), TRUE);
+ g_free (ret_trate);
- status = ml_pipeline_element_release_handle (demux_h);
+ status = ml_pipeline_element_release_handle (rate_h);
assert_eq (status, ML_ERROR_NONE);
status = ml_pipeline_destroy (handle);
{
IS_SUPPORT_FEATURE;
int status;
- gchar *ret_tensorpick;
+ gchar *ret_trate;
/* Test Code */
- status = ml_pipeline_element_get_property_string (NULL, "tensorpick", &ret_tensorpick);
+ status = ml_pipeline_element_get_property_string (NULL, "framerate", &ret_trate);
assert_neq (status, ML_ERROR_NONE);
return 0;
{
IS_SUPPORT_FEATURE;
ml_pipeline_h handle = NULL;
- ml_pipeline_element_h demux_h = NULL;
+ ml_pipeline_element_h rate_h = NULL;
gchar *pipeline;
- gchar *ret_tensorpick;
+ gchar *ret_trate;
int status;
- pipeline = g_strdup("videotestsrc ! video/x-raw,format=RGB,width=640,height=480 ! videorate max-rate=1 ! " \
- "tensor_converter ! tensor_mux ! tensor_demux name=demux ! tensor_sink");
+ pipeline = g_strdup("videotestsrc is-live=true ! videoconvert ! videoscale ! " \
+ "video/x-raw,width=640,height=480,framerate=30/1 ! tensor_converter ! " \
+ "tensor_rate name=trate framerate=45/1 throttle=false ! tensor_sink");
status = ml_pipeline_construct (pipeline, NULL, NULL, &handle);
assert_eq (status, ML_ERROR_NONE);
- status = ml_pipeline_element_get_handle (handle, "demux", &demux_h);
+ status = ml_pipeline_element_get_handle (handle, "trate", &rate_h);
assert_eq (status, ML_ERROR_NONE);
- status = ml_pipeline_element_set_property_string (demux_h, "tensorpick", "0");
+ status = ml_pipeline_element_set_property_string (rate_h, "framerate", "60/1");
assert_eq (status, ML_ERROR_NONE);
/* Test Code */
- status = ml_pipeline_element_get_property_string (demux_h, "WRONG_NAME", &ret_tensorpick);
+ status = ml_pipeline_element_get_property_string (rate_h, "WRONG_NAME", &ret_trate);
assert_neq (status, ML_ERROR_NONE);
- status = ml_pipeline_element_release_handle (demux_h);
+ status = ml_pipeline_element_release_handle (rate_h);
assert_eq (status, ML_ERROR_NONE);
status = ml_pipeline_destroy (handle);
{
IS_SUPPORT_FEATURE;
ml_pipeline_h handle = NULL;
- ml_pipeline_element_h demux_h = NULL;
+ ml_pipeline_element_h rate_h = NULL;
gchar *pipeline;
int status;
- pipeline = g_strdup("videotestsrc ! video/x-raw,format=RGB,width=640,height=480 ! videorate max-rate=1 ! " \
- "tensor_converter ! tensor_mux ! tensor_demux name=demux ! tensor_sink");
+ pipeline = g_strdup("videotestsrc is-live=true ! videoconvert ! videoscale ! " \
+ "video/x-raw,width=640,height=480,framerate=30/1 ! tensor_converter ! " \
+ "tensor_rate name=trate framerate=45/1 throttle=false ! tensor_sink");
status = ml_pipeline_construct (pipeline, NULL, NULL, &handle);
assert_eq (status, ML_ERROR_NONE);
- status = ml_pipeline_element_get_handle (handle, "demux", &demux_h);
+ status = ml_pipeline_element_get_handle (handle, "trate", &rate_h);
assert_eq (status, ML_ERROR_NONE);
- status = ml_pipeline_element_set_property_string (demux_h, "tensorpick", "0");
+ status = ml_pipeline_element_set_property_string (rate_h, "framerate", "60/1");
assert_eq (status, ML_ERROR_NONE);
/* Test Code */
- status = ml_pipeline_element_get_property_string (demux_h, "tensorpick", NULL);
+ status = ml_pipeline_element_get_property_string (rate_h, "framerate", NULL);
assert_neq (status, ML_ERROR_NONE);
- status = ml_pipeline_element_release_handle (demux_h);
+ status = ml_pipeline_element_release_handle (rate_h);
assert_eq (status, ML_ERROR_NONE);
status = ml_pipeline_destroy (handle);
{
IS_SUPPORT_FEATURE;
ml_pipeline_h handle = NULL;
- ml_pipeline_element_h demux_h = NULL;
+ ml_pipeline_element_h rate_h = NULL;
gchar *pipeline;
int ret_wrong_type;
int status;
- pipeline = g_strdup("videotestsrc ! video/x-raw,format=RGB,width=640,height=480 ! videorate max-rate=1 ! " \
- "tensor_converter ! tensor_mux ! tensor_demux name=demux ! tensor_sink");
+ pipeline = g_strdup("videotestsrc is-live=true ! videoconvert ! videoscale ! " \
+ "video/x-raw,width=640,height=480,framerate=30/1 ! tensor_converter ! " \
+ "tensor_rate name=trate framerate=45/1 throttle=false ! tensor_sink");
status = ml_pipeline_construct (pipeline, NULL, NULL, &handle);
assert_eq (status, ML_ERROR_NONE);
- status = ml_pipeline_element_get_handle (handle, "demux", &demux_h);
+ status = ml_pipeline_element_get_handle (handle, "trate", &rate_h);
assert_eq (status, ML_ERROR_NONE);
- status = ml_pipeline_element_set_property_string (demux_h, "tensorpick", "0");
+ status = ml_pipeline_element_set_property_string (rate_h, "framerate", "60/1");
assert_eq (status, ML_ERROR_NONE);
/* Test Code */
- status = ml_pipeline_element_get_property_int32 (demux_h, "tensorpick", &ret_wrong_type);
+ status = ml_pipeline_element_get_property_int32 (rate_h, "framerate", &ret_wrong_type);
assert_neq (status, ML_ERROR_NONE);
- status = ml_pipeline_element_release_handle (demux_h);
+ status = ml_pipeline_element_release_handle (rate_h);
assert_eq (status, ML_ERROR_NONE);
status = ml_pipeline_destroy (handle);