projects
/
harmattan
/
cameraplus
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1333735
)
return true if we try to set the resolution and the pipeline is not running
author
Mohammed Sameer
<msameer@foolab.org>
Sat, 22 Sep 2012 21:22:05 +0000
(
00:22
+0300)
committer
Mohammed Sameer
<msameer@foolab.org>
Sat, 22 Sep 2012 21:22:05 +0000
(
00:22
+0300)
lib/qtcamimagemode.cpp
patch
|
blob
|
history
diff --git
a/lib/qtcamimagemode.cpp
b/lib/qtcamimagemode.cpp
index
05a6d10
..
df132d6
100644
(file)
--- a/
lib/qtcamimagemode.cpp
+++ b/
lib/qtcamimagemode.cpp
@@
-111,8
+111,14
@@
bool QtCamImageMode::capture(const QString& fileName) {
bool QtCamImageMode::setResolution(const QtCamImageResolution& resolution) {
d->resolution = resolution;
bool QtCamImageMode::setResolution(const QtCamImageResolution& resolution) {
d->resolution = resolution;
+ if (!d_ptr->dev->q_ptr->isRunning()) {
+ // We will return true here because setting the resolution on a non-running pipeline
+ // doesn't make much sense (Probably the only use case is as a kind of optimization only).
+ // We will set it anyway when the pipeline gets started.
+ return true;
+ }
- if (!d_ptr->dev->q_ptr->is
Running() || !d_ptr->dev->q_ptr->is
Idle()) {
+ if (!d_ptr->dev->q_ptr->isIdle()) {
return false;
}
return false;
}