return;
}
-//& purpose: Checking tizen.org/privilege/mediastorage privilege
+//& purpose: Checking tizen.org/privilege/internet privileges
/**
* @testcase CTc_MediaStreamer_PrivilegeMediaStorage_node_create_src
* @since_tizen 3.0
int CTc_MediaStreamer_PrivilegeMediaStorage_node_create_src(void)
{
START_TEST;
- media_streamer_node_h src =NULL;
+
+ media_streamer_node_h hSrc =NULL;
int ret = MEDIA_STREAMER_ERROR_NONE;
- ret = media_streamer_node_create_src(MEDIA_STREAMER_NODE_SRC_TYPE_VIDEO_TEST, &src);
- PRINT_RESULT(TIZEN_ERROR_PERMISSION_DENIED, ret, "media_streamer_node_create_src", MediaStreamerGetError(ret));
- return 0;
+
+ media_streamer_node_src_type_e eSetSrcType[] =
+ {
+ MEDIA_STREAMER_NODE_SRC_TYPE_HTTP, /**< Http src type, Network internet feature is required */
+ MEDIA_STREAMER_NODE_SRC_TYPE_RTSP, /**< Rtsp src type, Network internet feature is required */
+};
+ int nEnumSize = sizeof(eSetSrcType) / sizeof(eSetSrcType[0]);
+ int nEnumCounter = 0;
+ for ( nEnumCounter=0; nEnumCounter<nEnumSize; nEnumCounter++)
+ {
+ ret = media_streamer_node_create_src(eSetSrcType[nEnumCounter], &hSrc);
+ if(ret == TIZEN_ERROR_PERMISSION_DENIED)
+ {
+ FPRINTF("[Line : %d][%s] media_streamer_node_create_src Pass\\n", __LINE__, API_NAMESPACE);\
+ return 0;
+ }
+ }
+
+ return 1;
}
-//& purpose: Checking tizen.org/privilege/mediastorage privilege
+//& purpose: Checking tizen.org/privilege/internet privilege
/**
* @testcase CTc_MediaStreamer_PrivilegeMediaStorage_node_create_sink
* @since_tizen 3.0
int CTc_MediaStreamer_PrivilegeMediaStorage_node_create_sink(void)
{
START_TEST;
+
int ret = MEDIA_STREAMER_ERROR_NONE;
- media_streamer_node_h video_sink = NULL;
- ret = media_streamer_node_create_sink(MEDIA_STREAMER_NODE_SINK_TYPE_CUSTOM, &video_sink);
- PRINT_RESULT(TIZEN_ERROR_PERMISSION_DENIED, ret, "media_streamer_node_create_sink", MediaStreamerGetError(ret));
- return 0;
+ media_streamer_node_h hSink = NULL;
+ media_streamer_node_sink_type_e eSetSinkType[] = {
+ MEDIA_STREAMER_NODE_SINK_TYPE_RTSP, /**< Rtsp sink type, Network internet feature is required */
+ MEDIA_STREAMER_NODE_SINK_TYPE_HTTP, /**< Http sink type, Network internet feature is required */
+};
+ int nEnumSize = sizeof(eSetSinkType) / sizeof(eSetSinkType[0]);
+ int nEnumCounter = 0;
+ for ( nEnumCounter=0; nEnumCounter<nEnumSize; nEnumCounter++)
+ {
+ ret = media_streamer_node_create_sink(eSetSinkType[nEnumCounter], &hSink);
+ if(ret == TIZEN_ERROR_PERMISSION_DENIED)
+ {
+ FPRINTF("[Line : %d][%s]media_streamer_node_create_sink Pass\\n", __LINE__, API_NAMESPACE);\
+ return 0;
+ }
+ }
+
+ return 1;
}
+//& purpose: Checking tizen.org/privilege/mediastorage privilege
+/**
+* @testcase CTc_MediaStreamer_PrivilegeMediaStorage_node_set_param
+* @since_tizen 3.0
+* @author SRID(nibha.sharma)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Set media streamer node param
+* @scenario media streamer node src create,media_streamer_node_set_param
+* @apicovered media_streamer_node_create_src,media_streamer_node_set_param
+* @passcase if target privileged API returns TIZEN_ERROR_PERMISSION_DENIED
+* @failcase If target privileged API does not return TIZEN_ERROR_PERMISSION_DENIED
+* @precondition NA
+* @postcondition NA
+*/
+int CTc_MediaStreamer_PrivilegeMediaStorage_node_set_param(void)
+{
+ START_TEST;
+ media_streamer_node_h hSrc =NULL;
+
+ int ret = media_streamer_node_create_src(MEDIA_STREAMER_NODE_SRC_TYPE_FILE, &hSrc);
+ PRINT_RESULT(MEDIA_STREAMER_ERROR_NONE, ret, "media_streamer_node_create_src", MediaStreamerGetError(ret));
+ CHECK_HANDLE(hSrc,"media_streamer_node_create_src");
+
+ ret = media_streamer_node_set_param(hSrc,MEDIA_STREAMER_PARAM_URI, g_pszFilePath);
+ PRINT_RESULT(TIZEN_ERROR_PERMISSION_DENIED, ret, "media_streamer_node_set_param", MediaStreamerGetError(ret));
+
+ return 0;
+}
extern int CTc_PhoneNumber_PrivilegePhoneNumberUtils_get_normalized_number(void);
extern int CTc_MediaStreamer_PrivilegeMediaStorage_node_create_src(void);
extern int CTc_MediaStreamer_PrivilegeMediaStorage_node_create_sink(void);
-
+extern int CTc_MediaStreamer_PrivilegeMediaStorage_node_set_param(void);
extern int CTc_Iotcon_PrivilegeNetworkGet_initialize_deinitialize_p(void);
extern int CTc_AccountManager_PrivilegeAccountReadWrite_query_label_by_locale(void);
{"CTc_PhoneNumber_PrivilegePhoneNumberUtils_get_normalized_number", CTc_PhoneNumber_PrivilegePhoneNumberUtils_get_normalized_number, CTs_platform_permission_phonenumber_utils_startup, CTs_platform_permission_phonenumber_utils_cleanup},
{"CTc_MediaStreamer_PrivilegeMediaStorage_node_create_src", CTc_MediaStreamer_PrivilegeMediaStorage_node_create_src, CTs_platform_permission_media_streamer_startup, CTs_platform_permission_media_streamer_cleanup},
{"CTc_MediaStreamer_PrivilegeMediaStorage_node_create_sink", CTc_MediaStreamer_PrivilegeMediaStorage_node_create_sink, CTs_platform_permission_media_streamer_startup, CTs_platform_permission_media_streamer_cleanup},
-
+ {"CTc_MediaStreamer_PrivilegeMediaStorage_node_set_param", CTc_MediaStreamer_PrivilegeMediaStorage_node_set_param, CTs_platform_permission_media_streamer_startup, CTs_platform_permission_media_streamer_cleanup},
{NULL, NULL}
};