File indexing completed on 2024-04-28 15:39:47

0001 // SPDX-FileCopyrightText: 2012-2022 Jesper K. Pedersen <blackie@kde.org>
0002 //
0003 // SPDX-License-Identifier: GPL-2.0-or-later
0004 
0005 #ifndef READVIDEOLENGTHJOB_H
0006 #define READVIDEOLENGTHJOB_H
0007 
0008 #include <BackgroundTaskManager/JobInterface.h>
0009 #include <kpabase/FileName.h>
0010 
0011 namespace BackgroundJobs
0012 {
0013 
0014 /**
0015   \brief Read the length of a video file and writes that to the database
0016   \see \ref videothumbnails
0017 */
0018 class ReadVideoLengthJob : public BackgroundTaskManager::JobInterface
0019 {
0020     Q_OBJECT
0021 
0022 public:
0023     ReadVideoLengthJob(const DB::FileName &fileName, BackgroundTaskManager::Priority priority);
0024     void execute() override;
0025     QString title() const override;
0026     QString details() const override;
0027 
0028 private Q_SLOTS:
0029     void lengthFound(int);
0030     void unableToDetermineLength();
0031 
0032 private:
0033     DB::FileName m_fileName;
0034 };
0035 
0036 }
0037 #endif // READVIDEOLENGTHJOB_H
0038 // vi:expandtab:tabstop=4 shiftwidth=4: