From: Shobhit Verma Date: Fri, 5 Aug 2022 04:29:46 +0000 (+0530) Subject: [ITC][capi-media-streamer][ACR-1708] Removed deprecated package from ITC and CTC X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c1b9de915c95edbd5123bdd391d173758667f32b;p=test%2Ftct%2Fnative%2Fapi.git [ITC][capi-media-streamer][ACR-1708] Removed deprecated package from ITC and CTC Change-Id: I780859f715dfbac6b6c9cac7f52f1ee42d59291f Signed-off-by: Shobhit Verma --- diff --git a/packaging/ctc/native-platform-permission-ctc.spec b/packaging/ctc/native-platform-permission-ctc.spec index 8385ac2ff..3a240c9c0 100755 --- a/packaging/ctc/native-platform-permission-ctc.spec +++ b/packaging/ctc/native-platform-permission-ctc.spec @@ -71,7 +71,6 @@ BuildRequires: pkgconfig(capi-ui-efl-util) BuildRequires: pkgconfig(stt) BuildRequires: cmake BuildRequires: pkgconfig(capi-network-http) -BuildRequires: pkgconfig(capi-media-streamer) BuildRequires: pkgconfig(capi-network-wifi-manager) BuildRequires: pkgconfig(capi-appfw-alarm) diff --git a/packaging/itc/native-capi-media-streamer-itc.spec b/packaging/itc/native-capi-media-streamer-itc.spec deleted file mode 100755 index d325881ee..000000000 --- a/packaging/itc/native-capi-media-streamer-itc.spec +++ /dev/null @@ -1,90 +0,0 @@ -%define MODULE_NAME capi-media-streamer -%define MODULE_LIBNAME capi-media-streamer -Name: native-%{MODULE_NAME}-itc -Summary: Native API Integration TC (%{name}) -Version: 0.1 -Release: 0 -Group: Development/Tools -License: Apache-2.0 -Source0: %{name}-%{version}.tar.gz -BuildRequires: pkgconfig(%{MODULE_LIBNAME}) -BuildRequires: pkgconfig(capi-appfw-application) -BuildRequires: pkgconfig(elementary) -BuildRequires: pkgconfig(glib-2.0) -BuildRequires: cmake -BuildRequires: pkgconfig(bundle) -BuildRequires: pkgconfig(ecore) -BuildRequires: pkgconfig(dlog) -BuildRequires: pkgconfig(mm-common) -BuildRequires: pkgconfig(capi-base-common) -BuildRequires: pkgconfig(capi-media-tool) -BuildRequires: pkgconfig(libtbm) -BuildRequires: pkgconfig(gstreamer-1.0) -BuildRequires: pkgconfig(gstreamer-plugins-base-1.0) -BuildRequires: pkgconfig(gstreamer-video-1.0) -BuildRequires: pkgconfig(gstreamer-app-1.0) -BuildRequires: pkgconfig(iniparser) -BuildRequires: pkgconfig(capi-system-info) - -%description -Native API Integration TC (%{name}) - -%prep -%setup -q - -%build - -%define PREFIX "%{_libdir}/%{name}" - -export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed" - -%if %{?ASAN_BUILD:1}0 - %if %{?DEVICE_BUILD_TYPE_MOBILE:1}0 - cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="mobile" -DASANBUILD="true" -DCMAKE_INSTALL_PREFIX=%{_prefix} - %endif - %if %{?DEVICE_BUILD_TYPE_WEARABLE:1}0 - cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="wearable" -DASANBUILD="true" -DCMAKE_INSTALL_PREFIX=%{_prefix} - %endif - %if %{?DEVICE_BUILD_TYPE_TV:1}0 - cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="tv" -DASANBUILD="true" -DCMAKE_INSTALL_PREFIX=%{_prefix} - %endif - %if %{?DEVICE_BUILD_TYPE_TIZENIOT:1}0 - cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="tizeniot" -DASANBUILD="true" -DCMAKE_INSTALL_PREFIX=%{_prefix} - %endif -%else - %if %{?DEVICE_BUILD_TYPE_MOBILE:1}0 - cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="mobile" -DASANBUILD="false" -DCMAKE_INSTALL_PREFIX=%{_prefix} - %endif - %if %{?DEVICE_BUILD_TYPE_WEARABLE:1}0 - cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="wearable" -DASANBUILD="false" -DCMAKE_INSTALL_PREFIX=%{_prefix} - %endif - %if %{?DEVICE_BUILD_TYPE_TV:1}0 - cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="tv" -DASANBUILD="false" -DCMAKE_INSTALL_PREFIX=%{_prefix} - %endif - %if %{?DEVICE_BUILD_TYPE_TIZENIOT:1}0 - cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="tizeniot" -DASANBUILD="false" -DCMAKE_INSTALL_PREFIX=%{_prefix} - %endif -%endif - -make %{?jobs:-j%jobs} - -%install -rm -rf %{buildroot} -%make_install -mkdir -p %{buildroot}/usr/share/license -cp LICENSE %{buildroot}/usr/share/license/%{name} - -mkdir -p %{buildroot}/usr/share/packages/ -cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/usr/share/packages/ -mkdir -p %{buildroot}%{APP_PATH}%{name}/bin -#cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin - -%post - -%postun - - -%files -%{APP_PATH}%{name}/* -/usr/share/packages/native-%{MODULE_NAME}-itc.xml -/usr/share/license/%{name} diff --git a/packaging/itc/native-capi-media-streamer-itc.xml b/packaging/itc/native-capi-media-streamer-itc.xml deleted file mode 100755 index 05ab5bdfd..000000000 --- a/packaging/itc/native-capi-media-streamer-itc.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - test - Native API test Application - - - - - - - - - - http://tizen.org/privilege/internet - http://tizen.org/privilege/camera - http://tizen.org/privilege/recorder - - diff --git a/src/ctc/platform-permission/CMakeLists.txt b/src/ctc/platform-permission/CMakeLists.txt index fe1a39b88..a9857cfc6 100755 --- a/src/ctc/platform-permission/CMakeLists.txt +++ b/src/ctc/platform-permission/CMakeLists.txt @@ -60,7 +60,6 @@ SET(TC_SOURCES CTs-platform-permission-efl-util.c CTs-platform-permission-iotcon.c CTs-platform-permission-phonenumber-utils.c - CTs-platform-permission-media-streamer.c CTs-platform-permission-http.c CTs-platform-permission-wifi-manager.c ) @@ -94,7 +93,6 @@ SET(TC_SOURCES CTs-platform-permission-widget-service.c CTs-platform-permission-widget-viewer.c CTs-platform-permission-http.c - CTs-platform-permission-media-streamer.c CTs-platform-permission-wifi-manager.c ) ENDIF() @@ -106,7 +104,6 @@ PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED sqlite3 shortcut phonenumber-utils - capi-media-streamer dlog db-util glib-2.0 @@ -210,7 +207,6 @@ PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED alarm-service capi-network-bluetooth capi-system-info - capi-media-streamer capi-system-runtime-info capi-location-manager capi-network-connection diff --git a/src/ctc/platform-permission/tct-platform-permission-native_mobile.h b/src/ctc/platform-permission/tct-platform-permission-native_mobile.h index 8de6c0bcf..3085fe677 100755 --- a/src/ctc/platform-permission/tct-platform-permission-native_mobile.h +++ b/src/ctc/platform-permission/tct-platform-permission-native_mobile.h @@ -113,8 +113,6 @@ extern void CTs_platform_permission_iotcon_startup(void); extern void CTs_platform_permission_iotcon_cleanup(void); extern void CTs_platform_permission_phonenumber_utils_startup(void); extern void CTs_platform_permission_phonenumber_utils_cleanup(void); -extern void CTs_platform_permission_media_streamer_startup(void); -extern void CTs_platform_permission_media_streamer_cleanup(void); extern void CTs_platform_permission_http_startup(void); extern void CTs_platform_permission_http_cleanup(void); extern void CTs_platform_permission_wifi_manager_startup(void); @@ -610,10 +608,6 @@ testcase tc_array[] = { {"CTc_EflUtil_Privilege_efl_util_set_window_brightness",CTc_EflUtil_Privilege_efl_util_set_window_brightness,CTs_platform_permission_efl_util_startup,CTs_platform_permission_efl_util_cleanup}, {"CTc_Iotcon_PrivilegeNetworkGet_initialize_deinitialize_p",CTc_Iotcon_PrivilegeNetworkGet_initialize_deinitialize_p,CTs_platform_permission_iotcon_startup,CTs_platform_permission_iotcon_cleanup}, {"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}, - {"CTc_MediaStreamer_PrivilegeMediaStorage_node_set_params",CTc_MediaStreamer_PrivilegeMediaStorage_node_set_params,CTs_platform_permission_media_streamer_startup,CTs_platform_permission_media_streamer_cleanup}, {"CTc_Http_PrivilegeInternet_http_transaction_submit",CTc_Http_PrivilegeInternet_http_transaction_submit,CTs_platform_permission_http_startup,CTs_platform_permission_http_cleanup}, {"CTc_Wifi_Manager_Privilege_NetworkGet",CTc_Wifi_Manager_Privilege_NetworkGet,CTs_platform_permission_wifi_manager_startup,CTs_platform_permission_wifi_manager_cleanup}, {NULL, NULL} diff --git a/src/ctc/platform-permission/tct-platform-permission-native_tizeniot.h b/src/ctc/platform-permission/tct-platform-permission-native_tizeniot.h index 8de6c0bcf..3085fe677 100755 --- a/src/ctc/platform-permission/tct-platform-permission-native_tizeniot.h +++ b/src/ctc/platform-permission/tct-platform-permission-native_tizeniot.h @@ -113,8 +113,6 @@ extern void CTs_platform_permission_iotcon_startup(void); extern void CTs_platform_permission_iotcon_cleanup(void); extern void CTs_platform_permission_phonenumber_utils_startup(void); extern void CTs_platform_permission_phonenumber_utils_cleanup(void); -extern void CTs_platform_permission_media_streamer_startup(void); -extern void CTs_platform_permission_media_streamer_cleanup(void); extern void CTs_platform_permission_http_startup(void); extern void CTs_platform_permission_http_cleanup(void); extern void CTs_platform_permission_wifi_manager_startup(void); @@ -610,10 +608,6 @@ testcase tc_array[] = { {"CTc_EflUtil_Privilege_efl_util_set_window_brightness",CTc_EflUtil_Privilege_efl_util_set_window_brightness,CTs_platform_permission_efl_util_startup,CTs_platform_permission_efl_util_cleanup}, {"CTc_Iotcon_PrivilegeNetworkGet_initialize_deinitialize_p",CTc_Iotcon_PrivilegeNetworkGet_initialize_deinitialize_p,CTs_platform_permission_iotcon_startup,CTs_platform_permission_iotcon_cleanup}, {"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}, - {"CTc_MediaStreamer_PrivilegeMediaStorage_node_set_params",CTc_MediaStreamer_PrivilegeMediaStorage_node_set_params,CTs_platform_permission_media_streamer_startup,CTs_platform_permission_media_streamer_cleanup}, {"CTc_Http_PrivilegeInternet_http_transaction_submit",CTc_Http_PrivilegeInternet_http_transaction_submit,CTs_platform_permission_http_startup,CTs_platform_permission_http_cleanup}, {"CTc_Wifi_Manager_Privilege_NetworkGet",CTc_Wifi_Manager_Privilege_NetworkGet,CTs_platform_permission_wifi_manager_startup,CTs_platform_permission_wifi_manager_cleanup}, {NULL, NULL} diff --git a/src/ctc/platform-permission/tct-platform-permission-native_wearable.h b/src/ctc/platform-permission/tct-platform-permission-native_wearable.h index 8a6ad36bf..df67aa96d 100755 --- a/src/ctc/platform-permission/tct-platform-permission-native_wearable.h +++ b/src/ctc/platform-permission/tct-platform-permission-native_wearable.h @@ -69,8 +69,6 @@ extern void CTs_platform_permission_WidgetViewer_startup(void); extern void CTs_platform_permission_WidgetViewer_cleanup(void); extern void CTs_platform_permission_http_startup(void); extern void CTs_platform_permission_http_cleanup(void); -extern void CTs_platform_permission_media_streamer_startup(void); -extern void CTs_platform_permission_media_streamer_cleanup(void); extern void CTs_platform_permission_wifi_manager_startup(void); extern void CTs_platform_permission_wifi_manager_cleanup(void); @@ -341,10 +339,6 @@ testcase tc_array[] = { {"CTc_WidgetService_PrivilegeWidgetViewer_get_supported_size_types",CTc_WidgetService_PrivilegeWidgetViewer_get_supported_size_types,CTs_platform_permission_widgetservice_startup,CTs_platform_permission_widgetservice_cleanup}, {"CTc_WidgetViewer_PrivilegeWidgetViewer",CTc_WidgetViewer_PrivilegeWidgetViewer,CTs_platform_permission_WidgetViewer_startup,CTs_platform_permission_WidgetViewer_cleanup}, {"CTc_Http_PrivilegeInternet_http_transaction_submit",CTc_Http_PrivilegeInternet_http_transaction_submit,CTs_platform_permission_http_startup,CTs_platform_permission_http_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}, - {"CTc_MediaStreamer_PrivilegeMediaStorage_node_set_params",CTc_MediaStreamer_PrivilegeMediaStorage_node_set_params,CTs_platform_permission_media_streamer_startup,CTs_platform_permission_media_streamer_cleanup}, {"CTc_Wifi_Manager_Privilege_NetworkGet",CTc_Wifi_Manager_Privilege_NetworkGet,CTs_platform_permission_wifi_manager_startup,CTs_platform_permission_wifi_manager_cleanup}, {NULL, NULL} }; diff --git a/src/itc/capi-media-streamer/CMakeLists.txt b/src/itc/capi-media-streamer/CMakeLists.txt deleted file mode 100755 index ceb8b1290..000000000 --- a/src/itc/capi-media-streamer/CMakeLists.txt +++ /dev/null @@ -1,48 +0,0 @@ -SET(PKG_NAME "capi-media-streamer") - -SET(EXEC_NAME "tct-${PKG_NAME}-native") -SET(RPM_NAME "native-${PKG_NAME}-itc") - -SET(CAPI_LIB "capi-media-streamer") -SET(TC_SOURCES - ITs-capi-media-streamer-common.c - ITs-capi-media-streamer.c -) - -PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED - ${CAPI_LIB} - capi-appfw-application - capi-system-info - bundle - dlog - ecore - capi-media-tool - capi-media-streamer - glib-2.0 -) - -INCLUDE_DIRECTORIES( - ${${CAPI_LIB}_INCLUDE_DIRS} -) - -ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES} ${COMMON_FILE}) -TARGET_LINK_LIBRARIES(${EXEC_NAME} - ${${CAPI_LIB}_LIBRARIES} - bundle - dlog - capi-media-tool - capi-media-streamer - glib-2.0 -) - -INSTALL(PROGRAMS ${EXEC_NAME} - DESTINATION ${BIN_DIR}/${RPM_NAME}/bin -) - -IF( DEFINED ASAN ) -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -Wall -pie -g -fsanitize=address -fsanitize-recover=address -U_FORTIFY_SOURCE -fno-omit-frame-pointer") -SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -Wl,-fsanitize=address") -ELSE() -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -g -fPIE -Wall") -SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie") -ENDIF() diff --git a/src/itc/capi-media-streamer/ITs-capi-media-streamer-common.c b/src/itc/capi-media-streamer/ITs-capi-media-streamer-common.c deleted file mode 100755 index 3338c6a58..000000000 --- a/src/itc/capi-media-streamer/ITs-capi-media-streamer-common.c +++ /dev/null @@ -1,120 +0,0 @@ -// -// Copyright (c) 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Apache License, Version 2.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -#include "ITs-capi-media-streamer-common.h" - -/** @addtogroup itc-capi-media-streamer -* @ingroup itc -* @{ -*/ - -//Add helper function definitions here - -/** -* @function MediaStreamerGetError -* @description Maps error enums to string values -* @parameter nRet : error code returned -* @return error string -*/ -char* MediaStreamerGetError(int nRet) -{ - char *szErrorVal = NULL; - switch ( nRet ) - { - case MEDIA_STREAMER_ERROR_NONE: szErrorVal = "MEDIA_STREAMER_ERROR_NONE"; break; - case MEDIA_STREAMER_ERROR_INVALID_PARAMETER: szErrorVal = "MEDIA_STREAMER_ERROR_INVALID_PARAMETER"; break; - case MEDIA_STREAMER_ERROR_INVALID_OPERATION: szErrorVal = "MEDIA_STREAMER_ERROR_INVALID_OPERATION"; break; - case MEDIA_STREAMER_ERROR_FILE_NO_SPACE_ON_DEVICE: szErrorVal = "MEDIA_STREAMER_ERROR_FILE_NO_SPACE_ON_DEVICE";break; - case MEDIA_STREAMER_ERROR_NOT_SUPPORTED: szErrorVal = "MEDIA_STREAMER_ERROR_NOT_SUPPORTED"; break; - case MEDIA_STREAMER_ERROR_PERMISSION_DENIED: szErrorVal = "MEDIA_STREAMER_ERROR_PERMISSION_DENIED"; break; - case MEDIA_STREAMER_ERROR_INVALID_STATE: szErrorVal = "MEDIA_STREAMER_ERROR_INVALID_STATE"; break; - case MEDIA_STREAMER_ERROR_CONNECTION_FAILED: szErrorVal = "MEDIA_STREAMER_ERROR_CONNECTION_FAILED"; break; - case MEDIA_STREAMER_ERROR_RESOURCE_CONFLICT: szErrorVal = "MEDIA_STREAMER_ERROR_RESOURCE_CONFLICT"; break; - case MEDIA_STREAMER_ERROR_SEEK_FAILED: szErrorVal = "MEDIA_STREAMER_ERROR_SEEK_FAILED"; break; - default: szErrorVal = "Unknown Error"; break; - } - return szErrorVal; -} -/** -* @function MediaStreamerGetState -* @description Maps error enums to string values -* @parameter nRet : error code returned -* @return error string -*/ -char* MediaStreamerGetState(int nRet) -{ - char *szState = NULL; - switch ( nRet ) - { - case MEDIA_STREAMER_STATE_NONE: szState = "MEDIA_STREAMER_STATE_NONE"; break; - case MEDIA_STREAMER_STATE_IDLE: szState = "MEDIA_STREAMER_STATE_IDLE"; break; - case MEDIA_STREAMER_STATE_READY: szState = "MEDIA_STREAMER_STATE_READY"; break; - case MEDIA_STREAMER_STATE_PLAYING: szState = "MEDIA_STREAMER_STATE_PLAYING"; break; - case MEDIA_STREAMER_STATE_PAUSED: szState = "MEDIA_STREAMER_STATE_PAUSED"; break; - case MEDIA_STREAMER_STATE_SEEKING: szState = "MEDIA_STREAMER_STATE_SEEKING"; break; - default: szState = "Unknown Error"; break; - } - return szState; -} - -/** -* @function SystemInfoGetError -* @description Maps error enums to string values -* @parameter nRet : error code returned -* @return error string -*/ -char* SystemInfoGetError(int nRet) -{ - char *szErrorVal = NULL; - switch ( nRet ) - { - case SYSTEM_INFO_ERROR_NONE : szErrorVal = "SYSTEM_INFO_ERROR_NONE"; break; - case SYSTEM_INFO_ERROR_INVALID_PARAMETER : szErrorVal = "SYSTEM_INFO_ERROR_INVALID_PARAMETER"; break; - case SYSTEM_INFO_ERROR_IO_ERROR : szErrorVal = "SYSTEM_INFO_ERROR_IO_ERROR"; break; - case SYSTEM_INFO_ERROR_OUT_OF_MEMORY : szErrorVal = "SYSTEM_INFO_ERROR_OUT_OF_MEMORY"; break; - case SYSTEM_INFO_ERROR_NOT_SUPPORTED : szErrorVal = "SYSTEM_INFO_ERROR_NOT_SUPPORTED"; break; - default : szErrorVal = "Unknown error"; break; - } - return szErrorVal; -} - -/** -* @function MediaStreamerTimeoutFunction -* @description Called if some callback is not invoked for a Timeout -* @parameter gpointer data -* @return gboolean -*/ -gboolean MediaStreamerTimeoutFunction(gpointer data) -{ - FPRINTF("[Line : %d][%s] Callback MediaStreamer wait complete for 20 seconds. Timeout\\n",__LINE__, API_NAMESPACE); - ecore_main_loop_quit(); - return FALSE; -} - - - -/** -* @function MediaStreamerWaitForAsync -* @description Called to wait callback function -* @parameter NA -* @return NA -*/ -void MediaStreamerWaitForAsync() -{ - g_timeout_add(TIMEOUT, MediaStreamerTimeoutFunction, NULL); - ecore_main_loop_begin(); -} - -/** @} */ \ No newline at end of file diff --git a/src/itc/capi-media-streamer/ITs-capi-media-streamer-common.h b/src/itc/capi-media-streamer/ITs-capi-media-streamer-common.h deleted file mode 100755 index 29c444c2c..000000000 --- a/src/itc/capi-media-streamer/ITs-capi-media-streamer-common.h +++ /dev/null @@ -1,97 +0,0 @@ -// -// Copyright (c) 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Apache License, Version 2.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -#ifndef _ITS_CAPI_MEDIA_STREAMER_COMMON_H_ -#define _ITS_CAPI_MEDIA_STREAMER_COMMON_H_ - -//Add test package related includes here -#include "tct_common.h" -#include -#include -#include -#include - -media_format_h vfmt_encoded; -media_streamer_h streamer; -bool g_bMediaStreamerPositionChangedCallback; -#define VIDEO_WIDTH 1280 -#define VIDEO_HEIGHT 720 -#define VIDEO_FRAME_RATE 30 -#define API_NAMESPACE "CAPI_MEDIA_STREAMER_ITC" -#define USER_DATA_STR "callback_user_data" -#define TIMEOUT 20000 - - -#define START_TEST {\ - FPRINTF("\\n[Line : %d][%s] Starting test : %s\\n",__LINE__, API_NAMESPACE,__FUNCTION__);\ -} - - - -/** @addtogroup itc-%{MODULE_NAME} -* @ingroup itc -* @{ -*/ - -//Add helper function declarations here - - -/** -* @function MediaStreamerGetError -* @description Maps error enums to string values -* @parameter nRet : error code returned -* @return error string -*/ -char* MediaStreamerGetError(int nRet); - - - -/** -* @function MediaStreamerGetState -* @description Maps error enums to string values -* @parameter nRet : error code returned -* @return error string -*/ -char* MediaStreamerGetState(int nRet); - - - -/** -* @function MediaStreamerTimeoutFunction -* @description Called if some callback is not invoked for a Timeout -* @parameter gpointer data -* @return gboolean -*/ -gboolean MediaStreamerTimeoutFunction(gpointer data); - - - -/** -* @function MediaStreamerWaitForAsync -* @description Called to wait callback function -* @parameter NA -* @return NA -*/ -void MediaStreamerWaitForAsync(); - -/** -* @function SystemInfoGetError -* @description Maps error enums to string values -* @parameter nRet : error code returned -* @return error string -*/ -char* SystemInfoGetError(int nRet); -/** @} */ -#endif //_ITS_CAPI_MEDIA_STREAMER_COMMON_H_ diff --git a/src/itc/capi-media-streamer/ITs-capi-media-streamer.c b/src/itc/capi-media-streamer/ITs-capi-media-streamer.c deleted file mode 100755 index 2e96dcd15..000000000 --- a/src/itc/capi-media-streamer/ITs-capi-media-streamer.c +++ /dev/null @@ -1,1144 +0,0 @@ -// -// Copyright (c) 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Apache License, Version 2.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -#include "ITs-capi-media-streamer-common.h" -#define FEATURE_NAME_WIFI "http://tizen.org/feature/network.wifi" -#define FEATURE_NAME_TELEPHONY "http://tizen.org/feature/network.telephony" -#define FEATURE_NAME_ETHERNET "http://tizen.org/feature/network.ethernet" - -//& set: CapiMedia-streamer - -/** @addtogroup itc-capi-media-streamer -* @ingroup itc -* @{ -*/ - -#define PLAY_TIME 5 - -const char *g_pszFilePath = NULL; -static GMainLoop *g_mainloop = NULL; - -/** - * @function ITs_capi_media_streamer_startup - * @description Called before each test - * @parameter NA - * @return NA - */ -void ITs_capi_media_streamer_startup(void) -{ - struct stat stBuff; - int nRetVal =-1; - if ( stat(ERR_LOG, &stBuff) == 0 ) - { - remove(ERR_LOG); - } - - char pszValue[CONFIG_VALUE_LEN_MAX] = {0,}; - if ( true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE )) - { - FPRINTF("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE, pszValue); - int path_size = strlen(pszValue)+strlen("/res/test_10sec.mp4")+1; - g_pszFilePath=(char*)calloc(path_size, sizeof(char)); - if (g_pszFilePath == NULL) - { - FPRINTF("[Line : %d][%s] Memory Allocation Failed for g_pszFilePath \\n", __LINE__, API_NAMESPACE); - return; - } - snprintf(g_pszFilePath, path_size, "%s/res/test_10sec.mp4", pszValue); - } - else - { - FPRINTF("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE); - } - - nRetVal = media_streamer_create(&streamer); - if(nRetVal < 0) - { - FPRINTF("[Line : %d][%s] media_streamer_create failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, MediaStreamerGetError(nRetVal), nRetVal); - return; - } - - nRetVal = media_format_create(&vfmt_encoded); - if(nRetVal < 0) - { - FPRINTF("[Line : %d][%s] media_format_create failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, MediaStreamerGetError(nRetVal), nRetVal); - return; - } - nRetVal = media_format_set_video_mime(vfmt_encoded, MEDIA_FORMAT_H263); - if(nRetVal < 0) - { - FPRINTF("[Line : %d][%s] media_format_set_video_mime failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, MediaStreamerGetError(nRetVal), nRetVal); - return; - } - nRetVal = media_format_set_video_width(vfmt_encoded, VIDEO_WIDTH); - if(nRetVal != MEDIA_FORMAT_ERROR_NONE) - { - FPRINTF("[Line : %d][%s] media_format_set_video_width failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, MediaStreamerGetError(nRetVal), nRetVal); - return; - } - nRetVal = media_format_set_video_height(vfmt_encoded, VIDEO_HEIGHT); - if(nRetVal != MEDIA_FORMAT_ERROR_NONE) - { - FPRINTF("[Line : %d][%s] media_format_set_video_height failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, MediaStreamerGetError(nRetVal), nRetVal); - return; - } - nRetVal = media_format_set_video_frame_rate(vfmt_encoded, VIDEO_FRAME_RATE); - if(nRetVal != MEDIA_FORMAT_ERROR_NONE) - { - FPRINTF("[Line : %d][%s] media_format_set_video_frame_rate failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, MediaStreamerGetError(nRetVal), nRetVal); - return; - } - return; -} - - -/** - * @function ITs_capi_media_streamer_cleanup - * @description Called after each test - * @parameter NA - * @return NA - */ -void ITs_capi_media_streamer_cleanup(void) -{ - int nRetVal =-1; - media_format_unref(vfmt_encoded); - nRetVal = media_streamer_destroy(streamer); - if(nRetVal < 0) - { - FPRINTF("[Line : %d][%s] media_streamer_destroy failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, MediaStreamerGetError(nRetVal), nRetVal); - return; - } - - if (g_pszFilePath) { - free(g_pszFilePath); - g_pszFilePath = NULL; - } - - - return; -} - -/** @addtogroup itc-capi-media-streamer-testcases -* @brief Integration testcases for module capi-media-streamer -* @ingroup itc-capi-media-streamer -* @{ -*/ - -/** -* @function buffer_status_cb -* @description callback function for buffer status -* @parameter key: streamer node,buffer status and user data sent to callback -* @return NA -*/ - -void buffer_status_cb(media_streamer_node_h node, - media_streamer_custom_buffer_status_e status, - void *user_data) { - - if (status == MEDIA_STREAMER_CUSTOM_BUFFER_UNDERRUN) - { - /* Buffer status cb got underflow */ - char *test = "This is buffer_status_cb test!"; - - unsigned int size = strlen(test); - - media_packet_h packet; - media_packet_create_from_external_memory(vfmt_encoded,(void *)test, size, NULL, NULL, &packet); - media_streamer_node_push_packet(node, packet); - } - else - { - /* Buffer status cb got overflow */ - media_streamer_node_push_packet(node, NULL); - } -} - -static gboolean timeout_func(gpointer data) -{ - fprintf(stdout, "Loop timeout is finished!\n"); - g_main_loop_quit((GMainLoop *) data); - return FALSE; -} - -static void wait_for_async(unsigned int sec) -{ - g_mainloop = g_main_loop_new(NULL, FALSE); - - g_timeout_add_seconds(sec, timeout_func, g_mainloop); - g_main_loop_run(g_mainloop); - g_main_loop_unref(g_mainloop); - g_mainloop = NULL; -} - -/** -* @function new_buffer_cb -* @description callback function for new buffer -* @parameter key: streamer node and user data sent to callback -* @return NA -*/ -void new_buffer_cb(media_streamer_node_h node, void *user_data) -{ - char *received_data = NULL; - media_packet_h packet; - - media_streamer_node_pull_packet(node, &packet); - - media_packet_get_buffer_data_ptr(packet, (void **)&received_data); - - media_packet_destroy(packet); -} -/** -* @function interrupted_cb -* @description Called when the media streamer is interrupted -* @parameter error code: The interrupted error code and user data sent to callback -* @return NA -*/ -void interrupted_cb(media_streamer_interrupted_code_e code, void *user_data) -{ - FPRINTF("[Line : %d][%s] interrupted_cb CALLBACK INVOKED", __LINE__, API_NAMESPACE); -} -//& purpose: A purpose of a first positive TC. -//& type: auto -/** -* @testcase ITc_capi_media_streamer_prepare_unprepare_p -* @since_tizen 3.0 -* @author SRID(manoj.g2) -* @reviewer SRID(gupta.sanjay) -* @type auto -* @description Prepare and unprepare media streamer -* @scenario create media streamer\n -* Prepare media Streamer\n -* Unprepare media streamer and Destroy -* @apicovered media_streamer_prepare\n - media_streamer_unprepare\n -* @passcase When media_streamer_create and media_streamer_prepare are successful. -* @failcase If target API's media_streamer_create or media_streamer_prepare fails or any precondition or postcondition API fails -* @precondition At least one src and one sink should be added and linked in the streamer -* by calling media_streamer_node_create_src(), media_streamer_node_create_sink() and media_streamer_node_link(). -* @postcondition The media streamer state will be #MEDIA_STREANER_STATE_READY. -*/ -int ITc_capi_media_streamer_prepare_unprepare_p(void) -{ - START_TEST; - int ret = -1; - CHECK_HANDLE(streamer,"ITc_capi_media_streamer_prepare_unprepare_p"); - media_streamer_node_h video_src = NULL; - ret = media_streamer_node_create_src(MEDIA_STREAMER_NODE_SRC_TYPE_VIDEO_TEST, &video_src); - PRINT_RESULT(MEDIA_STREAMER_ERROR_NONE, ret, "media_streamer_create_src", MediaStreamerGetError(ret)); - CHECK_HANDLE(video_src,"ITc_capi_media_streamer_prepare_unprepare_p_video_src"); - ret = media_streamer_node_add(streamer, video_src); - PRINT_RESULT(MEDIA_STREAMER_ERROR_NONE, ret, "media_streamer_node_add", MediaStreamerGetError(ret)); - - media_streamer_node_h video_sink = NULL; - ret = media_streamer_node_create_sink(MEDIA_STREAMER_NODE_SINK_TYPE_FAKE, &video_sink); - PRINT_RESULT(MEDIA_STREAMER_ERROR_NONE, ret, "media_streamer_create_Sink", MediaStreamerGetError(ret)); - CHECK_HANDLE(video_sink,"ITc_capi_media_streamer_prepare_unprepare_p_video_sink"); - ret = media_streamer_node_add(streamer, video_sink); - PRINT_RESULT(MEDIA_STREAMER_ERROR_NONE, ret, "media_streamer_node_add", MediaStreamerGetError(ret)); - - - ret = media_streamer_node_link(video_src, "src", video_sink, "sink"); - PRINT_RESULT(MEDIA_STREAMER_ERROR_NONE, ret, "media_streamer_node_link", MediaStreamerGetError(ret)); - - ret = media_streamer_prepare(streamer); - PRINT_RESULT(MEDIA_STREAMER_ERROR_NONE, ret, "media_streamer_prepare", MediaStreamerGetError(ret)); - wait_for_async(PLAY_TIME); - ret = media_streamer_unprepare(streamer); - PRINT_RESULT(MEDIA_STREAMER_ERROR_NONE, ret, "media_streamer_unprepare", MediaStreamerGetError(ret)); - return 0; -} - - - -/** -* @testcase ITc_capi_media_streamer_play_pause_stop_p -* @since_tizen 3.0 -* @author SRID(manoj.g2) -* @reviewer SRID(gupta.sanjay) -* @type auto -* @description Play and Pause media streamer -* @scenario create media streamer\n -* Prepare media Streamer\n -* Play media Streamer\n -* Pause media Streamer\n -* Stop media Streamer\n -* @apicovered media_streamer_create\n -* media_streamer_prepare\n -* media_streamer_play\n -* media_streamer_pause\n -* media_streamer_stop\n -* media_streamer_unprepare -* @passcase When media_streamer_create and media_streamer_prepare,play,pause,stop are successful. -* @failcase If target API's media_streamer_create or media_streamer_prepare fails or any precondition or postcondition API fails -* @precondition The media streamer state must be set to #MEDIA_STREAMER_STATE_PLAYING. -* @postcondition The media streamer state will be #MEDIA_STREANER_STATE_READY. -*/ -int ITc_capi_media_streamer_play_pause_stop_p(void) -{ - START_TEST; - int ret = MEDIA_STREAMER_ERROR_NONE; - - media_streamer_node_h video_src = NULL; - ret = media_streamer_node_create_src(MEDIA_STREAMER_NODE_SRC_TYPE_VIDEO_TEST, &video_src); - PRINT_RESULT(MEDIA_STREAMER_ERROR_NONE, ret, "media_streamer_create_src", MediaStreamerGetError(ret)); - CHECK_HANDLE(video_src,"ITc_capi_media_streamer_prepare_unprepare_p_video_src"); - ret = media_streamer_node_add(streamer, video_src); - PRINT_RESULT(MEDIA_STREAMER_ERROR_NONE, ret, "media_streamer_node_add", MediaStreamerGetError(ret)); - - media_streamer_node_h video_sink = NULL; - ret = media_streamer_node_create_sink(MEDIA_STREAMER_NODE_SINK_TYPE_FAKE, &video_sink); - PRINT_RESULT(MEDIA_STREAMER_ERROR_NONE, ret, "media_streamer_create_Sink", MediaStreamerGetError(ret)); - CHECK_HANDLE(video_sink,"ITc_capi_media_streamer_prepare_unprepare_p_video_sink"); - - ret = media_streamer_node_add(streamer, video_sink); - PRINT_RESULT(MEDIA_STREAMER_ERROR_NONE, ret, "media_streamer_node_add", MediaStreamerGetError(ret)); - - ret = media_streamer_node_link(video_src, "src", video_sink, "sink"); - PRINT_RESULT(MEDIA_STREAMER_ERROR_NONE, ret, "media_streamer_node_link", MediaStreamerGetError(ret)); - - ret = media_streamer_prepare(streamer); - PRINT_RESULT(MEDIA_STREAMER_ERROR_NONE, ret, "media_streamer_prepare", MediaStreamerGetError(ret)); - wait_for_async(PLAY_TIME); - - ret = media_streamer_play(streamer); - PRINT_RESULT_CLEANUP(MEDIA_STREAMER_ERROR_NONE, ret, "media_streamer_play", MediaStreamerGetError(ret),media_streamer_unprepare(streamer)); - wait_for_async(PLAY_TIME); - - ret = media_streamer_pause(streamer); - PRINT_RESULT_CLEANUP(MEDIA_STREAMER_ERROR_NONE, ret, "media_streamer_pause", MediaStreamerGetError(ret),media_streamer_unprepare(streamer)); - wait_for_async(PLAY_TIME); - - ret = media_streamer_stop(streamer); - PRINT_RESULT_CLEANUP(MEDIA_STREAMER_ERROR_NONE, ret, "media_streamer_stop", MediaStreamerGetError(ret),media_streamer_unprepare(streamer)); - wait_for_async(PLAY_TIME); - - ret = media_streamer_unprepare(streamer); - PRINT_RESULT(MEDIA_STREAMER_ERROR_NONE, ret, "media_streamer_unprepare", MediaStreamerGetError(ret)); - - return 0; - -} - -/** -* @testcase ITc_capi_media_streamer_get_state_p -* @since_tizen 3.0 -* @author SRID(manoj.g2) -* @reviewer SRID(gupta.sanjay) -* @type auto -* @description Prepare and unprepare media streamer -* @scenario create media streamer\n -* Prepare media Streamer\n -* Play media Streamer\n -* Pause media Streamer\n -* Get State of Media streamer\n -* Stop media Streamer\n -* @apicovered media_streamer_create\n -* media_streamer_prepare\n -* media_streamer_play\n -* media_streamer_pause\n -* media_streamer_get_state\n -* media_streamer_stop\n -* media_streamer_unprepare -* @passcase When media_streamer_create and media_streamer_get_state are successful. -* @failcase If target API's media_streamer_create or media_streamer_prepare fails or any precondition or postcondition API fails -* @precondition Create a media streamer handle by calling media_streamer_create() function -* @postcondition The media streamer state will be #MEDIA_STREANER_STATE_READY. -*/ -int ITc_capi_media_streamer_get_state_p(void) -{ - START_TEST; - int ret = MEDIA_STREAMER_ERROR_NONE; - media_streamer_state_e state; - - media_streamer_node_h video_src = NULL; - ret = media_streamer_node_create_src(MEDIA_STREAMER_NODE_SRC_TYPE_VIDEO_TEST, &video_src); - PRINT_RESULT(MEDIA_STREAMER_ERROR_NONE, ret, "media_streamer_create_src", MediaStreamerGetError(ret)); - CHECK_HANDLE(video_src,"ITc_capi_media_streamer_prepare_unprepare_p_video_src"); - ret = media_streamer_node_add(streamer, video_src); - PRINT_RESULT(MEDIA_STREAMER_ERROR_NONE, ret, "media_streamer_node_add", MediaStreamerGetError(ret)); - - media_streamer_node_h video_sink = NULL; - ret = media_streamer_node_create_sink(MEDIA_STREAMER_NODE_SINK_TYPE_FAKE, &video_sink); - PRINT_RESULT(MEDIA_STREAMER_ERROR_NONE, ret, "media_streamer_create_Sink", MediaStreamerGetError(ret)); - CHECK_HANDLE(video_sink,"ITc_capi_media_streamer_prepare_unprepare_p_video_sink"); - - ret = media_streamer_node_add(streamer, video_sink); - PRINT_RESULT(MEDIA_STREAMER_ERROR_NONE, ret, "media_streamer_node_add", MediaStreamerGetError(ret)); - - ret = media_streamer_node_link(video_src, "src", video_sink, "sink"); - PRINT_RESULT(MEDIA_STREAMER_ERROR_NONE, ret, "media_streamer_node_link", MediaStreamerGetError(ret)); - - ret = media_streamer_prepare(streamer); - PRINT_RESULT(MEDIA_STREAMER_ERROR_NONE, ret, "media_streamer_prepare", MediaStreamerGetError(ret)); - wait_for_async(PLAY_TIME); - - ret = media_streamer_play(streamer); - PRINT_RESULT_CLEANUP(MEDIA_STREAMER_ERROR_NONE, ret, "media_streamer_play", MediaStreamerGetError(ret),media_streamer_unprepare(streamer)); - wait_for_async(PLAY_TIME); - - ret = media_streamer_pause(streamer); - PRINT_RESULT_CLEANUP(MEDIA_STREAMER_ERROR_NONE, ret, "media_streamer_pause", MediaStreamerGetError(ret),media_streamer_stop(streamer);media_streamer_unprepare(streamer)); - wait_for_async(PLAY_TIME); - - ret = media_streamer_get_state(streamer,&state); - PRINT_RESULT_CLEANUP(MEDIA_STREAMER_ERROR_NONE, ret, "media_streamer_get_state", MediaStreamerGetError(ret),media_streamer_stop(streamer);media_streamer_unprepare(streamer)); - wait_for_async(PLAY_TIME); - - if(state != MEDIA_STREAMER_STATE_PAUSED) - { - FPRINTF("[Line : %d][%s] media_streamer_get_state failed \\n", __LINE__, API_NAMESPACE); - media_streamer_unprepare(streamer); - return 1; - } - ret = media_streamer_stop(streamer); - PRINT_RESULT_CLEANUP(MEDIA_STREAMER_ERROR_NONE, ret, "media_streamer_stop", MediaStreamerGetError(ret),media_streamer_unprepare(streamer)); - wait_for_async(PLAY_TIME); - - ret = media_streamer_unprepare(streamer); - PRINT_RESULT(MEDIA_STREAMER_ERROR_NONE, ret, "media_streamer_unprepare", MediaStreamerGetError(ret)); - - return 0; - -} - -/** -* @testcase ITc_capi_media_streamer_node_create_src_p -* @since_tizen 3.0 -* @author SRID(manoj.g2) -* @reviewer SRID(gupta.sanjay) -* @type auto -* @description media streamer node src creation -* @scenario media streamer node src create -* @apicovered media_streamer_node_create_src -* @passcase When media_streamer_node_create_src is successful. -* @failcase If target API's media_streamer_create or media_streamer_prepare fails or any precondition or postcondition API fails -* @precondition NA -* @postcondition NA -*/ - -int ITc_capi_media_streamer_node_create_src_p(void) -{ - START_TEST; - media_streamer_node_h src =NULL; - - const char *pszKeyCamera = "http://tizen.org/feature/camera"; - const char *pszKeyMic = "http://tizen.org/feature/microphone"; - const char *pszKeyInternet = "http://tizen.org/feature/network.internet"; - bool bValue = false; - bool bValueWifi = false, bValueTel = false, bValueEth = false; - int ret; - - media_streamer_node_src_type_e eNodeSrcType[] = { MEDIA_STREAMER_NODE_SRC_TYPE_FILE, /**< Local file src type */ - 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 */ - MEDIA_STREAMER_NODE_SRC_TYPE_AUDIO_CAPTURE, /**< Audio capture src type, Microphone feature is required */ - MEDIA_STREAMER_NODE_SRC_TYPE_AUDIO_TEST, /**< Audio test src type */ - MEDIA_STREAMER_NODE_SRC_TYPE_CAMERA, /**< Camera src type, Camera feature is required */ - MEDIA_STREAMER_NODE_SRC_TYPE_VIDEO_CAPTURE, /**< Video capture src type, Camera feature is required */ - MEDIA_STREAMER_NODE_SRC_TYPE_VIDEO_TEST, /**< Video test src type */ - MEDIA_STREAMER_NODE_SRC_TYPE_CUSTOM, /**< Custom src type */ - MEDIA_STREAMER_NODE_SRC_TYPE_ADAPTIVE}; /**< Adaptive src type */ - - int enum_size = sizeof(eNodeSrcType) / sizeof(eNodeSrcType[0]); - int enum_counter = 0; - - for ( enum_counter=0; enum_counter -#include -#include "tct_common.h" - -#ifdef MOBILE //Starts MOBILE -#include "tct-capi-media-streamer-native_mobile.h" -#endif //MOBILE //End MOBILE - -#ifdef WEARABLE //Starts WEARABLE -#include "tct-capi-media-streamer-native_wearable.h" -#endif //WEARABLE //End WEARABLE - -#ifdef TV //Starts TV -#include "tct-capi-media-streamer-native_tv.h" -#endif //TV //End TV - -#ifdef TIZENIOT //Starts TIZENIOT -#include "tct-capi-media-streamer-native_tizeniot.h" -#endif //TIZENIOT //End TIZENIOT - - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include - -static bool app_create(void *data) -{ - return true; -} - -static void app_control(app_control_h app_control, void *data) -{ - char* pszGetTCName = NULL; - int i=0, result=0, nRet=0; - nRet = app_control_get_extra_data(app_control, "testcase_name", &pszGetTCName); - if(nRet != APP_CONTROL_ERROR_NONE) - { - dlog_print(DLOG_ERROR, "NativeTCT", "[%s:%d] app_control_get_extra_data returns error = %d", __FUNCTION__, __LINE__, nRet); - PRINT_UTC_LOG("\\n[%s][Line : %d]Unable to fetch test case name: app_control_get_extra_data API call fails\\n", __FILE__, __LINE__); - PRINT_TC_RESULT("%d",1); - FREE_MEMORY_TC(pszGetTCName); - return; - } - - dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] Executing TC Name = %s", __FUNCTION__, __LINE__, pszGetTCName); - for ( i = 0; tc_array[i].name; i++ ) - { - if ( 0 == strncmp(pszGetTCName, tc_array[i].name, strlen(pszGetTCName)) ) - { - dlog_print(DLOG_INFO, "NativeTCT", "%s : Startup begin", pszGetTCName); - if ( tc_array[i].startup ) - { - tc_array[i].startup(); - } - dlog_print(DLOG_INFO, "NativeTCT", "%s : Startup end", pszGetTCName); - - dlog_print(DLOG_INFO, "NativeTCT", "%s : Body begin", pszGetTCName); - result = tc_array[i].function(); - dlog_print(DLOG_INFO, "NativeTCT", "%s returns value = %d", pszGetTCName, result); - dlog_print(DLOG_INFO, "NativeTCT", "%s : Body end", pszGetTCName); - - dlog_print(DLOG_INFO, "NativeTCT", "%s : Cleanup begin", pszGetTCName); - if ( tc_array[i].cleanup ) - { - tc_array[i].cleanup(); - } - dlog_print(DLOG_INFO, "NativeTCT", "%s : Cleanup end", pszGetTCName); - PRINT_TC_RESULT("%d",result); - FREE_MEMORY_TC(pszGetTCName); - return; - } - } - - dlog_print(DLOG_ERROR, "NativeTCT", "[%s:%d] Unable to execute %s : Unknown Test Case Name", __FUNCTION__, __LINE__, pszGetTCName); - PRINT_UTC_LOG("\\n[%s][Line : %d]Unable to execute %s : Unknown Test Case Name\\n", __FILE__, __LINE__, pszGetTCName); - PRINT_TC_RESULT("%d",1); - FREE_MEMORY_TC(pszGetTCName); - return; -} - -static void app_terminate(void *data) -{ - dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] Application Package is now Terminating", __FUNCTION__, __LINE__); -} - -int main(int argc, char *argv[]) -{ - int ret = 0; - - ui_app_lifecycle_callback_s event_callback = {0,}; - event_callback.create = app_create; - event_callback.terminate = app_terminate; - event_callback.app_control = app_control; - - //setting gcda file location for coverage - setenv("GCOV_PREFIX","/tmp",1); - dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] Coverage *.gcda File location set to /tmp/home/abuild/rpmbuild/BUILD/ ", __FUNCTION__, __LINE__); - - dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] Application Main Function is Invoked", __FUNCTION__, __LINE__); - ret = ui_app_main(argc, argv, &event_callback, NULL); - if (ret != APP_ERROR_NONE) - { - dlog_print(DLOG_ERROR, "NativeTCT", "Application ui_app_main call gets failed. err = %d", ret); - PRINT_UTC_LOG("\\n[%s][Line : %d]Application ui_app_main call gets failed. err = %d\\n", __FILE__, __LINE__, ret); - PRINT_TC_RESULT("%d",1); - return ret; - } - - dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] Application Package is Terminated", __FUNCTION__, __LINE__); - return ret; -} diff --git a/src/itc/capi-media-streamer/tct-capi-media-streamer-native_mobile.h b/src/itc/capi-media-streamer/tct-capi-media-streamer-native_mobile.h deleted file mode 100755 index c712e8d76..000000000 --- a/src/itc/capi-media-streamer/tct-capi-media-streamer-native_mobile.h +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Apache License, Version 2.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -#ifndef __TCT_CAPI-MEDIA-STREAMER-NATIVE_H__ -#define __TCT_CAPI-MEDIA-STREAMER-NATIVE_H__ - -#include "testcase.h" -#include "tct_common.h" - -extern void ITs_capi_media_streamer_startup(void); -extern void ITs_capi_media_streamer_cleanup(void); - -extern int ITc_capi_media_streamer_prepare_unprepare_p(void); -extern int ITc_capi_media_streamer_play_pause_stop_p(void); -extern int ITc_capi_media_streamer_get_state_p(void); -extern int ITc_capi_media_streamer_node_create_src_p(void); -extern int ITc_capi_media_streamer_node_push_packet_p(void); -extern int ITc_capi_media_streamer_node_create_sink_p(void); -extern int ITc_capi_media_streamer_node_pull_packet_p(void); -extern int ITc_capi_media_streamer_node_add_remove_p(void); -extern int ITc_capi_media_streamer_node_link_p(void); -extern int ITc_capi_media_streamer_node_node_set_get_pad_format_p(void); -extern int ITc_capi_media_streamer_node_get_pad_name_p(void); -extern int ITc_capi_media_streamer_node_set_get_params_p(void); -extern int ITc_capi_media_streamer_set_get_play_position(void); -extern int ITc_capi_media_streamer_get_duration_p(void); -extern int ITc_capi_media_streamer_set_unset_interrupted_p(void); - -testcase tc_array[] = { - {"ITc_capi_media_streamer_prepare_unprepare_p",ITc_capi_media_streamer_prepare_unprepare_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_play_pause_stop_p",ITc_capi_media_streamer_play_pause_stop_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_get_state_p",ITc_capi_media_streamer_get_state_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_node_create_src_p",ITc_capi_media_streamer_node_create_src_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_node_push_packet_p",ITc_capi_media_streamer_node_push_packet_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_node_create_sink_p",ITc_capi_media_streamer_node_create_sink_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_node_pull_packet_p",ITc_capi_media_streamer_node_pull_packet_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_node_add_remove_p",ITc_capi_media_streamer_node_add_remove_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_node_link_p",ITc_capi_media_streamer_node_link_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_node_node_set_get_pad_format_p",ITc_capi_media_streamer_node_node_set_get_pad_format_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_node_get_pad_name_p",ITc_capi_media_streamer_node_get_pad_name_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_node_set_get_params_p",ITc_capi_media_streamer_node_set_get_params_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_set_get_play_position",ITc_capi_media_streamer_set_get_play_position,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_get_duration_p",ITc_capi_media_streamer_get_duration_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_set_unset_interrupted_p",ITc_capi_media_streamer_set_unset_interrupted_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {NULL, NULL} -}; - -#endif // __TCT_CAPI-MEDIA-STREAMER-NATIVE_H__ diff --git a/src/itc/capi-media-streamer/tct-capi-media-streamer-native_tizeniot.h b/src/itc/capi-media-streamer/tct-capi-media-streamer-native_tizeniot.h deleted file mode 100755 index c712e8d76..000000000 --- a/src/itc/capi-media-streamer/tct-capi-media-streamer-native_tizeniot.h +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Apache License, Version 2.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -#ifndef __TCT_CAPI-MEDIA-STREAMER-NATIVE_H__ -#define __TCT_CAPI-MEDIA-STREAMER-NATIVE_H__ - -#include "testcase.h" -#include "tct_common.h" - -extern void ITs_capi_media_streamer_startup(void); -extern void ITs_capi_media_streamer_cleanup(void); - -extern int ITc_capi_media_streamer_prepare_unprepare_p(void); -extern int ITc_capi_media_streamer_play_pause_stop_p(void); -extern int ITc_capi_media_streamer_get_state_p(void); -extern int ITc_capi_media_streamer_node_create_src_p(void); -extern int ITc_capi_media_streamer_node_push_packet_p(void); -extern int ITc_capi_media_streamer_node_create_sink_p(void); -extern int ITc_capi_media_streamer_node_pull_packet_p(void); -extern int ITc_capi_media_streamer_node_add_remove_p(void); -extern int ITc_capi_media_streamer_node_link_p(void); -extern int ITc_capi_media_streamer_node_node_set_get_pad_format_p(void); -extern int ITc_capi_media_streamer_node_get_pad_name_p(void); -extern int ITc_capi_media_streamer_node_set_get_params_p(void); -extern int ITc_capi_media_streamer_set_get_play_position(void); -extern int ITc_capi_media_streamer_get_duration_p(void); -extern int ITc_capi_media_streamer_set_unset_interrupted_p(void); - -testcase tc_array[] = { - {"ITc_capi_media_streamer_prepare_unprepare_p",ITc_capi_media_streamer_prepare_unprepare_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_play_pause_stop_p",ITc_capi_media_streamer_play_pause_stop_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_get_state_p",ITc_capi_media_streamer_get_state_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_node_create_src_p",ITc_capi_media_streamer_node_create_src_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_node_push_packet_p",ITc_capi_media_streamer_node_push_packet_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_node_create_sink_p",ITc_capi_media_streamer_node_create_sink_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_node_pull_packet_p",ITc_capi_media_streamer_node_pull_packet_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_node_add_remove_p",ITc_capi_media_streamer_node_add_remove_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_node_link_p",ITc_capi_media_streamer_node_link_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_node_node_set_get_pad_format_p",ITc_capi_media_streamer_node_node_set_get_pad_format_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_node_get_pad_name_p",ITc_capi_media_streamer_node_get_pad_name_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_node_set_get_params_p",ITc_capi_media_streamer_node_set_get_params_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_set_get_play_position",ITc_capi_media_streamer_set_get_play_position,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_get_duration_p",ITc_capi_media_streamer_get_duration_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_set_unset_interrupted_p",ITc_capi_media_streamer_set_unset_interrupted_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {NULL, NULL} -}; - -#endif // __TCT_CAPI-MEDIA-STREAMER-NATIVE_H__ diff --git a/src/itc/capi-media-streamer/tct-capi-media-streamer-native_wearable.h b/src/itc/capi-media-streamer/tct-capi-media-streamer-native_wearable.h deleted file mode 100755 index c712e8d76..000000000 --- a/src/itc/capi-media-streamer/tct-capi-media-streamer-native_wearable.h +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Apache License, Version 2.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -#ifndef __TCT_CAPI-MEDIA-STREAMER-NATIVE_H__ -#define __TCT_CAPI-MEDIA-STREAMER-NATIVE_H__ - -#include "testcase.h" -#include "tct_common.h" - -extern void ITs_capi_media_streamer_startup(void); -extern void ITs_capi_media_streamer_cleanup(void); - -extern int ITc_capi_media_streamer_prepare_unprepare_p(void); -extern int ITc_capi_media_streamer_play_pause_stop_p(void); -extern int ITc_capi_media_streamer_get_state_p(void); -extern int ITc_capi_media_streamer_node_create_src_p(void); -extern int ITc_capi_media_streamer_node_push_packet_p(void); -extern int ITc_capi_media_streamer_node_create_sink_p(void); -extern int ITc_capi_media_streamer_node_pull_packet_p(void); -extern int ITc_capi_media_streamer_node_add_remove_p(void); -extern int ITc_capi_media_streamer_node_link_p(void); -extern int ITc_capi_media_streamer_node_node_set_get_pad_format_p(void); -extern int ITc_capi_media_streamer_node_get_pad_name_p(void); -extern int ITc_capi_media_streamer_node_set_get_params_p(void); -extern int ITc_capi_media_streamer_set_get_play_position(void); -extern int ITc_capi_media_streamer_get_duration_p(void); -extern int ITc_capi_media_streamer_set_unset_interrupted_p(void); - -testcase tc_array[] = { - {"ITc_capi_media_streamer_prepare_unprepare_p",ITc_capi_media_streamer_prepare_unprepare_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_play_pause_stop_p",ITc_capi_media_streamer_play_pause_stop_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_get_state_p",ITc_capi_media_streamer_get_state_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_node_create_src_p",ITc_capi_media_streamer_node_create_src_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_node_push_packet_p",ITc_capi_media_streamer_node_push_packet_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_node_create_sink_p",ITc_capi_media_streamer_node_create_sink_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_node_pull_packet_p",ITc_capi_media_streamer_node_pull_packet_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_node_add_remove_p",ITc_capi_media_streamer_node_add_remove_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_node_link_p",ITc_capi_media_streamer_node_link_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_node_node_set_get_pad_format_p",ITc_capi_media_streamer_node_node_set_get_pad_format_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_node_get_pad_name_p",ITc_capi_media_streamer_node_get_pad_name_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_node_set_get_params_p",ITc_capi_media_streamer_node_set_get_params_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_set_get_play_position",ITc_capi_media_streamer_set_get_play_position,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_get_duration_p",ITc_capi_media_streamer_get_duration_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {"ITc_capi_media_streamer_set_unset_interrupted_p",ITc_capi_media_streamer_set_unset_interrupted_p,ITs_capi_media_streamer_startup,ITs_capi_media_streamer_cleanup}, - {NULL, NULL} -}; - -#endif // __TCT_CAPI-MEDIA-STREAMER-NATIVE_H__ diff --git a/tct_unsupported.txt b/tct_unsupported.txt index a07b01f3f..9a3b16d46 100755 --- a/tct_unsupported.txt +++ b/tct_unsupported.txt @@ -326,7 +326,6 @@ tv:armv7l:itc:job-scheduler; tv:armv7l:itc:minicontrol; tv:armv7l:itc:shortcut; tv:armv7l:itc:smartcard; -tv:armv7l:itc:capi-media-streamer; tv:armv7l:itc:mediacodec; tv:armv7l:itc:capi-mediademuxer; tv:armv7l:itc:capi-mediamuxer;