MMCAMCORDER_G_OBJECT_SET(sc->encode_element[_MMCAMCORDER_ENCSINK_SRC].gst, "max-bytes", 0); /* unlimited */
/* set capsfilter */
- if (profile == MM_CAMCORDER_ENCBIN_PROFILE_VIDEO) {
- if (_mmcamcorder_is_encoded_preview_pixel_format(sc->info_image->preview_format)) {
- MMCAM_LOG_INFO("get pad from vsrc_c");
- pad = gst_element_get_static_pad(sc->element[_MMCAMCORDER_VIDEOSRC_CAPS].gst, "src");
- } else {
- MMCAM_LOG_INFO("get pad from vsrc_q");
- pad = gst_element_get_static_pad(sc->element[_MMCAMCORDER_VIDEOSRC_QUE].gst, "src");
- }
- if (!pad) {
- MMCAM_LOG_ERROR("get src pad failed");
- err = MM_ERROR_CAMCORDER_RESOURCE_CREATION;
- goto pipeline_creation_error;
- }
-
+ if (sc->element[_MMCAMCORDER_VIDEOSRC_FILT].gst) {
+ MMCAM_LOG_INFO("get pad from vsrc_f");
+ pad = gst_element_get_static_pad(sc->element[_MMCAMCORDER_VIDEOSRC_FILT].gst, "src");
+ caps_from_pad = gst_pad_get_current_caps(pad);
+ } else if (_mmcamcorder_is_encoded_preview_pixel_format(sc->info_image->preview_format)) {
+ MMCAM_LOG_INFO("get pad from vsrc_c");
+ pad = gst_element_get_static_pad(sc->element[_MMCAMCORDER_VIDEOSRC_CAPS].gst, "src");
caps_from_pad = gst_pad_get_allowed_caps(pad);
- video_caps = gst_caps_copy(caps_from_pad);
- gst_caps_unref(caps_from_pad);
- gst_object_unref(pad);
-
- /* fixate caps */
- video_caps = gst_caps_fixate(video_caps);
} else {
- /* Image */
- MMCAMCORDER_G_OBJECT_GET(sc->element[_MMCAMCORDER_VIDEOSRC_CAPS].gst, "caps", &video_caps);
+ MMCAM_LOG_INFO("get pad from vsrc_q");
+ pad = gst_element_get_static_pad(sc->element[_MMCAMCORDER_VIDEOSRC_QUE].gst, "src");
+ caps_from_pad = gst_pad_get_allowed_caps(pad);
}
+ gst_object_unref(pad);
+
+ if (!caps_from_pad) {
+ MMCAM_LOG_ERROR("get caps failed");
+ err = MM_ERROR_CAMCORDER_RESOURCE_CREATION;
+ goto pipeline_creation_error;
+ }
+
+ video_caps = gst_caps_fixate(gst_caps_copy(caps_from_pad));
+
+ gst_caps_unref(caps_from_pad);
+
if (!video_caps) {
MMCAM_LOG_ERROR("create recording pipeline caps failed");
err = MM_ERROR_CAMCORDER_RESOURCE_CREATION;