Using these calls we can enable and disable posting of capture preview images
// we use. For now we will not set any FPS.
d_ptr->setCaps("image-capture-caps", d->resolution.captureResolution(), -1);
// 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());
// 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.
// 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.
QtCamImageResolution QtCamImageMode::currentResolution() {
return d->resolution;
}
QtCamImageResolution QtCamImageMode::currentResolution() {
return d->resolution;
}
+
+void QtCamImageMode::enablePreview() {
+ d_ptr->setPreviewSize(d->resolution.previewResolution());
+}
QtCamImageSettings *settings() const;
QtCamImageSettings *settings() const;
+ void enablePreview();
+
signals:
void captureStarted();
void captureEnded();
signals:
void captureStarted();
void captureEnded();
QtCamDevice *QtCamMode::device() const {
return d_ptr->dev->q_ptr;
}
QtCamDevice *QtCamMode::device() const {
return d_ptr->dev->q_ptr;
}
+
+void QtCamMode::disablePreview() {
+ d_ptr->setPreviewSize(QSize());
+}
QtCamDevice *device() const;
QtCamDevice *device() const;
+ virtual void enablePreview() = 0;
+ void disablePreview();
+
public slots:
void activate();
public slots:
void activate();
d_ptr->setCaps("video-capture-caps", d->resolution.captureResolution(), fps);
d_ptr->setCaps("video-capture-caps", d->resolution.captureResolution(), fps);
- d_ptr->setPreviewSize(d->resolution.previewResolution());
// Not sure this is needed but just in case.
d_ptr->resetCaps("image-capture-caps");
// Not sure this is needed but just in case.
d_ptr->resetCaps("image-capture-caps");
+void QtCamVideoMode::enablePreview() {
+ d_ptr->setPreviewSize(d->resolution.previewResolution());
+}
+
#include "moc_qtcamvideomode.cpp"
#include "moc_qtcamvideomode.cpp"
QtCamVideoSettings *settings();
QtCamVideoSettings *settings();
+ void enablePreview();
+
public slots:
void stopRecording(bool sync);
public slots:
void stopRecording(bool sync);