- if (!strcmp(media_type, "image/jpeg")) {
- MMCAM_LOG_INFO("It is jpeg.");
- type = MM_PIXEL_FORMAT_ENCODED;
- } else if (!strcmp(media_type, "video/x-raw") &&
- gst_video_info_from_caps(&media_info, caps) &&
- GST_VIDEO_INFO_IS_YUV(&media_info)) {
- MMCAM_LOG_INFO("It is yuv.");
- fourcc = gst_video_format_to_fourcc(GST_VIDEO_INFO_FORMAT(&media_info));
- type = _mmcamcorder_get_pixtype(fourcc);
- } else if (!strcmp(media_type, "video/x-raw") &&
- gst_video_info_from_caps(&media_info, caps) &&
- GST_VIDEO_INFO_IS_RGB(&media_info)) {
- MMCAM_LOG_INFO("It is rgb.");
+ if (GST_VIDEO_INFO_IS_YUV(&vinfo))
+ type = _mmcamcorder_get_pixtype(gst_video_format_to_fourcc(GST_VIDEO_INFO_FORMAT(&vinfo)));
+ else if (GST_VIDEO_INFO_IS_RGB(&vinfo))