Reset the unneeded caps
authorMohammed Sameer <msameer@foolab.org>
Sun, 23 Sep 2012 00:20:05 +0000 (03:20 +0300)
committerMohammed Sameer <msameer@foolab.org>
Sun, 23 Sep 2012 00:20:05 +0000 (03:20 +0300)
If we don't do it then we fail to restart the pipeline after we switch to image mode.

lib/qtcamimagemode.cpp
lib/qtcamvideomode.cpp

index b73dee4..1a00712 100644 (file)
@@ -80,8 +80,9 @@ void QtCamImageMode::applySettings() {
 
   setPreviewSize(d->resolution.previewResolution());
 
-  // TODO: ?
-  // d_ptr->resetCaps("video-capture-caps");
+  // If we don't reset the caps then: if we switch from video to image then we fail
+  // the next time we restart the pipeline.
+  d_ptr->resetCaps("video-capture-caps");
 }
 
 void QtCamImageMode::start() {
index 15f8526..e8de442 100644 (file)
@@ -87,8 +87,8 @@ void QtCamVideoMode::applySettings() {
 
   setPreviewSize(d->resolution.previewResolution());
 
-  // TODO:
-  //  d_ptr->resetCaps("image-capture-caps");
+  // Not sure this is needed but just in case.
+  d_ptr->resetCaps("image-capture-caps");
 }
 
 void QtCamVideoMode::start() {