Krita Source Code Documentation
Loading...
Searching...
No Matches
KisPlaybackEngineQT.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 SPDX-FileCopyrightText: 2022 Emmet O'Neill <emmetoneill.pdx@gmail.com>
3 SPDX-FileCopyrightText: 2022 Eoin O'Neill <eoinoneill1991@gmail.com>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#ifndef KISPLAYBACKENGINEQT_H
9#define KISPLAYBACKENGINEQT_H
10
11#include "KisPlaybackEngine.h"
12
13#include <kritaui_export.h>
14
15
17#include <boost/optional.hpp>
18
19
27class KRITAUI_EXPORT KisPlaybackEngineQT : public KisPlaybackEngine
28{
29 Q_OBJECT
30
31public:
32 explicit KisPlaybackEngineQT(QObject *parent = nullptr);
34
35 void seek(int frameIndex, SeekOptionFlags flags = SEEK_FINALIZE | SEEK_PUSH_AUDIO) override;
36
37 void setMute(bool) override {}
38 bool isMute() override { return true; }
39
40 bool supportsAudio() override {return false;}
41 bool supportsVariablePlaybackSpeed() override { return true; }
42
43 void setDropFramesMode(bool value) override;
44
45 boost::optional<int64_t> activeFramesPerSecond() const;
46
47 PlaybackStats playbackStatistics() const override;
48
49protected Q_SLOTS:
56 void throttledDriverCallback();
57
58
59protected:
60 void setCanvas(KoCanvasBase* canvas) override;
61 void unsetCanvas() override;
62
63private:
64 struct Private;
65 QScopedPointer<Private> m_d;
66};
67
68#endif // KISPLAYBACKENGINEQT_H
float value(const T *src, size_t ch)
@ SEEK_PUSH_AUDIO
@ SEEK_FINALIZE
The KisPlaybackEngineQT class is an implementation of KisPlaybackEngine that drives animation playbac...
QScopedPointer< Private > m_d
void setMute(bool) override
bool supportsAudio() override
bool supportsVariablePlaybackSpeed() override
Krita's base animation playback engine for producing image frame changes and associated audio.
virtual void setDropFramesMode(bool value)
virtual void unsetCanvas() override
virtual PlaybackStats playbackStatistics() const =0
virtual void seek(int frameIndex, SeekOptionFlags options=SEEK_FINALIZE|SEEK_PUSH_AUDIO)=0
virtual void setCanvas(KoCanvasBase *p_canvas) override