From 1bcbb69e31090cf71e913419299b52dd4d094bef Mon Sep 17 00:00:00 2001 From: Arno Date: Fri, 29 Mar 2013 12:55:36 +0100 Subject: Make FrameCache threaded create snapshot pics in a separate thread. Also use the first frame available if the clip isn't long enough for the configured frame. --- smglobals.h | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) (limited to 'smglobals.h') diff --git a/smglobals.h b/smglobals.h index a91d162..3c2b36c 100644 --- a/smglobals.h +++ b/smglobals.h @@ -19,34 +19,11 @@ class QAbstractItemModel; class PictureViewer2; class QPixmap; class SeriesTreeWidget; +class FrameCache; class SmGlobals : public QObject { Q_OBJECT public: - class FrameCache : public QObject { - public: - FrameCache(QObject *parent = 0); - ~FrameCache(); - void readConfig(); - const QPixmap entry(const QString &sourcePath, const QString &when = QString()); - const QString entryPath(const QString &sourcePath, const QString &when = QString()); - - private: - void readCache(); - void grabFrame(const QString &sourceFile, QString when); - void cleanup(); - const QPair prepFrame(const QString &sourceFile, QString when); - QHash, QString> mFrameCache; - const qint32 mMagic; - const QString mCacheSubDir; - const QString mCacheFileName; - QString mCacheDir; - QString mCacheFile; - QString mWhen; - QString mFfMpegPath; - - }; - ~SmGlobals(); static SmGlobals *instance(); QAbstractItemModel *model(const QString &which); @@ -68,7 +45,7 @@ class SmGlobals : public QObject { QHash mModels; PictureViewer2 *mPictureViewer; SeriesTreeWidget *mSeriesTreeWidget; - SmGlobals::FrameCache *mFrameCache; + FrameCache *mFrameCache; QSize mCursorSize; QHash mIcons; qint64 mDvdSize; -- cgit v1.2.3-70-g09d2