Loading...
Searching...
No Matches
score-plugin-media/Media/Merger/Model.hpp
1#pragma once
2#include <Process/Process.hpp>
3
4#include <Media/Merger/Metadata.hpp>
5
7#include <score/serialization/JSONVisitor.hpp>
9
10#include <verdigris>
11
12namespace Media
13{
14namespace Merger
15{
16class Model final : public Process::ProcessModel
17{
18 SCORE_SERIALIZE_FRIENDS
19 PROCESS_METADATA_IMPL(Media::Merger::Model)
20
21 W_OBJECT(Model)
22
23public:
24 enum Mode
25 {
26 Stereo,
27 Mono
28 };
29 explicit Model(
30 const TimeVal& duration, const Id<Process::ProcessModel>& id, QObject* parent);
31
32 ~Model() override;
33
34 template <typename Impl>
35 explicit Model(Impl& vis, QObject* parent)
36 : Process::ProcessModel{vis, parent}
37 {
38 vis.writeTo(*this);
39 }
40
41 int inCount() const noexcept;
42 Mode mode() const noexcept;
43
44public:
45 void inCountChanged(int arg_1) W_SIGNAL(inCountChanged, arg_1);
46 void modeChanged(Mode arg_1) W_SIGNAL(modeChanged, arg_1);
47
48public:
49 void setInCount(int s);
50 W_SLOT(setInCount);
51 void setMode(Mode s);
52 W_SLOT(setMode);
53
54private:
55 int m_inCount{};
56 Mode m_mode{};
57
58 W_PROPERTY(int, inCount READ inCount WRITE setInCount NOTIFY inCountChanged)
59 W_PROPERTY(Mode, mode READ mode WRITE setMode NOTIFY modeChanged)
60};
61}
62}
63
64Q_DECLARE_METATYPE(Media::Merger::Model::Mode)
65W_REGISTER_ARGTYPE(Media::Merger::Model::Mode)
Definition score-plugin-media/Media/Merger/Model.hpp:17
The Process class.
Definition score-lib-process/Process/Process.hpp:61
The id_base_t class.
Definition Identifier.hpp:57
Definition TimeValue.hpp:21