Update media type 10/267810/5
authorHyunsoo Park <hance.park@samsung.com>
Fri, 10 Dec 2021 05:03:00 +0000 (14:03 +0900)
committerHyunsoo Park <hance.park@samsung.com>
Sun, 12 Dec 2021 23:35:24 +0000 (08:35 +0900)
Change-Id: I1d72e48e153ef74520e53809ead1c6afcd9f5045
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
packaging/libmm-streamrecorder.spec
src/mm_streamrecorder_util.c

index 857a35649814f63182db77a06ad763bbf244dcac..a93abec1f0b111db5c5c49eb40eadb3070ad9d90 100644 (file)
@@ -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
index dd2a782d9c260cf7246bb229b0b349b08e937aea..64dbef3b63b090bd460a1970dc207eeb80dfa94b 100644 (file)
@@ -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;
        }