[cheese/camerabin] cheese-camera: Enabling source color conversion
- From: Luciana Fujii Pontello <lufujii src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese/camerabin] cheese-camera: Enabling source color conversion
- Date: Wed, 19 Jan 2011 18:13:54 +0000 (UTC)
commit c1abb0871d8c82a10ac9d1f278b07b1a82af656e
Author: Luciana Fujii Pontello <luciana fujii eti br>
Date: Wed Jan 19 16:11:51 2011 -0200
cheese-camera: Enabling source color conversion
Setting the flag to enable color conversion on video source. Flags names
were also redefined to allow code readability.
libcheese/cheese-camera.c | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/libcheese/cheese-camera.c b/libcheese/cheese-camera.c
index 2badb5f..d64369f 100644
--- a/libcheese/cheese-camera.c
+++ b/libcheese/cheese-camera.c
@@ -51,6 +51,18 @@ typedef enum
MODE_VIDEO
} GstCameraBinMode;
+typedef enum {
+ GST_CAMERABIN_FLAG_SOURCE_RESIZE = (1 << 0),
+ GST_CAMERABIN_FLAG_SOURCE_COLOR_CONVERSION = (1 << 1),
+ GST_CAMERABIN_FLAG_VIEWFINDER_COLOR_CONVERSION = (1 << 2),
+ GST_CAMERABIN_FLAG_VIEWFINDER_SCALE = (1 << 3),
+ GST_CAMERABIN_FLAG_AUDIO_CONVERSION = (1 << 4),
+ GST_CAMERABIN_FLAG_DISABLE_AUDIO = (1 << 5),
+ GST_CAMERABIN_FLAG_IMAGE_COLOR_CONVERSION = (1 << 6),
+ GST_CAMERABIN_FLAG_VIDEO_COLOR_CONVERSION = (1 << 7)
+} GstCameraBinFlags;
+
+
typedef struct
{
GtkWidget *video_window;
@@ -1023,7 +1035,15 @@ cheese_camera_setup (CheeseCamera *camera, char *id, GError **error)
/* Set flags to enable conversions*/
- g_object_set (G_OBJECT (priv->camerabin), "flags", 0xd9, NULL);
+ g_object_set (G_OBJECT (priv->camerabin), "flags",
+ GST_CAMERABIN_FLAG_SOURCE_RESIZE |
+ GST_CAMERABIN_FLAG_SOURCE_COLOR_CONVERSION |
+ GST_CAMERABIN_FLAG_VIEWFINDER_SCALE |
+ GST_CAMERABIN_FLAG_AUDIO_CONVERSION |
+ GST_CAMERABIN_FLAG_IMAGE_COLOR_CONVERSION |
+ GST_CAMERABIN_FLAG_VIDEO_COLOR_CONVERSION,
+ NULL);
+
cheese_camera_set_camera_source (camera);
cheese_camera_create_video_filter_bin (camera, &tmp_error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]