1 /***************************************************************************
2 stopmotion.cpp - description
5 copyright : (C) 2010 by Jean-Baptiste Mardelle
6 email : jb@kdenlive.org
7 ***************************************************************************/
9 /***************************************************************************
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
16 ***************************************************************************/
18 #include "stopmotion.h"
19 #include "../blackmagic/devices.h"
20 #include "../v4l/v4lcapture.h"
21 #include "../slideshowclip.h"
22 #include "ui_smconfig_ui.h"
23 #include "kdenlivesettings.h"
27 #include <KGlobalSettings>
28 #include <KFileDialog>
29 #include <KStandardDirs>
30 #include <KMessageBox>
31 #include <kdeversion.h>
32 #include <KNotification>
35 #include <qimageblitz/qimageblitz.h>
38 #include <QtConcurrentRun>
39 #include <QInputDialog>
41 #include <QVBoxLayout>
45 #include <QWheelEvent>
48 MyLabel::MyLabel(QWidget* parent) :
53 void MyLabel::setImage(QImage img)
59 void MyLabel::wheelEvent(QWheelEvent* event)
61 if (event->delta() > 0) emit seek(true);
62 else emit seek(false);
66 void MyLabel::mousePressEvent(QMouseEvent*)
72 void MyLabel::paintEvent(QPaintEvent* event)
76 QRect r(0, 0, width(), height());
78 p.fillRect(r, QColor(KdenliveSettings::window_background()));
79 double aspect_ratio = (double) m_img.width() / m_img.height();
80 int pictureHeight = height();
81 int pictureWidth = width();
82 int calculatedWidth = aspect_ratio * height();
83 if (calculatedWidth > width()) pictureHeight = width() / aspect_ratio;
85 int calculatedHeight = width() / aspect_ratio;
86 if (calculatedHeight > height()) pictureWidth = height() * aspect_ratio;
88 p.drawImage(QRect((width() - pictureWidth) / 2, (height() - pictureHeight) / 2, pictureWidth, pictureHeight), m_img, QRect(0, 0, m_img.width(), m_img.height()));
93 StopmotionWidget::StopmotionWidget(KUrl projectFolder, QList< QAction* > actions, QWidget* parent) :
96 , m_projectFolder(projectFolder)
102 //setAttribute(Qt::WA_DeleteOnClose);
103 QAction* analyse = new QAction(i18n("Send frames to color scopes"), this);
104 analyse->setCheckable(true);
105 analyse->setChecked(KdenliveSettings::analyse_stopmotion());
106 connect(analyse, SIGNAL(triggered(bool)), this, SLOT(slotSwitchAnalyse(bool)));
109 setWindowTitle(i18n("Stop Motion Capture"));
110 setFont(KGlobalSettings::toolBarFont());
112 live_button->setIcon(KIcon("camera-photo"));
114 m_captureAction = actions.at(0);
115 connect(m_captureAction, SIGNAL(triggered()), this, SLOT(slotCaptureFrame()));
116 capture_button->setDefaultAction(m_captureAction);
118 connect(actions.at(1), SIGNAL(triggered()), this, SLOT(slotSwitchLive()));
120 preview_button->setIcon(KIcon("media-playback-start"));
121 capture_button->setEnabled(false);
124 QMenu* confMenu = new QMenu;
125 m_showOverlay = actions.at(2);
126 connect(m_showOverlay, SIGNAL(triggered(bool)), this, SLOT(slotShowOverlay(bool)));
127 overlay_button->setDefaultAction(m_showOverlay);
128 //confMenu->addAction(m_showOverlay);
131 m_effectIndex = KdenliveSettings::blitzeffect();
132 QMenu* effectsMenu = new QMenu(i18n("Overlay effect"));
133 QActionGroup* effectGroup = new QActionGroup(this);
134 QAction* noEffect = new QAction(i18n("No Effect"), effectGroup);
135 noEffect->setData(1);
136 QAction* contrastEffect = new QAction(i18n("Contrast"), effectGroup);
137 contrastEffect->setData(2);
138 QAction* edgeEffect = new QAction(i18n("Edge detect"), effectGroup);
139 edgeEffect->setData(3);
140 QAction* brightEffect = new QAction(i18n("Brighten"), effectGroup);
141 brightEffect->setData(4);
142 QAction* invertEffect = new QAction(i18n("Invert"), effectGroup);
143 invertEffect->setData(5);
144 QAction* thresEffect = new QAction(i18n("Threshold"), effectGroup);
145 thresEffect->setData(6);
147 effectsMenu->addAction(noEffect);
148 effectsMenu->addAction(contrastEffect);
149 effectsMenu->addAction(edgeEffect);
150 effectsMenu->addAction(brightEffect);
151 effectsMenu->addAction(invertEffect);
152 effectsMenu->addAction(thresEffect);
153 QList <QAction*> list = effectsMenu->actions();
154 for (int i = 0; i < list.count(); i++) {
155 list.at(i)->setCheckable(true);
156 if (list.at(i)->data().toInt() == m_effectIndex) {
157 list.at(i)->setChecked(true);
160 connect(effectsMenu, SIGNAL(triggered(QAction*)), this, SLOT(slotUpdateOverlayEffect(QAction*)));
161 confMenu->addMenu(effectsMenu);
164 QAction* showThumbs = new QAction(KIcon("image-x-generic"), i18n("Show sequence thumbnails"), this);
165 showThumbs->setCheckable(true);
166 showThumbs->setChecked(KdenliveSettings::showstopmotionthumbs());
167 connect(showThumbs, SIGNAL(triggered(bool)), this, SLOT(slotShowThumbs(bool)));
169 QAction* removeCurrent = new QAction(KIcon("edit-delete"), i18n("Delete current frame"), this);
170 removeCurrent->setShortcut(Qt::Key_Delete);
171 connect(removeCurrent, SIGNAL(triggered()), this, SLOT(slotRemoveFrame()));
173 QAction* conf = new QAction(KIcon("configure"), i18n("Configure"), this);
174 connect(conf, SIGNAL(triggered()), this, SLOT(slotConfigure()));
176 confMenu->addAction(showThumbs);
177 confMenu->addAction(removeCurrent);
178 confMenu->addAction(analyse);
179 confMenu->addAction(conf);
180 config_button->setIcon(KIcon("configure"));
181 config_button->setMenu(confMenu);
183 // Build capture menu
184 QMenu* capMenu = new QMenu;
185 m_intervalCapture = new QAction(KIcon("edit-redo"), i18n("Interval capture"), this);
186 m_intervalCapture->setCheckable(true);
187 m_intervalCapture->setChecked(false);
188 connect(m_intervalCapture, SIGNAL(triggered(bool)), this, SLOT(slotIntervalCapture(bool)));
189 capMenu->addAction(m_intervalCapture);
190 capture_button->setMenu(capMenu);
192 connect(sequence_name, SIGNAL(textChanged(const QString&)), this, SLOT(sequenceNameChanged(const QString&)));
193 connect(sequence_name, SIGNAL(currentIndexChanged(int)), live_button, SLOT(setFocus()));
195 m_layout = new QVBoxLayout;
196 if (BMInterface::getBlackMagicDeviceList(capture_device, NULL)) {
197 // Found a BlackMagic device
198 m_bmCapture = new BmdCaptureHandler(m_layout);
199 connect(m_bmCapture, SIGNAL(gotMessage(const QString&)), this, SLOT(slotGotHDMIMessage(const QString&)));
201 if (QFile::exists(KdenliveSettings::video4vdevice())) {
202 #if !defined(Q_WS_MAC) && !defined(Q_OS_FREEBSD)
203 V4lCaptureHandler v4l(NULL);
204 // Video 4 Linux device detection
205 for (int i = 0; i < 10; i++) {
206 QString path = "/dev/video" + QString::number(i);
207 if (QFile::exists(path)) {
208 QStringList deviceInfo = v4l.getDeviceName(path);
209 if (!deviceInfo.isEmpty()) {
210 capture_device->addItem(deviceInfo.at(0), "v4l");
211 capture_device->setItemData(capture_device->count() - 1, path, Qt::UserRole + 1);
212 capture_device->setItemData(capture_device->count() - 1, deviceInfo.at(1), Qt::UserRole + 2);
213 if (path == KdenliveSettings::video4vdevice()) capture_device->setCurrentIndex(capture_device->count() - 1);
218 /*V4lCaptureHandler v4lhandler(NULL);
219 QStringList deviceInfo = v4lhandler.getDeviceName(KdenliveSettings::video4vdevice());
220 capture_device->addItem(deviceInfo.at(0), "v4l");
221 capture_device->setItemData(capture_device->count() - 1, deviceInfo.at(3), Qt::UserRole + 1);*/
222 if (m_bmCapture == NULL) {
223 m_bmCapture = new V4lCaptureHandler(m_layout);
224 m_bmCapture->setDevice(capture_device->itemData(capture_device->currentIndex(), Qt::UserRole + 1).toString(), capture_device->itemData(capture_device->currentIndex(), Qt::UserRole + 2).toString());
229 connect(capture_device, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateHandler()));
231 connect(m_bmCapture, SIGNAL(frameSaved(const QString)), this, SLOT(slotNewThumb(const QString)));
232 connect(m_bmCapture, SIGNAL(gotFrame(QImage)), this, SIGNAL(gotFrame(QImage)));
233 } else live_button->setEnabled(false);
234 m_frame_preview = new MyLabel(this);
235 connect(m_frame_preview, SIGNAL(seek(bool)), this, SLOT(slotSeekFrame(bool)));
236 connect(m_frame_preview, SIGNAL(switchToLive()), this, SLOT(slotSwitchLive()));
237 m_layout->addWidget(m_frame_preview);
238 m_frame_preview->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
239 video_preview->setLayout(m_layout);
240 live_button->setChecked(false);
241 button_addsequence->setEnabled(false);
242 connect(live_button, SIGNAL(toggled(bool)), this, SLOT(slotLive(bool)));
243 connect(button_addsequence, SIGNAL(clicked(bool)), this, SLOT(slotAddSequence()));
244 connect(preview_button, SIGNAL(clicked(bool)), this, SLOT(slotPlayPreview(bool)));
245 connect(frame_list, SIGNAL(currentRowChanged(int)), this, SLOT(slotShowSelectedFrame()));
246 connect(frame_list, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(slotShowSelectedFrame()));
247 connect(this, SIGNAL(doCreateThumbs(QImage, int)), this, SLOT(slotCreateThumbs(QImage, int)));
249 frame_list->addAction(removeCurrent);
250 frame_list->setContextMenuPolicy(Qt::ActionsContextMenu);
251 frame_list->setHidden(!KdenliveSettings::showstopmotionthumbs());
252 parseExistingSequences();
253 QTimer::singleShot(500, this, SLOT(slotLive()));
256 StopmotionWidget::~StopmotionWidget()
259 m_bmCapture->stopPreview();
262 void StopmotionWidget::slotUpdateOverlayEffect(QAction* act)
265 if (act) m_effectIndex = act->data().toInt();
266 KdenliveSettings::setBlitzeffect(m_effectIndex);
267 if (m_showOverlay->isChecked()) slotUpdateOverlay();
271 void StopmotionWidget::closeEvent(QCloseEvent* e)
274 QDialog::closeEvent(e);
277 void StopmotionWidget::slotConfigure()
282 d.setWindowTitle(i18n("Configure Stop Motion"));
283 ui.sm_interval->setValue(KdenliveSettings::captureinterval());
284 ui.sm_loop->setChecked(KdenliveSettings::sm_loop());
285 ui.sm_framesplayback->setValue(KdenliveSettings::sm_framesplayback());
286 if (d.exec() == QDialog::Accepted) {
287 KdenliveSettings::setSm_loop(ui.sm_loop->isChecked());
288 KdenliveSettings::setCaptureinterval(ui.sm_interval->value());
289 KdenliveSettings::setSm_framesplayback(ui.sm_framesplayback->value());
293 void StopmotionWidget::slotShowThumbs(bool show)
295 KdenliveSettings::setShowstopmotionthumbs(show);
298 sequenceNameChanged(sequence_name->currentText());
303 frame_list->setHidden(!show);
306 void StopmotionWidget::slotIntervalCapture(bool capture)
308 if (capture) slotCaptureFrame();
312 void StopmotionWidget::slotUpdateHandler()
314 QString data = capture_device->itemData(capture_device->currentIndex()).toString();
319 m_layout->removeWidget(m_frame_preview);
321 #if !defined(Q_WS_MAC) && !defined(Q_OS_FREEBSD)
322 m_bmCapture = new V4lCaptureHandler(m_layout);
323 m_bmCapture->setDevice(capture_device->itemData(capture_device->currentIndex(), Qt::UserRole + 1).toString(), capture_device->itemData(capture_device->currentIndex(), Qt::UserRole + 2).toString());
326 m_bmCapture = new BmdCaptureHandler(m_layout);
327 if (m_bmCapture) connect(m_bmCapture, SIGNAL(gotMessage(const QString&)), this, SLOT(slotGotHDMIMessage(const QString&)));
329 live_button->setEnabled(m_bmCapture != NULL);
330 m_layout->addWidget(m_frame_preview);
333 void StopmotionWidget::slotGotHDMIMessage(const QString& message)
335 log_box->insertItem(0, message);
338 void StopmotionWidget::parseExistingSequences()
340 sequence_name->clear();
341 sequence_name->addItem(QString());
342 QDir dir(m_projectFolder.path());
344 filters << "*_0000.png";
345 //dir.setNameFilters(filters);
346 QStringList sequences = dir.entryList(filters, QDir::Files, QDir::Name);
347 //kDebug()<<"PF: "<<<<", sm: "<<sequences;
348 foreach(QString sequencename, sequences) {
349 sequence_name->addItem(sequencename.section("_", 0, -2));
353 void StopmotionWidget::slotSwitchLive()
355 setUpdatesEnabled(false);
356 if (m_frame_preview->isHidden()) {
357 if (m_bmCapture) m_bmCapture->hidePreview(true);
358 m_frame_preview->setHidden(false);
360 m_frame_preview->setHidden(true);
361 if (m_bmCapture) m_bmCapture->hidePreview(false);
362 capture_button->setEnabled(true);
364 setUpdatesEnabled(true);
367 void StopmotionWidget::slotLive(bool isOn)
369 live_button->blockSignals(true);
370 if (isOn && m_bmCapture) {
371 //m_frame_preview->setImage(QImage());
372 m_frame_preview->setHidden(true);
373 m_bmCapture->startPreview(KdenliveSettings::hdmi_capturedevice(), KdenliveSettings::hdmi_capturemode(), false);
374 capture_button->setEnabled(true);
375 live_button->setChecked(true);
377 if (m_bmCapture) m_bmCapture->stopPreview();
378 m_frame_preview->setHidden(false);
379 capture_button->setEnabled(false);
380 live_button->setChecked(false);
382 live_button->blockSignals(false);
385 void StopmotionWidget::slotShowOverlay(bool isOn)
388 if (live_button->isChecked() && m_sequenceFrame > 0) {
391 } else if (m_bmCapture) {
392 m_bmCapture->hideOverlay();
396 void StopmotionWidget::slotUpdateOverlay()
398 if (m_bmCapture == NULL) return;
399 QString path = getPathForFrame(m_sequenceFrame - 1);
400 if (!QFile::exists(path)) return;
403 QTimer::singleShot(1000, this, SLOT(slotUpdateOverlay()));
408 //img = Blitz::convolveEdge(img, 0, Blitz::Low);
409 switch (m_effectIndex) {
411 img = Blitz::contrast(img, true, 6);
414 img = Blitz::edge(img);
417 img = Blitz::intensity(img, 0.5);
423 img = Blitz::threshold(img, 120, Blitz::Grayscale, qRgba(0, 0, 0, 0), qRgba(255, 0, 0, 255));
424 //img = Blitz::flatten(img, QColor(255, 0, 0, 255), QColor(0, 0, 0, 0));
431 m_bmCapture->showOverlay(img);
434 void StopmotionWidget::sequenceNameChanged(const QString& name)
436 // Get rid of frames from previous sequence
437 disconnect(this, SIGNAL(doCreateThumbs(QImage, int)), this, SLOT(slotCreateThumbs(QImage, int)));
439 m_future.waitForFinished();
441 if (name.isEmpty()) {
442 button_addsequence->setEnabled(false);
444 // Check if we are editing an existing sequence
445 QString pattern = SlideshowClip::selectedPath(getPathForFrame(0, sequence_name->currentText()), false, QString(), &m_filesList);
446 m_sequenceFrame = m_filesList.isEmpty() ? 0 : SlideshowClip::getFrameNumberFromPath(m_filesList.last()) + 1;
447 if (!m_filesList.isEmpty()) {
448 m_sequenceName = sequence_name->currentText();
449 connect(this, SIGNAL(doCreateThumbs(QImage, int)), this, SLOT(slotCreateThumbs(QImage, int)));
450 m_future = QtConcurrent::run(this, &StopmotionWidget::slotPrepareThumbs);
451 button_addsequence->setEnabled(true);
454 connect(this, SIGNAL(doCreateThumbs(QImage, int)), this, SLOT(slotCreateThumbs(QImage, int)));
455 button_addsequence->setEnabled(false);
457 capture_button->setEnabled(live_button->isChecked());
461 void StopmotionWidget::slotCaptureFrame()
463 if (m_bmCapture == NULL) return;
464 if (sequence_name->currentText().isEmpty()) {
465 QString seqName = QInputDialog::getText(this, i18n("Create New Sequence"), i18n("Enter sequence name"));
466 if (seqName.isEmpty()) return;
467 sequence_name->blockSignals(true);
468 sequence_name->setItemText(sequence_name->currentIndex(), seqName);
469 sequence_name->blockSignals(false);
471 if (m_sequenceName != sequence_name->currentText()) {
472 m_sequenceName = sequence_name->currentText();
475 //capture_button->setEnabled(false);
476 QString currentPath = getPathForFrame(m_sequenceFrame);
477 m_bmCapture->captureFrame(currentPath);
478 KNotification::event("FrameCaptured", i18n("Frame Captured"), QPixmap(), this);
480 button_addsequence->setEnabled(true);
481 if (m_intervalCapture->isChecked()) QTimer::singleShot(KdenliveSettings::captureinterval() * 1000, this, SLOT(slotCaptureFrame()));
485 void StopmotionWidget::slotNewThumb(const QString path)
487 if (!KdenliveSettings::showstopmotionthumbs()) return;
488 m_filesList.append(path);
489 if (m_showOverlay->isChecked()) slotUpdateOverlay();
490 if (!m_future.isRunning()) m_future = QtConcurrent::run(this, &StopmotionWidget::slotPrepareThumbs);
493 void StopmotionWidget::slotPrepareThumbs()
495 if (m_filesList.isEmpty()) return;
496 QString path = m_filesList.takeFirst();
497 emit doCreateThumbs(QImage(path), SlideshowClip::getFrameNumberFromPath(path));
501 void StopmotionWidget::slotCreateThumbs(QImage img, int ix)
504 m_future = QtConcurrent::run(this, &StopmotionWidget::slotPrepareThumbs);
508 int width = height * img.width() / img.height();
509 frame_list->setIconSize(QSize(width, height));
510 QPixmap pix = QPixmap::fromImage(img).scaled(width, height);
511 QString nb = QString::number(ix);
513 QFontInfo finfo(font());
514 p.fillRect(0, 0, finfo.pixelSize() * nb.count() + 6, finfo.pixelSize() + 6, QColor(80, 80, 80, 150));
516 p.drawText(QPoint(3, finfo.pixelSize() + 3), nb);
519 QListWidgetItem* item = new QListWidgetItem(icon, QString(), frame_list);
520 item->setToolTip(getPathForFrame(ix, sequence_name->currentText()));
521 item->setData(Qt::UserRole, ix);
522 frame_list->blockSignals(true);
523 frame_list->setCurrentItem(item);
524 frame_list->blockSignals(false);
525 m_future = QtConcurrent::run(this, &StopmotionWidget::slotPrepareThumbs);
528 QString StopmotionWidget::getPathForFrame(int ix, QString seqName)
530 if (seqName.isEmpty()) seqName = m_sequenceName;
531 return m_projectFolder.path(KUrl::AddTrailingSlash) + seqName + "_" + QString::number(ix).rightJustified(4, '0', false) + ".png";
534 void StopmotionWidget::slotShowFrame(const QString& path)
538 capture_button->setEnabled(false);
541 if (m_bmCapture) m_bmCapture->hidePreview(true);
542 m_frame_preview->setImage(img);
543 m_frame_preview->setHidden(false);
544 m_frame_preview->update();
548 void StopmotionWidget::slotShowSelectedFrame()
550 QListWidgetItem* item = frame_list->currentItem();
552 //int ix = item->data(Qt::UserRole).toInt();;
553 slotShowFrame(item->toolTip());
557 void StopmotionWidget::slotAddSequence()
559 emit addOrUpdateSequence(getPathForFrame(0));
562 void StopmotionWidget::slotPlayPreview(bool animate)
567 m_animationList.clear();
570 if (KdenliveSettings::showstopmotionthumbs()) {
571 if (KdenliveSettings::sm_framesplayback() == 0) frame_list->setCurrentRow(0);
572 else frame_list->setCurrentRow(frame_list->count() - KdenliveSettings::sm_framesplayback());
573 QTimer::singleShot(200, this, SLOT(slotAnimate()));
575 SlideshowClip::selectedPath(getPathForFrame(0, sequence_name->currentText()), false, QString(), &m_animationList);
576 if (KdenliveSettings::sm_framesplayback() > 0) {
577 // only play the last x frames
578 while (m_animationList.count() > KdenliveSettings::sm_framesplayback() + 1) {
579 m_animationList.removeFirst();
587 void StopmotionWidget::slotAnimate()
590 if (KdenliveSettings::showstopmotionthumbs()) {
591 int newRow = frame_list->currentRow() + 1;
592 if (KdenliveSettings::sm_loop() || newRow < frame_list->count()) {
593 if (newRow >= frame_list->count()) {
594 if (KdenliveSettings::sm_framesplayback() == 0) newRow = 0;
596 // seek to correct frame
597 newRow = frame_list->count() - KdenliveSettings::sm_framesplayback();
600 frame_list->setCurrentRow(newRow);
601 QTimer::singleShot(100, this, SLOT(slotAnimate()));
605 if (m_animatedIndex >= m_animationList.count()) {
606 if (KdenliveSettings::sm_loop()) m_animatedIndex = 0;
607 else m_animatedIndex = -1;
609 if (m_animatedIndex > -1) {
610 slotShowFrame(m_animationList.at(m_animatedIndex));
612 QTimer::singleShot(100, this, SLOT(slotAnimate()));
618 preview_button->setChecked(false);
622 QListWidgetItem* StopmotionWidget::getFrameFromIndex(int ix)
624 QListWidgetItem* item = NULL;
626 if (ix >= frame_list->count()) {
627 pos = frame_list->count() - 1;
630 item = frame_list->item(pos);
632 int value = item->data(Qt::UserRole).toInt();
633 if (value == ix) return item;
634 else if (value < ix) {
636 while (pos < frame_list->count()) {
637 item = frame_list->item(pos);
638 value = item->data(Qt::UserRole).toInt();
639 if (value == ix) return item;
645 item = frame_list->item(pos);
646 value = item->data(Qt::UserRole).toInt();
647 if (value == ix) return item;
655 void StopmotionWidget::selectFrame(int ix)
657 frame_list->blockSignals(true);
658 QListWidgetItem* item = getFrameFromIndex(ix);
660 frame_list->setCurrentItem(item);
661 frame_list->blockSignals(false);
664 void StopmotionWidget::slotSeekFrame(bool forward)
666 int ix = frame_list->currentRow();
668 if (ix < frame_list->count() - 1) frame_list->setCurrentRow(ix + 1);
669 } else if (ix > 0) frame_list->setCurrentRow(ix - 1);
672 void StopmotionWidget::slotRemoveFrame()
674 if (frame_list->currentItem() == NULL) return;
675 QString path = frame_list->currentItem()->toolTip();
676 if (KMessageBox::questionYesNo(this, i18n("Delete frame %1 from disk?", path), i18n("Delete Frame")) != KMessageBox::Yes) return;
679 QListWidgetItem* item = frame_list->takeItem(frame_list->currentRow());
680 int ix = item->data(Qt::UserRole).toInt();
681 if (ix == m_sequenceFrame - 1) {
682 // We are removing the last frame, update counter
683 QListWidgetItem* item2 = frame_list->item(frame_list->count() - 1);
684 if (item2) m_sequenceFrame = item2->data(Qt::UserRole).toInt() + 1;
690 void StopmotionWidget::slotSwitchAnalyse(bool isOn)
692 KdenliveSettings::setAnalyse_stopmotion(isOn);
693 m_bmCapture->setAnalyse(isOn);