} 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);
case 4:
type = MEDIA_FORMAT_H264_SP;
break;
+ case 5:
+ type = MEDIA_FORMAT_VP8;
+ break;
default:
g_print("invalid value[%d]\n", value);
return;
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");