/*!
* This file is part of CameraPlus.
*
- * Copyright (C) 2012 Mohammed Sameer <msameer@foolab.org>
+ * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
}
bool QtCamImageMode::canCapture() {
- return QtCamMode::canCapture() && d_ptr->dev->isWrapperReady();
+ return QtCamMode::canCapture() && d_ptr->dev->isReadyForCapture();
}
void QtCamImageMode::applySettings() {
// we use. For now we will not set any FPS.
d_ptr->setCaps("image-capture-caps", d->resolution.captureResolution(), -1);
- d_ptr->setPreviewSize(d->resolution.previewResolution());
+ enablePreview();
// 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.
QtCamImageSettings *QtCamImageMode::settings() const {
return d->settings;
}
+
+QtCamImageResolution QtCamImageMode::currentResolution() {
+ return d->resolution;
+}
+
+void QtCamImageMode::enablePreview() {
+ d_ptr->setPreviewSize(d->resolution.previewResolution());
+}