if (info_video->is_first_frame) {
/* check first I frame for H.264 stream */
- if (info_image->preview_format == MM_PIXEL_FORMAT_ENCODED_H264) {
+ if (_mmcamcorder_is_encoded_preview_pixel_format(info_image->preview_format)) {
if (GST_BUFFER_FLAG_IS_SET(buffer, GST_BUFFER_FLAG_DELTA_UNIT)) {
- MMCAM_LOG_WARNING("NOT I frame.. skip this buffer");
+ MMCAM_LOG_WARNING("NOT key frame.. skip this buffer");
return TRUE;
} else {
- MMCAM_LOG_WARNING("[H.264] first I frame");
+ MMCAM_LOG_WARNING("first key frame");
}
}
MMCAMCORDER_G_OBJECT_SET(sc->element[_MMCAMCORDER_VIDEOSRC_SRC].gst, "video-width", info->video_width);
MMCAMCORDER_G_OBJECT_SET(sc->element[_MMCAMCORDER_VIDEOSRC_SRC].gst, "video-height", info->video_height);
- } else if (sc->info_image->preview_format == MM_PIXEL_FORMAT_ENCODED_H264 &&
+ } else if (_mmcamcorder_is_encoded_preview_pixel_format(sc->info_image->preview_format) &&
info->preview_width == info->video_width &&
info->preview_height == info->video_height) {
- MMCAM_LOG_INFO("H264 preview mode and same resolution");
-
+ MMCAM_LOG_INFO("Encoded[%d] preview mode and same resolution", sc->info_image->preview_format);
/* No need to restart preview */
info->restart_preview = FALSE;
} else if (info->use_videoscale &&