-void QtCamMode::setPreviewSize(const QSize& size) {
- if (!d_ptr->dev->cameraBin) {
- return;
- }
-
- if (size.width() <= 0 && size.height() <= 0) {
- g_object_set(d_ptr->dev->cameraBin, "preview-caps", NULL, "post-previews", FALSE, NULL);
- }
- else {
- QString preview = QString(PREVIEW_CAPS).arg(size.width()).arg(size.height());
-
- GstCaps *caps = gst_caps_from_string(preview.toAscii());
-
- g_object_set(d_ptr->dev->cameraBin, "preview-caps", caps, "post-previews", TRUE, NULL);
-
- gst_caps_unref(caps);
- }
-}
-
-void QtCamMode::setFileName(const QString& fileName) {
- d_ptr->doneHandler->fileName = fileName;
-}
-