summaryrefslogtreecommitdiffstats
path: root/plugins/multimedia/gstreamer/camerabin/camerabincontrol.cpp
diff options
context:
space:
mode:
authorDmytro Poplavskiy <dmytro.poplavskiy@nokia.com>2011-06-03 13:30:50 +1000
committerDmytro Poplavskiy <dmytro.poplavskiy@nokia.com>2011-06-03 13:30:50 +1000
commit1dfd6d4a1af1af3a1c31f094656cc043390c6e24 (patch)
tree97f36f663560fa9149a8a1bb127a476b3d1fe664 /plugins/multimedia/gstreamer/camerabin/camerabincontrol.cpp
parent36209a3f0fc7557c3e9f899e56675f9c2790a7a9 (diff)
camerabin backend: allow app to request viewfinder colorspace element.
This allows QCamera client to receive video frames in RGB formats. Reviewed-by: Michael Goddard
Diffstat (limited to 'plugins/multimedia/gstreamer/camerabin/camerabincontrol.cpp')
-rw-r--r--plugins/multimedia/gstreamer/camerabin/camerabincontrol.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/plugins/multimedia/gstreamer/camerabin/camerabincontrol.cpp b/plugins/multimedia/gstreamer/camerabin/camerabincontrol.cpp
index 8c5a31b627..2c30fd6569 100644
--- a/plugins/multimedia/gstreamer/camerabin/camerabincontrol.cpp
+++ b/plugins/multimedia/gstreamer/camerabin/camerabincontrol.cpp
@@ -331,3 +331,26 @@ bool CameraBinControl::canChangeProperty(PropertyChangeType changeType, QCamera:
return false;
}
}
+
+#define VIEWFINDER_COLORSPACE_CONVERSION 0x00000004
+
+bool CameraBinControl::viewfinderColorSpaceConversion() const
+{
+ gint flags = 0;
+ g_object_get(G_OBJECT(m_session->cameraBin()), "flags", &flags, NULL);
+
+ return flags & VIEWFINDER_COLORSPACE_CONVERSION;
+}
+
+void CameraBinControl::setViewfinderColorSpaceConversion(bool enabled)
+{
+ gint flags = 0;
+ g_object_get(G_OBJECT(m_session->cameraBin()), "flags", &flags, NULL);
+
+ if (enabled)
+ flags |= VIEWFINDER_COLORSPACE_CONVERSION;
+ else
+ flags &= ~VIEWFINDER_COLORSPACE_CONVERSION;
+
+ g_object_set(G_OBJECT(m_session->cameraBin()), "flags", flags, NULL);
+}