From: Volodymyr Brynza Date: Fri, 17 Jun 2016 09:55:03 +0000 (+0300) Subject: [UTC][capi-media-streamer][Non-ACR][add checking bus callback] X-Git-Tag: Beta_RC10~38^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=feccd6b3d22481d912164cff0d65e05be04e6083;p=test%2Ftct%2Fnative%2Fapi.git [UTC][capi-media-streamer][Non-ACR][add checking bus callback] Change-Id: I841aa6e076f753a73610881ea1a505e39ecb6a36 Signed-off-by: Volodymyr Brynza --- diff --git a/src/utc/capi-media-streamer/tct-capi-media-streamer-core_mobile.h b/src/utc/capi-media-streamer/tct-capi-media-streamer-core_mobile.h index 12a1634..0ba69cb 100755 --- a/src/utc/capi-media-streamer/tct-capi-media-streamer-core_mobile.h +++ b/src/utc/capi-media-streamer/tct-capi-media-streamer-core_mobile.h @@ -54,6 +54,7 @@ extern int utc_media_streamer_play_p1(void); extern int utc_media_streamer_play_p2(void); extern int utc_media_streamer_play_n1(void); extern int utc_media_streamer_play_n2(void); +extern int utc_media_streamer_play_n3(void); extern int utc_media_streamer_pause_p(void); extern int utc_media_streamer_pause_n(void); extern int utc_media_streamer_set_position_p(void); @@ -167,6 +168,7 @@ testcase tc_array[] = { {"utc_media_streamer_play_p2", utc_media_streamer_play_p2, utc_capi_media_streamer_startup, utc_capi_media_streamer_cleanup}, {"utc_media_streamer_play_n1", utc_media_streamer_play_n1, utc_capi_media_streamer_startup, utc_capi_media_streamer_cleanup}, {"utc_media_streamer_play_n2", utc_media_streamer_play_n2, utc_capi_media_streamer_startup, utc_capi_media_streamer_cleanup}, + {"utc_media_streamer_play_n3", utc_media_streamer_play_n3, utc_capi_media_streamer_startup, utc_capi_media_streamer_cleanup}, {"utc_media_streamer_pause_p", utc_media_streamer_pause_p, utc_capi_media_streamer_startup, utc_capi_media_streamer_cleanup}, {"utc_media_streamer_pause_n", utc_media_streamer_pause_n, utc_capi_media_streamer_startup, utc_capi_media_streamer_cleanup}, {"utc_media_streamer_set_position_p", utc_media_streamer_set_position_p, utc_capi_media_streamer_startup, utc_capi_media_streamer_cleanup}, diff --git a/src/utc/capi-media-streamer/utc-capi-media-streamer.c b/src/utc/capi-media-streamer/utc-capi-media-streamer.c index 1418bce..0a10d69 100755 --- a/src/utc/capi-media-streamer/utc-capi-media-streamer.c +++ b/src/utc/capi-media-streamer/utc-capi-media-streamer.c @@ -560,9 +560,59 @@ int utc_media_streamer_play_n2(void) assert_eq(ret, MEDIA_STREAMER_ERROR_INVALID_OPERATION); wait_for_async(PLAY_TIME); + ret = media_streamer_play(NULL); + assert_eq(ret, MEDIA_STREAMER_ERROR_INVALID_PARAMETER); + return 0; } +#ifdef MOBILE //Starts MOBILE +//& purpose: A purpose of a first negative TC. +/** + * @testcase utc_media_streamer_play_n3 + * @since_tizen 3.0 + * @description Sets media streamer state + * to MEDIA_STREAMER_STATE_PLAYING. + */ +int utc_media_streamer_play_n3(void) +{ + int ret = MEDIA_STREAMER_ERROR_NONE; + + media_streamer_node_h src = NULL; + ret = media_streamer_node_create_src(MEDIA_STREAMER_NODE_SRC_TYPE_CAMERA, &src); + assert_eq(ret, MEDIA_STREAMER_ERROR_NONE); + assert_neq(src, NULL); + APPEND_NODE(src); + + media_streamer_node_set_param(src, MEDIA_STREAMER_PARAM_CAMERA_ID, CAMERA_ID); + assert_eq(ret, MEDIA_STREAMER_ERROR_NONE); + + media_streamer_node_h sink = NULL; + ret = media_streamer_node_create_sink(MEDIA_STREAMER_NODE_SINK_TYPE_FAKE, &sink); + assert_eq(ret, MEDIA_STREAMER_ERROR_NONE); + assert_neq(sink, NULL); + APPEND_NODE(sink); + + ret = media_streamer_node_add(streamer, src); + assert_eq(ret, MEDIA_STREAMER_ERROR_NONE); + + ret = media_streamer_node_add(streamer, sink); + assert_eq(ret, MEDIA_STREAMER_ERROR_NONE); + + ret = media_streamer_node_link(src, "src", sink, "sink"); + assert_eq(ret, MEDIA_STREAMER_ERROR_NONE); + + ret = media_streamer_prepare(streamer); + assert_eq(ret, MEDIA_STREAMER_ERROR_INVALID_OPERATION); + wait_for_async(PLAY_TIME); + + ret = media_streamer_play(streamer); + assert_eq(ret, MEDIA_STREAMER_ERROR_INVALID_STATE); + + return 0; +} +#endif //MOBILE //End MOBILE + //& purpose: A purpose of a first positive TC. /** * @testcase utc_media_streamer_pause_p