Sayonara Player
StreamRecorder.h
1/* StreamRecorder.h */
2
3/* Copyright (C) 2011-2020 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;
29class PlayManager;
30
31namespace StreamRecorder
32{
38 public QObject
39 {
40 PIMPL(StreamRecorder)
41
42 private:
43 // set metadata, add to session collector
44 bool save();
45
46 void clear();
47
48 // saves session collector into playlist, creates new session,
49 void newSession();
50
51 // check and create session path
52 QString checkTargetPath(const QString& targetPath);
53
54
55 public:
56 explicit StreamRecorder(PlayManager* playManager, QObject* parent=nullptr);
58
59 // change recording destination, create session path
60 // returns destination file
61 QString changeTrack(const MetaData& track);
62
63 // start or end a session
64 void record(bool b);
65
66 // is in a session currently
67 bool isRecording() const;
68
69
70 private slots:
71 void playstateChanged(PlayState state);
72 };
73}
74
75#endif // STREAMRECORDER_H
The MetaData class.
Definition: MetaData.h:47
Global handler for current playback state (Singleton)
Definition: PlayManager.h:36
The StreamRecorder class.
Definition: StreamRecorder.h:39