{
unsigned int id;
- int ret = webrtc_add_media_source(NULL, WEBRTC_MEDIA_SOURCE_TYPE_MIC, &id);
+ int ret = webrtc_add_media_source(NULL, WEBRTC_MEDIA_SOURCE_TYPE_AUDIOTEST, &id);
assert_eq(ret, WEBRTC_ERROR_INVALID_PARAMETER);
return 0;
assert_eq(ret, WEBRTC_ERROR_NONE);
ret = webrtc_add_media_source(webrtc, WEBRTC_MEDIA_SOURCE_TYPE_CAMERA, &id);
+ if (ret == WEBRTC_ERROR_NOT_SUPPORTED) {
+ dlog_print(DLOG_DEBUG, "NativeTCT", "[%s(%d)] camera feature is not supported, skip it", __FUNCTION__, __LINE__);
+ webrtc_destroy(webrtc);
+ return 0;
+ }
assert_eq(ret, WEBRTC_ERROR_NONE);
ret = webrtc_remove_media_source(webrtc, id);
ret = webrtc_create(&webrtc);
assert_eq(ret, WEBRTC_ERROR_NONE);
- ret = webrtc_add_media_source(webrtc, WEBRTC_MEDIA_SOURCE_TYPE_CAMERA, &id);
+ ret = webrtc_add_media_source(webrtc, WEBRTC_MEDIA_SOURCE_TYPE_VIDEOTEST, &id);
assert_eq(ret, WEBRTC_ERROR_NONE);
ret = webrtc_media_source_set_video_resolution(webrtc, id, TEST_WIDTH, TEST_HEIGHT);
assert_eq(ret, WEBRTC_ERROR_NONE);
ret = webrtc_add_media_source(webrtc, WEBRTC_MEDIA_SOURCE_TYPE_CAMERA, &id);
+ if (ret == WEBRTC_ERROR_NOT_SUPPORTED) {
+ dlog_print(DLOG_DEBUG, "NativeTCT", "[%s(%d)] camera feature is not supported, skip it", __FUNCTION__, __LINE__);
+ webrtc_destroy(webrtc);
+ return 0;
+ }
assert_eq(ret, WEBRTC_ERROR_NONE);
ret = webrtc_media_source_set_video_resolution(webrtc, id, 0, 0);
ret = webrtc_create(&webrtc);
assert_eq(ret, WEBRTC_ERROR_NONE);
- ret = webrtc_add_media_source(webrtc, WEBRTC_MEDIA_SOURCE_TYPE_MIC, &id);
+ ret = webrtc_add_media_source(webrtc, WEBRTC_MEDIA_SOURCE_TYPE_AUDIOTEST, &id);
assert_eq(ret, WEBRTC_ERROR_NONE);
ret = webrtc_media_source_set_video_resolution(webrtc, id, TEST_WIDTH, TEST_HEIGHT);
assert_eq(ret, WEBRTC_ERROR_NONE);
ret = webrtc_add_media_source(webrtc, WEBRTC_MEDIA_SOURCE_TYPE_CAMERA, &id);
+ if (ret == WEBRTC_ERROR_NOT_SUPPORTED) {
+ dlog_print(DLOG_DEBUG, "NativeTCT", "[%s(%d)] camera feature is not supported, skip it", __FUNCTION__, __LINE__);
+ webrtc_destroy(webrtc);
+ return 0;
+ }
assert_eq(ret, WEBRTC_ERROR_NONE);
ret = webrtc_media_source_get_video_resolution(webrtc, id, &width, &height);
assert_eq(ret, WEBRTC_ERROR_NONE);
ret = webrtc_add_media_source(webrtc, WEBRTC_MEDIA_SOURCE_TYPE_CAMERA, &id);
+ if (ret == WEBRTC_ERROR_NOT_SUPPORTED) {
+ dlog_print(DLOG_DEBUG, "NativeTCT", "[%s(%d)] camera feature is not supported, skip it", __FUNCTION__, __LINE__);
+ webrtc_destroy(webrtc);
+ return 0;
+ }
assert_eq(ret, WEBRTC_ERROR_NONE);
ret = webrtc_media_source_get_video_resolution(webrtc, id, NULL, NULL);
assert_eq(ret, WEBRTC_ERROR_NONE);
ret = webrtc_add_media_source(webrtc, WEBRTC_MEDIA_SOURCE_TYPE_MIC, &id);
+ if (ret == WEBRTC_ERROR_NOT_SUPPORTED) {
+ dlog_print(DLOG_DEBUG, "NativeTCT", "[%s(%d)] microphone feature is not supported, skip it", __FUNCTION__, __LINE__);
+ webrtc_destroy(webrtc);
+ return 0;
+ }
assert_eq(ret, WEBRTC_ERROR_NONE);
ret = webrtc_mic_source_set_sound_stream_info(webrtc, id, stream_info);
assert_eq(ret, WEBRTC_ERROR_NONE);
ret = webrtc_add_media_source(webrtc, WEBRTC_MEDIA_SOURCE_TYPE_MIC, &id);
+ if (ret == WEBRTC_ERROR_NOT_SUPPORTED) {
+ dlog_print(DLOG_DEBUG, "NativeTCT", "[%s(%d)] microphone feature is not supported, skip it", __FUNCTION__, __LINE__);
+ webrtc_destroy(webrtc);
+ return 0;
+ }
assert_eq(ret, WEBRTC_ERROR_NONE);
ret = webrtc_mic_source_set_sound_stream_info(webrtc, id, NULL);
assert_eq(ret, WEBRTC_ERROR_NONE);
ret = webrtc_add_media_source(webrtc, WEBRTC_MEDIA_SOURCE_TYPE_MIC, &id);
+ if (ret == WEBRTC_ERROR_NOT_SUPPORTED) {
+ dlog_print(DLOG_DEBUG, "NativeTCT", "[%s(%d)] microphone feature is not supported, skip it", __FUNCTION__, __LINE__);
+ webrtc_destroy(webrtc);
+ return 0;
+ }
assert_eq(ret, WEBRTC_ERROR_NONE);
ret = webrtc_set_ice_candidate_cb(webrtc, __webrtc_ice_candidate_cb, NULL);
assert_eq(ret, WEBRTC_ERROR_NONE);
ret = webrtc_add_media_source(webrtc, WEBRTC_MEDIA_SOURCE_TYPE_MIC, &id);
+ if (ret == WEBRTC_ERROR_NOT_SUPPORTED) {
+ dlog_print(DLOG_DEBUG, "NativeTCT", "[%s(%d)] microphone feature is not supported, skip it", __FUNCTION__, __LINE__);
+ webrtc_destroy(webrtc);
+ return 0;
+ }
assert_eq(ret, WEBRTC_ERROR_NONE);
ret = sound_manager_create_stream_information(SOUND_STREAM_TYPE_ALARM, NULL, NULL, &stream_info);
assert_eq(ret, WEBRTC_ERROR_NONE);
ret = webrtc_add_media_source(webrtc, WEBRTC_MEDIA_SOURCE_TYPE_CAMERA, &id);
+ if (ret == WEBRTC_ERROR_NOT_SUPPORTED) {
+ dlog_print(DLOG_DEBUG, "NativeTCT", "[%s(%d)] camera feature is not supported, skip it", __FUNCTION__, __LINE__);
+ webrtc_destroy(webrtc);
+ return 0;
+ }
assert_eq(ret, WEBRTC_ERROR_NONE);
ret = webrtc_media_source_set_video_loopback(webrtc, id, WEBRTC_DISPLAY_TYPE_EVAS, NULL, NULL);
ret = webrtc_create(&webrtc);
assert_eq(ret, WEBRTC_ERROR_NONE);
- ret = webrtc_add_media_source(webrtc, WEBRTC_MEDIA_SOURCE_TYPE_CAMERA, &id);
+ ret = webrtc_add_media_source(webrtc, WEBRTC_MEDIA_SOURCE_TYPE_VIDEOTEST, &id);
assert_eq(ret, WEBRTC_ERROR_NONE);
ret = webrtc_set_ice_candidate_cb(webrtc, __webrtc_ice_candidate_cb, NULL);
ret = webrtc_create(&webrtc);
assert_eq(ret, WEBRTC_ERROR_NONE);
- ret = webrtc_add_media_source(webrtc, WEBRTC_MEDIA_SOURCE_TYPE_CAMERA, &id);
+ ret = webrtc_add_media_source(webrtc, WEBRTC_MEDIA_SOURCE_TYPE_VIDEOTEST, &id);
assert_eq(ret, WEBRTC_ERROR_NONE);
ret = webrtc_set_ice_candidate_cb(webrtc, __webrtc_ice_candidate_cb, NULL);
assert_eq(ret, WEBRTC_ERROR_NONE);
ret = webrtc_add_media_source(webrtc, WEBRTC_MEDIA_SOURCE_TYPE_CAMERA, &id);
+ if (ret == WEBRTC_ERROR_NOT_SUPPORTED) {
+ dlog_print(DLOG_DEBUG, "NativeTCT", "[%s(%d)] camera feature is not supported, skip it", __FUNCTION__, __LINE__);
+ webrtc_destroy(webrtc);
+ return 0;
+ }
assert_eq(ret, WEBRTC_ERROR_NONE);
ret = webrtc_set_ice_candidate_cb(webrtc, __webrtc_ice_candidate_cb, NULL);
assert_eq(ret, WEBRTC_ERROR_NONE);
ret = webrtc_add_media_source(webrtc, WEBRTC_MEDIA_SOURCE_TYPE_CAMERA, &id);
+ if (ret == WEBRTC_ERROR_NOT_SUPPORTED) {
+ dlog_print(DLOG_DEBUG, "NativeTCT", "[%s(%d)] camera feature is not supported, skip it", __FUNCTION__, __LINE__);
+ webrtc_destroy(webrtc);
+ return 0;
+ }
assert_eq(ret, WEBRTC_ERROR_NONE);
ret = webrtc_set_ice_candidate_cb(webrtc, __webrtc_ice_candidate_cb, NULL);
assert_eq(ret, WEBRTC_ERROR_NONE);
ret = webrtc_add_media_source(webrtc, WEBRTC_MEDIA_SOURCE_TYPE_MIC, &id);
+ if (ret == WEBRTC_ERROR_NOT_SUPPORTED) {
+ dlog_print(DLOG_DEBUG, "NativeTCT", "[%s(%d)] microphone feature is not supported, skip it", __FUNCTION__, __LINE__);
+ webrtc_destroy(webrtc);
+ return 0;
+ }
assert_eq(ret, WEBRTC_ERROR_NONE);
ret = webrtc_set_ice_candidate_cb(webrtc, __webrtc_ice_candidate_cb, NULL);