test: Add VP8 format for webrtc_media_packet_source_set_format() test 74/314474/2 accepted/tizen/unified/20240715.155426 accepted/tizen/unified/dev/20240716.080834 accepted/tizen/unified/x/20240716.041632
authorSangchul Lee <sc11.lee@samsung.com>
Fri, 12 Jul 2024 06:21:35 +0000 (15:21 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Fri, 12 Jul 2024 07:51:12 +0000 (16:51 +0900)
[Version] 1.1.14
[Issue Type] Test application

Change-Id: I46e45afdc389c5e13d2a3a4c4c12f8cc971ad89d
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
packaging/capi-media-webrtc.spec
test/webrtc_test.c
test/webrtc_test_menu.c

index 367c6630a5c84d39eb9656f15c51bba8f5560e1a..e04f8b35156ba4c9cbe70823eaab3576ab56334b 100644 (file)
@@ -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
index ebd6c5b941d2d8b9c259dd66a52275167266f5d8..81cddde041d8b5d03f94ea3f2eb03f767b536445 100644 (file)
@@ -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;
index 1401ad2529d87d17a960ea886277b7217017fb6b..96649bcf7bfaa094369911f88e366e83d35a4493 100644 (file)
@@ -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");