Sayonara Player
src
Components
Engine
StreamRecorder
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 "Components/PlayManager/PlayState.h"
25
#include "Utils/Pimpl.h"
26
27
#include <QObject>
28
29
class
MetaData
;
30
31
namespace
StreamRecorder
32
{
37
class
StreamRecorder
:
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
(QObject* parent=
nullptr
);
57
~
StreamRecorder
();
58
59
// change recording destination, create session path
60
// returns destination file
61
QString changeTrack(
const
MetaData
& md);
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
PlayState
PlayState
The PlayState enum.
Definition:
PlayState.h:29
StreamRecorder::StreamRecorder
The StreamRecorder class.
Definition:
StreamRecorder.h:39
MetaData
The MetaData class.
Definition:
MetaData.h:47
Generated on Wed Jan 6 2021 00:00:00 for Sayonara Player by
1.8.20