Sayonara Player
Loading...
Searching...
No Matches
StreamRecorder.h
1/* StreamRecorder.h */
2
3/* Copyright (C) 2011-2024 Michael Lugmair (Lucio Carreras)
4 *
5 * This file is part of sayonara player
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef STREAMRECORDER_H
22#define STREAMRECORDER_H
23
24#include "Utils/Pimpl.h"
25
26#include <QObject>
27
28class MetaData;
29
30namespace PipelineExtensions
31{
32 class StreamRecordable;
33}
34
35namespace Tagging
36{
37 class TagWriter;
38}
39
40namespace Util
41{
42 class FileSystem;
43}
44
45namespace StreamRecorder
46{
48 public QObject
49 {
50 PIMPL(StreamRecorder)
51
52 public:
53 StreamRecorder(std::shared_ptr<Util::FileSystem> fileSystem,
54 std::shared_ptr<Tagging::TagWriter> tagWriter,
55 std::shared_ptr<PipelineExtensions::StreamRecordable> streamRecordable,
56 QObject* parent = nullptr);
57 ~StreamRecorder() override;
58
59 void startNewSession(const MetaData& track);
60 void updateMetadata(const MetaData& track);
61 void endSession();
62 [[nodiscard]] bool isRecording() const;
63
64 private: // NOLINT(readability-redundant-access-specifiers)
65 bool save();
66 void setCurrentTrack(const MetaData& track);
67 };
68}
69
70#endif // STREAMRECORDER_H
The MetaData class.
Definition MetaData.h:47
Definition StreamRecorder.h:49
The GUI_TagEdit class.
Definition Engine.h:33
Helper functions.
Definition MetaTypeRegistry.h:25