mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
camerabin2: Add new entry to flags property
Adds a new entry to camerabin2 flags to disable viewfinder conversion elements.
This commit is contained in:
parent
dc9276b9ee
commit
5c662ec0c7
2 changed files with 9 additions and 1 deletions
|
@ -270,6 +270,9 @@ gst_cam_flags_get_type (void)
|
||||||
"elements", "no-audio-conversion"},
|
"elements", "no-audio-conversion"},
|
||||||
{C_FLAGS (GST_CAM_FLAG_NO_VIDEO_CONVERSION), "Do not use video conversion "
|
{C_FLAGS (GST_CAM_FLAG_NO_VIDEO_CONVERSION), "Do not use video conversion "
|
||||||
"elements", "no-video-conversion"},
|
"elements", "no-video-conversion"},
|
||||||
|
{C_FLAGS (GST_CAM_FLAG_NO_VIEWFINDER_CONVERSION),
|
||||||
|
"Do not use viewfinder conversion " "elements",
|
||||||
|
"no-viewfinder-conversion"},
|
||||||
{0, NULL, NULL}
|
{0, NULL, NULL}
|
||||||
};
|
};
|
||||||
static volatile GType id = 0;
|
static volatile GType id = 0;
|
||||||
|
@ -1416,6 +1419,9 @@ gst_camera_bin_create_elements (GstCameraBin2 * camera)
|
||||||
g_object_set (camera->imagesink, "location", camera->location, NULL);
|
g_object_set (camera->imagesink, "location", camera->location, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_object_set (camera->viewfinderbin, "disable-converters",
|
||||||
|
camera->flags & GST_CAM_FLAG_NO_VIEWFINDER_CONVERSION, NULL);
|
||||||
|
|
||||||
if (camera->video_profile_switch) {
|
if (camera->video_profile_switch) {
|
||||||
GST_DEBUG_OBJECT (camera, "Switching encodebin's profile");
|
GST_DEBUG_OBJECT (camera, "Switching encodebin's profile");
|
||||||
g_object_set (camera->video_encodebin, "profile", camera->video_profile,
|
g_object_set (camera->video_encodebin, "profile", camera->video_profile,
|
||||||
|
|
|
@ -36,7 +36,9 @@ typedef enum
|
||||||
/* matches GstEncFlags GST_ENC_FLAG_NO_AUDIO_CONVERSION in encodebin */
|
/* matches GstEncFlags GST_ENC_FLAG_NO_AUDIO_CONVERSION in encodebin */
|
||||||
GST_CAM_FLAG_NO_AUDIO_CONVERSION = (1 << 0),
|
GST_CAM_FLAG_NO_AUDIO_CONVERSION = (1 << 0),
|
||||||
/* matches GstEncFlags GST_ENC_FLAG_NO_VIDEO_CONVERSION in encodebin */
|
/* matches GstEncFlags GST_ENC_FLAG_NO_VIDEO_CONVERSION in encodebin */
|
||||||
GST_CAM_FLAG_NO_VIDEO_CONVERSION = (1 << 1)
|
GST_CAM_FLAG_NO_VIDEO_CONVERSION = (1 << 1),
|
||||||
|
/* maps to 'disable-converters' property in viewfinderbin */
|
||||||
|
GST_CAM_FLAG_NO_VIEWFINDER_CONVERSION = (1 << 2)
|
||||||
} GstCamFlags;
|
} GstCamFlags;
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue