File indexing completed on 2021-12-21 13:27:46

0001 /*
0002     SPDX-FileCopyrightText: 2010 Dirk Vanden Boer <dirk.vdb@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef KFFMPEG_THUMBNAILER_H
0008 #define KFFMPEG_THUMBNAILER_H
0009 
0010 #include <QObject>
0011 #include <QCache>
0012 // KF
0013 #include <KIO/ThumbSequenceCreator>
0014 
0015 #include <ffmpegthumbnailer/videothumbnailer.h>
0016 #include <ffmpegthumbnailer/filmstripfilter.h>
0017 
0018 class QCheckBox;
0019 class QLineEdit;
0020 class QSpinBox;
0021 
0022 class FFMpegThumbnailer : public QObject, public ThumbSequenceCreator
0023 {
0024     Q_OBJECT
0025 
0026 private:
0027     typedef QCache<QString, QImage> ThumbCache;
0028 
0029 public:
0030     FFMpegThumbnailer();
0031     ~FFMpegThumbnailer() override;
0032     bool create(const QString& path, int width, int height, QImage& img) override;
0033     Flags flags() const override;
0034 
0035 private:
0036     void updateSequenceIndexWraparoundPoint(float offset);
0037 
0038 private:
0039     ffmpegthumbnailer::VideoThumbnailer m_Thumbnailer;
0040     ffmpegthumbnailer::FilmStripFilter  m_FilmStrip;
0041     ThumbCache                          m_thumbCache;
0042 };
0043 
0044 #endif