projects
/
harmattan
/
cameraplus
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added preview-supported property to qtcamera.ini
[harmattan/cameraplus]
/
lib
/
qtcammode_p.h
diff --git
a/lib/qtcammode_p.h
b/lib/qtcammode_p.h
index
02139b9
..
b724ffd
100644
(file)
--- a/
lib/qtcammode_p.h
+++ b/
lib/qtcammode_p.h
@@
-187,6
+187,12
@@
public:
GstCaps *caps = gst_caps_from_string(preview.toLatin1());
GstCaps *caps = gst_caps_from_string(preview.toLatin1());
+ if (!dev->conf->isPreviewSupported()) {
+ qWarning() << "Cannot set preview caps. Preview not supported";
+ gst_caps_unref(caps);
+ return;
+ }
+
g_object_set(dev->cameraBin, "preview-caps", caps, "post-previews", TRUE, NULL);
gst_caps_unref(caps);
g_object_set(dev->cameraBin, "preview-caps", caps, "post-previews", TRUE, NULL);
gst_caps_unref(caps);