From: Sangchul Lee Date: Fri, 12 Jul 2024 06:21:35 +0000 (+0900) Subject: test: Add VP8 format for webrtc_media_packet_source_set_format() test X-Git-Tag: accepted/tizen/unified/20240715.155426^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F74%2F314474%2F2;p=platform%2Fcore%2Fapi%2Fwebrtc.git test: Add VP8 format for webrtc_media_packet_source_set_format() test [Version] 1.1.14 [Issue Type] Test application Change-Id: I46e45afdc389c5e13d2a3a4c4c12f8cc971ad89d Signed-off-by: Sangchul Lee --- diff --git a/packaging/capi-media-webrtc.spec b/packaging/capi-media-webrtc.spec index 367c6630..e04f8b35 100644 --- a/packaging/capi-media-webrtc.spec +++ b/packaging/capi-media-webrtc.spec @@ -1,6 +1,6 @@ Name: capi-media-webrtc Summary: A WebRTC library in Tizen Native API -Version: 1.1.13 +Version: 1.1.14 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/test/webrtc_test.c b/test/webrtc_test.c index ebd6c5b9..81cddde0 100644 --- a/test/webrtc_test.c +++ b/test/webrtc_test.c @@ -664,8 +664,9 @@ static int __create_formats(media_format_mimetype_e type, media_format_h *format } else if (type & MEDIA_FORMAT_VIDEO) { /* assume that h264 video file of 640x480 resolution */ - int width = (type == MEDIA_FORMAT_H264_SP) ? 640 : VIDEO_WIDTH; - int height = (type == MEDIA_FORMAT_H264_SP) ? 480 : VIDEO_HEIGHT; + bool encoded_format = (type == MEDIA_FORMAT_H264_SP || type == MEDIA_FORMAT_VP8); + int width = encoded_format ? 640 : VIDEO_WIDTH; + int height = encoded_format ? 480 : VIDEO_HEIGHT; ret = media_format_set_video_mime(*format, type); ret |= media_format_set_video_width(*format, width); ret |= media_format_set_video_height(*format, height); @@ -707,6 +708,9 @@ static void _webrtc_media_packet_source_set_format(int index, unsigned int sourc case 4: type = MEDIA_FORMAT_H264_SP; break; + case 5: + type = MEDIA_FORMAT_VP8; + break; default: g_print("invalid value[%d]\n", value); return; diff --git a/test/webrtc_test_menu.c b/test/webrtc_test_menu.c index 1401ad25..96649bcf 100644 --- a/test/webrtc_test_menu.c +++ b/test/webrtc_test_menu.c @@ -471,7 +471,7 @@ void display_menu_webrtc_media_source(void) if (get_appdata()->input_count == 0) g_print("*** input source id.\n"); else if (get_appdata()->input_count == 1) - g_print("*** input media format.(1:I420 2:NV12 3:PCM_S16LE 4:H264)\n"); + g_print("*** input media format.(1:I420 2:NV12 3:PCM_S16LE 4:H264 5:VP8)\n"); break; case CURRENT_STATUS_START_PUSHING_PACKET_TO_MEDIA_PACKET_SOURCE: g_print("*** input media packet source id to start pushing packet.\n");