case MM_STREAMRECORDER_INPUT_FORMAT_NV12 :
caps = gst_caps_new_simple("video/x-raw", "format", G_TYPE_STRING, "NV12", "width", G_TYPE_INT, width, "height", G_TYPE_INT, height, "framerate", GST_TYPE_FRACTION, rate, scale, NULL);
break;
+ case MM_STREAMRECORDER_INPUT_FORMAT_NV21 :
+ caps = gst_caps_new_simple("video/x-raw", "format", G_TYPE_STRING, "NV21", "width", G_TYPE_INT, width, "height", G_TYPE_INT, height, "framerate", GST_TYPE_FRACTION, rate, scale, NULL);
+ break;
case MM_STREAMRECORDER_INPUT_FORMAT_I420 :
caps = gst_caps_new_simple("video/x-raw", "format", G_TYPE_STRING, "I420", "width", G_TYPE_INT, width, "height", G_TYPE_INT, height, "framerate", GST_TYPE_FRACTION, rate, scale, NULL);
break;
MMSTREAMRECORDER_G_OBJECT_SET(sc->encode_element[_MMSTREAMRECORDER_ENCSINK_ENCBIN].gst, "auto-colorspace", hstreamrecorder->ini.encsink_bin_auto_colorspace);
- if (video_src_format == MM_STREAMRECORDER_INPUT_FORMAT_NV12)
+ if (video_src_format == MM_STREAMRECORDER_INPUT_FORMAT_NV12 || video_src_format == MM_STREAMRECORDER_INPUT_FORMAT_NV21 )
video_src_format = MM_STREAMRECORDER_INPUT_FORMAT_I420;
caps = gst_set_videosrcpad_caps_sw(video_src_format, video_width, video_height, video_fps, 1);
MMSTREAMRECORDER_G_OBJECT_SET(sc->encode_element[_MMSTREAMRECORDER_ENCSINK_ENCBIN].gst, "vcaps", caps);
+
if (video_src_format != MM_STREAMRECORDER_INPUT_FORMAT_NV12)
MMSTREAMRECORDER_G_OBJECT_SET(sc->encode_element[_MMSTREAMRECORDER_ENCSINK_VCONV].gst, "dst-buffer-num", hstreamrecorder->ini.convert_output_buffer_num);