LMMS
Loading...
Searching...
No Matches
RenderManager.h
Go to the documentation of this file.
1/*
2 * RenderManager.h - Provides a uniform interface for rendering the project or
3 * individual tracks for the CLI and GUI.
4 *
5 * Copyright (c) 2015 Ryan Roden-Corrent <ryan/at/rcorre.net>
6 *
7 * This file is part of LMMS - https://lmms.io
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public
11 * License as published by the Free Software Foundation; either
12 * version 2 of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public
20 * License along with this program (see COPYING); if not, write to the
21 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 * Boston, MA 02110-1301 USA.
23 *
24 */
25
26#ifndef LMMS_RENDER_MANAGER_H
27#define LMMS_RENDER_MANAGER_H
28
29#include <memory>
30
31#include "ProjectRenderer.h"
32#include "OutputSettings.h"
33
34
35namespace lmms
36{
37
38
39class RenderManager : public QObject
40{
41 Q_OBJECT
42public:
43 RenderManager(const OutputSettings& outputSettings, ProjectRenderer::ExportFileFormat fmt, QString outputPath);
44
45 ~RenderManager() override;
46
48 void renderProject();
49
51 void renderTracks();
52
53 void abortProcessing();
54
55signals:
56 void progressChanged( int );
57 void finished();
58
59private slots:
60 void renderNextTrack();
62
63private:
64 QString pathForTrack( const Track *track, int num );
65 void restoreMutedState();
66
67 void render( QString outputPath );
68
71 QString m_outputPath;
72
73 std::unique_ptr<ProjectRenderer> m_activeRenderer;
74
75 std::vector<Track*> m_tracksToRender;
76 std::vector<Track*> m_unmuted;
77} ;
78
79
80} // namespace lmms
81
82#endif // LMMS_RENDER_MANAGER_H
Definition OutputSettings.h:36
ExportFileFormat
Definition ProjectRenderer.h:43
void restoreMutedState()
Definition RenderManager.cpp:160
void abortProcessing()
Definition RenderManager.cpp:51
const OutputSettings m_outputSettings
Definition RenderManager.h:69
std::unique_ptr< ProjectRenderer > m_activeRenderer
Definition RenderManager.h:73
ProjectRenderer::ExportFileFormat m_format
Definition RenderManager.h:70
std::vector< Track * > m_tracksToRender
Definition RenderManager.h:75
void render(QString outputPath)
Definition RenderManager.cpp:135
void updateConsoleProgress()
Definition RenderManager.cpp:180
RenderManager(const OutputSettings &outputSettings, ProjectRenderer::ExportFileFormat fmt, QString outputPath)
Definition RenderManager.cpp:37
QString pathForTrack(const Track *track, int num)
Definition RenderManager.cpp:171
QString m_outputPath
Definition RenderManager.h:71
void renderTracks()
Export all unmuted tracks into individual file.
Definition RenderManager.cpp:92
std::vector< Track * > m_unmuted
Definition RenderManager.h:76
void renderProject()
Export all unmuted tracks into a single file.
Definition RenderManager.cpp:130
void progressChanged(int)
void renderNextTrack()
Definition RenderManager.cpp:62
~RenderManager() override
Definition RenderManager.cpp:46
Base-class for all tracks.
Definition Track.h:68
Definition AudioAlsa.cpp:35
fmt[0]
Definition fileio.c:2503