C++ / fmt (pull_request) Failing after 6s
C++ / build (pull_request) Failing after 10s
C++ / clang-tidy (pull_request) Failing after 11s
JS/TS / fmt (pull_request) Successful in 10s
JS/TS / lint (pull_request) Successful in 8s
Python / static (pull_request) Failing after 32s
Rust / build (pull_request) Successful in 52s
Python / verify (pull_request) Failing after 1m23s
Rust / fmt (pull_request) Successful in 51s
Rust / clippy (pull_request) Successful in 1m2s
34 lines
695 B
C++
34 lines
695 B
C++
#pragma once
|
|
|
|
#include <QObject>
|
|
#include <QString>
|
|
|
|
class QProcess;
|
|
|
|
namespace ZShell::wallpaper {
|
|
|
|
class VideoTranscoder : public QObject {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit VideoTranscoder(QObject* parent = nullptr);
|
|
|
|
[[nodiscard]] QString cacheDir() const;
|
|
[[nodiscard]] QString transcodeTarget(const QString& path) const;
|
|
[[nodiscard]] bool needsTranscode(const QString& path) const;
|
|
|
|
void start(const QString& src, const QString& dst);
|
|
|
|
static bool isHardwareCodec(const QString& codec);
|
|
|
|
signals:
|
|
void transcoded(const QString& dst, bool ok);
|
|
|
|
private:
|
|
[[nodiscard]] QString codecName(const QString& path) const;
|
|
|
|
QProcess* m_process = nullptr;
|
|
};
|
|
|
|
} // namespace ZShell::wallpaper
|