summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLionel Landwerlin <llandwerlin@gmail.com>2013-08-09 17:59:40 +0100
committerLionel Landwerlin <llandwerlin@gmail.com>2013-08-09 18:04:33 +0100
commit5ab5cecd034fc50021138c7a4e92cce064b2a93f (patch)
treed9dc606edf4c5e94726716c494ec6ff659877367
parent35aeb9dc4b2d3a7def8f202d11aa0e9ec98ebc40 (diff)
downloadclutter-gst-5ab5cecd034fc50021138c7a4e92cce064b2a93f.tar.gz
camera: add device property
-rw-r--r--clutter-gst/clutter-gst-camera.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/clutter-gst/clutter-gst-camera.c b/clutter-gst/clutter-gst-camera.c
index ef8ace5..e35d250 100644
--- a/clutter-gst/clutter-gst-camera.c
+++ b/clutter-gst/clutter-gst-camera.c
@@ -96,7 +96,8 @@ enum
PROP_IDLE,
PROP_PLAYING,
- PROP_AUDIO_VOLUME
+ PROP_AUDIO_VOLUME,
+ PROP_DEVICE,
};
enum
@@ -242,6 +243,11 @@ clutter_gst_camera_get_property (GObject *object,
clutter_gst_camera_get_audio_volume (CLUTTER_GST_PLAYER (object)));
break;
+ case PROP_DEVICE:
+ g_value_set_object (value,
+ clutter_gst_camera_get_camera_device (CLUTTER_GST_CAMERA (object)));
+ break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
}
@@ -265,6 +271,11 @@ clutter_gst_camera_set_property (GObject *object,
g_value_get_double (value));
break;
+ case PROP_DEVICE:
+ clutter_gst_camera_set_camera_device (CLUTTER_GST_CAMERA (object),
+ CLUTTER_GST_CAMERA_DEVICE (g_value_get_object (value)));
+ break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
}
@@ -301,6 +312,7 @@ static void
clutter_gst_camera_class_init (ClutterGstCameraClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ GParamSpec *pspec;
g_type_class_add_private (klass, sizeof (ClutterGstCameraPrivate));
@@ -315,6 +327,20 @@ clutter_gst_camera_class_init (ClutterGstCameraClass *klass)
g_object_class_override_property (object_class,
PROP_AUDIO_VOLUME, "audio-volume");
+
+ /**
+ * ClutterGstCamera:camera-device:
+ *
+ * The camera device associated with the camera player.
+ */
+ pspec = g_param_spec_object ("device",
+ "Device",
+ "Camera Device",
+ CLUTTER_GST_TYPE_CAMERA_DEVICE,
+ CLUTTER_GST_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_DEVICE, pspec);
+
+
/* Signals */
/**