From: Hyunsoo Park Date: Fri, 10 Dec 2021 05:03:00 +0000 (+0900) Subject: Update media type X-Git-Tag: submit/tizen/20220216.051033~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3e330c001c05e58c28e57e711e1707693b46a46e;p=platform%2Fcore%2Fmultimedia%2Flibmm-streamrecorder.git Update media type Change-Id: I1d72e48e153ef74520e53809ead1c6afcd9f5045 Signed-off-by: Hyunsoo Park --- diff --git a/packaging/libmm-streamrecorder.spec b/packaging/libmm-streamrecorder.spec index 857a356..a93abec 100644 --- a/packaging/libmm-streamrecorder.spec +++ b/packaging/libmm-streamrecorder.spec @@ -1,6 +1,6 @@ Name: libmm-streamrecorder Summary: Media Stream Recorder library -Version: 0.0.36 +Version: 0.0.37 Release: 0 Group: Multimedia/Other License: Apache-2.0 diff --git a/src/mm_streamrecorder_util.c b/src/mm_streamrecorder_util.c index dd2a782..64dbef3 100644 --- a/src/mm_streamrecorder_util.c +++ b/src/mm_streamrecorder_util.c @@ -144,11 +144,11 @@ int _mmstreamrecorder_get_pixel_format(GstCaps *caps) return MM_PIXEL_FORMAT_INVALID; } + _mmstreamrec_dbg_log("media type [%s]", media_type); + if (!strcmp(media_type, "image/jpeg")) { - _mmstreamrec_dbg_log("It is jpeg."); type = MM_PIXEL_FORMAT_ENCODED; - } else if (!strcmp(media_type, "video/x-raw-yuv")) { - _mmstreamrec_dbg_log("It is yuv."); + } else if (!strcmp(media_type, "video/x-raw")) { gst_video_info_init(&media_info); if (gst_video_info_from_caps(&media_info, caps)) { fourcc = gst_video_format_to_fourcc(GST_VIDEO_INFO_FORMAT(&media_info)); @@ -156,17 +156,12 @@ int _mmstreamrecorder_get_pixel_format(GstCaps *caps) } else { _mmstreamrec_dbg_err("Getting media_info is failed"); } - } else if (!strcmp(media_type, "video/x-raw-rgb")) { - _mmstreamrec_dbg_log("It is rgb."); - type = MM_PIXEL_FORMAT_RGB888; } else { - _mmstreamrec_dbg_err("Not supported format"); - type = MM_PIXEL_FORMAT_INVALID; + _mmstreamrec_dbg_err("Not supported format. Format [%s]", media_type); } - _mmstreamrec_dbg_log("Type [%d]", type); + _mmstreamrec_dbg_log("Pixel Format Type [%d]", type); -error: gst_caps_unref(caps); caps = NULL; @@ -300,7 +295,6 @@ int _mmstreamrecorder_get_pixtype(unsigned int fourcc) break; default: _mmstreamrec_dbg_log("Not supported fourcc type(%x)", fourcc); - pixtype = MM_PIXEL_FORMAT_INVALID; break; }