diff options
author | Arno <am@disconnect.de> | 2013-03-29 12:55:36 +0100 |
---|---|---|
committer | Arno <am@disconnect.de> | 2013-03-29 12:55:36 +0100 |
commit | 1bcbb69e31090cf71e913419299b52dd4d094bef (patch) | |
tree | 07fc7ed7ff38b68ed996ba398e564219e85758f5 /smglobals.h | |
parent | 110271a7db1ef05769bcfb5c936caad82bc0e498 (diff) | |
download | SheMov-1bcbb69e31090cf71e913419299b52dd4d094bef.tar.gz SheMov-1bcbb69e31090cf71e913419299b52dd4d094bef.tar.bz2 SheMov-1bcbb69e31090cf71e913419299b52dd4d094bef.zip |
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.
Diffstat (limited to 'smglobals.h')
-rw-r--r-- | smglobals.h | 27 |
1 files changed, 2 insertions, 25 deletions
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<QString, QString> prepFrame(const QString &sourceFile, QString when); - QHash<QPair<QString, QString>, 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<QString, QAbstractItemModel*> mModels; PictureViewer2 *mPictureViewer; SeriesTreeWidget *mSeriesTreeWidget; - SmGlobals::FrameCache *mFrameCache; + FrameCache *mFrameCache; QSize mCursorSize; QHash<QString, QString> mIcons; qint64 mDvdSize; |