camerabin2: Add new entry to flags property

Adds a new entry to camerabin2 flags to disable viewfinder
conversion elements.
This commit is contained in:
Thiago Santos 2011-08-23 11:58:33 -03:00
parent dc9276b9ee
commit 5c662ec0c7
2 changed files with 9 additions and 1 deletions

View file

@ -270,6 +270,9 @@ gst_cam_flags_get_type (void)
"elements", "no-audio-conversion"},
{C_FLAGS (GST_CAM_FLAG_NO_VIDEO_CONVERSION), "Do not use 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}
};
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->viewfinderbin, "disable-converters",
camera->flags & GST_CAM_FLAG_NO_VIEWFINDER_CONVERSION, NULL);
if (camera->video_profile_switch) {
GST_DEBUG_OBJECT (camera, "Switching encodebin's profile");
g_object_set (camera->video_encodebin, "profile", camera->video_profile,

View file

@ -36,7 +36,9 @@ typedef enum
/* matches GstEncFlags GST_ENC_FLAG_NO_AUDIO_CONVERSION in encodebin */
GST_CAM_FLAG_NO_AUDIO_CONVERSION = (1 << 0),
/* 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;