Name: libmm-camcorder
Summary: Camera and recorder library
-Version: 1.2.0
+Version: 1.2.1
Release: 0
Group: Multimedia/Libraries
License: Apache-2.0
gboolean is_network; /**< Flag for network camera */
const char *network_hal_name; /**< Name of network camera HAL library */
int default_encoded_preview_bitrate; /**< Default bitrate for encoded preview */
+ int update_caps_by_stream_rotation; /**< Update resolution in capsfilter by stream rotation setting */
_MMCamcorderInfoConverting caminfo_convert[CAMINFO_CONVERT_NUM]; /**< converting structure of camera info */
_MMCamcorderEnumConvert enum_conv[ENUM_CONVERT_NUM]; /**< enum converting list that is modified by ini info */
{ "SupportUserBuffer", CONFIGURE_VALUE_INT, {.value_int = 0} },
{ "MeasurePreviewFPS", CONFIGURE_VALUE_INT, {.value_int = 0} },
{ "DefaultEncodedPreviewBitrate", CONFIGURE_VALUE_INT, {.value_int = DEFAULT_ENCODED_PREVIEW_BITRATE} },
+ { "UpdateCapsByStreamRotation", CONFIGURE_VALUE_INT, {.value_int = 0} },
};
/* [AudioInput] matching table */
sc->info_video->fps = fps;
}
- /* Interleaved format does not support rotation */
- if (sc->info_image->preview_format != MM_PIXEL_FORMAT_ITLV_JPEG_UYVY) {
- /* store videosrc rotation */
- sc->videosrc_rotate = rotate;
-
- /* Define width, height and rotate in caps */
-
- /* This will be applied when rotate is 0, 90, 180, 270 if rear camera.
- This will be applied when rotate is 0, 180 if front camera. */
- set_rotate = rotate * 90;
-
- if (rotate == MM_VIDEO_INPUT_ROTATION_90 ||
- rotate == MM_VIDEO_INPUT_ROTATION_270) {
- set_width = height;
- set_height = width;
- if (hcamcorder->device_type == MM_VIDEO_DEVICE_CAMERA1) {
- if (rotate == MM_VIDEO_INPUT_ROTATION_90)
- set_rotate = 270;
- else
- set_rotate = 90;
- }
- } else {
- set_width = width;
- set_height = height;
- }
- } else {
- sc->videosrc_rotate = MM_VIDEO_INPUT_ROTATION_NONE;
- set_rotate = 0;
- set_width = width;
- set_height = height;
+ sc->videosrc_rotate = rotate;
+ set_rotate = rotate * 90;
+ set_width = width;
+ set_height = height;
- MMCAM_LOG_WARNING("ITLV format doe snot support INPUT ROTATE. Ignore ROTATE[%d]", rotate);
+ if (hcamcorder->update_caps_by_stream_rotation &&
+ (rotate == MM_VIDEO_INPUT_ROTATION_90 || rotate == MM_VIDEO_INPUT_ROTATION_270)) {
+ MMCAM_LOG_WARNING("update caps by stream rotation[%d]", set_rotate);
+
+ set_width = height;
+ set_height = width;
+
+ if (hcamcorder->device_type == MM_VIDEO_DEVICE_CAMERA1) {
+ if (rotate == MM_VIDEO_INPUT_ROTATION_90)
+ set_rotate = 270;
+ else
+ set_rotate = 90;
+ }
}
MMCAMCORDER_G_OBJECT_GET(sc->element[_MMCAMCORDER_VIDEOSRC_CAPS].gst, "caps", &caps);
&hcamcorder->default_encoded_preview_bitrate);
_mmcamcorder_conf_get_value_int((MMHandleType)hcamcorder, hcamcorder->conf_main,
+ CONFIGURE_CATEGORY_MAIN_VIDEO_INPUT,
+ "UpdateCapsByRotation",
+ &hcamcorder->update_caps_by_stream_rotation);
+
+ _mmcamcorder_conf_get_value_int((MMHandleType)hcamcorder, hcamcorder->conf_main,
CONFIGURE_CATEGORY_MAIN_CAPTURE,
"CaptureMode",
&hcamcorder->capture_mode);
MMCAM_LOG_INFO("Use video convert[%d]", hcamcorder->use_videoconvert);
MMCAM_LOG_INFO("Measure preview FPS[%d]", hcamcorder->measure_preview_fps);
MMCAM_LOG_INFO("Default encoded preview bitrate[%d]", hcamcorder->default_encoded_preview_bitrate);
+ MMCAM_LOG_INFO("Update capsfilter by stream rotation[%d]", hcamcorder->update_caps_by_stream_rotation);
MMCAM_LOG_INFO("Play capture sound[%d]", play_capture_sound);
ret = mm_camcorder_get_attributes((MMHandleType)hcamcorder, NULL,