Change-Id: I16df6ee24bff0454db0f06a28a5c640a20e1bd0e
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
Name: libmm-streamrecorder
Summary: Media Stream Recorder library
Name: libmm-streamrecorder
Summary: Media Stream Recorder library
Release: 0
Group: Multimedia/Other
License: Apache-2.0
Release: 0
Group: Multimedia/Other
License: Apache-2.0
{
const GstStructure *structure;
const char *media_type = NULL;
{
const GstStructure *structure;
const char *media_type = NULL;
- MMPixelFormatType type = 0;
+ MMPixelFormatType type = MM_PIXEL_FORMAT_INVALID;
unsigned int fourcc = 0;
GstVideoInfo media_info;
unsigned int fourcc = 0;
GstVideoInfo media_info;
} else if (!strcmp(media_type, "video/x-raw-yuv")) {
_mmstreamrec_dbg_log("It is yuv.");
gst_video_info_init(&media_info);
} else if (!strcmp(media_type, "video/x-raw-yuv")) {
_mmstreamrec_dbg_log("It is yuv.");
gst_video_info_init(&media_info);
- gst_video_info_from_caps(&media_info, caps);
- fourcc = gst_video_format_to_fourcc(GST_VIDEO_INFO_FORMAT(&media_info));
- type = _mmstreamrecorder_get_pixtype(fourcc);
+ if (gst_video_info_from_caps(&media_info, caps)) {
+ fourcc = gst_video_format_to_fourcc(GST_VIDEO_INFO_FORMAT(&media_info));
+ type = _mmstreamrecorder_get_pixtype(fourcc);
+ } 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 if (!strcmp(media_type, "video/x-raw-rgb")) {
_mmstreamrec_dbg_log("It is rgb.");
type = MM_PIXEL_FORMAT_RGB888;
_mmstreamrec_dbg_log("Type [%d]", type);
_mmstreamrec_dbg_log("Type [%d]", type);
gst_caps_unref(caps);
caps = NULL;
gst_caps_unref(caps);
caps = NULL;