summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorThiago Santos <thiago.sousa.santos@collabora.co.uk>2011-05-11 18:35:40 -0300
committerThiago Santos <thiago.sousa.santos@collabora.co.uk>2011-05-16 18:08:40 -0300
commit0b02e595f3c289877528c9335e5c8e5c9b47782e (patch)
tree8c54206b701b51f3d459436cc5d05f86ea7ce81e /gst
parenta36edbc1abead0576ab44acb1cbc19c905cd5903 (diff)
camerabin2: Changing how some properties work
Some properties (like viewfinder-filter) only are taken into use on NULL->READY transitions and the get/set property was returning the currently in use value, instead of the last set. This is bad, as after setting 'a' to 'x', you expect that getting 'a' will return 'x'. This patch fixes it. If needed, later we could add current-* properties that are readonly and get the current value in use.
Diffstat (limited to 'gst')
-rw-r--r--gst/camerabin2/gstcamerabin2.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/gst/camerabin2/gstcamerabin2.c b/gst/camerabin2/gstcamerabin2.c
index 7cfb8ed56e..888f55b0f0 100644
--- a/gst/camerabin2/gstcamerabin2.c
+++ b/gst/camerabin2/gstcamerabin2.c
@@ -466,12 +466,14 @@ gst_camera_bin_class_init (GstCameraBinClass * klass)
g_object_class_install_property (object_class, PROP_CAMERA_SRC,
g_param_spec_object ("camera-src", "Camera source",
- "The camera source element to be used",
+ "The camera source element to be used. It is only taken into use on"
+ " the next null to ready transition",
GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_AUDIO_SRC,
g_param_spec_object ("audio-src", "Audio source",
- "The audio source element to be used on video recordings",
+ "The audio source element to be used on video recordings. It is only"
+ " taken into use on the next null to ready transition",
GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_MUTE_AUDIO,
@@ -565,7 +567,8 @@ gst_camera_bin_class_init (GstCameraBinClass * klass)
g_object_class_install_property (object_class, PROP_VIEWFINDER_SINK,
g_param_spec_object ("viewfinder-sink", "Viewfinder sink",
- "The video sink of the viewfinder.",
+ "The video sink of the viewfinder. It is only taken into use"
+ " on the next null to ready transition",
GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class,
@@ -1496,10 +1499,10 @@ gst_camera_bin_get_property (GObject * object, guint prop_id,
}
break;
case PROP_CAMERA_SRC:
- g_value_set_object (value, camera->src);
+ g_value_set_object (value, camera->user_src);
break;
case PROP_AUDIO_SRC:
- g_value_set_object (value, camera->audio_src);
+ g_value_set_object (value, camera->user_audio_src);
break;
case PROP_MUTE_AUDIO:{
gboolean mute;
@@ -1596,16 +1599,16 @@ gst_camera_bin_get_property (GObject * object, guint prop_id,
}
break;
case PROP_VIDEO_FILTER:
- if (camera->video_filter)
- g_value_set_object (value, camera->video_filter);
+ if (camera->user_video_filter)
+ g_value_set_object (value, camera->user_video_filter);
break;
case PROP_IMAGE_FILTER:
- if (camera->image_filter)
- g_value_set_object (value, camera->image_filter);
+ if (camera->user_image_filter)
+ g_value_set_object (value, camera->user_image_filter);
break;
case PROP_VIEWFINDER_FILTER:
- if (camera->viewfinder_filter)
- g_value_set_object (value, camera->viewfinder_filter);
+ if (camera->user_viewfinder_filter)
+ g_value_set_object (value, camera->user_viewfinder_filter);
break;
case PROP_PREVIEW_FILTER:
if (camera->preview_filter)