Supporters update.
[dcpomatic.git] / src / lib / export_config.h
1 /*
2     Copyright (C) 2022 Carl Hetherington <cth@carlh.net>
3
4     This file is part of DCP-o-matic.
5
6     DCP-o-matic is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation; either version 2 of the License, or
9     (at your option) any later version.
10
11     DCP-o-matic is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15
16     You should have received a copy of the GNU General Public License
17     along with DCP-o-matic.  If not, see <http://www.gnu.org/licenses/>.
18
19 */
20
21
22 #ifndef DCPOMATIC_EXPORT_CONFIG_H
23 #define DCPOMATIC_EXPORT_CONFIG_H
24
25
26 #include "ffmpeg_file_encoder.h"
27 #include <libcxml/cxml.h>
28
29
30 class Config;
31
32
33 class ExportConfig
34 {
35 public:
36         ExportConfig(Config* parent);
37
38         void set_defaults();
39         void read(cxml::ConstNodePtr node);
40         void write(xmlpp::Element* node) const;
41
42         ExportFormat format() const {
43                 return _format;
44         }
45
46         bool mixdown_to_stereo() const {
47                 return _mixdown_to_stereo;
48         }
49
50         bool split_reels() const {
51                 return _split_reels;
52         }
53
54         bool split_streams() const {
55                 return _split_streams;
56         }
57
58         int x264_crf() const {
59                 return _x264_crf;
60         }
61
62         void set_format(ExportFormat format);
63         void set_mixdown_to_stereo(bool mixdown);
64         void set_split_reels(bool split);
65         void set_split_streams(bool split);
66         void set_x264_crf(int crf);
67
68 private:
69         Config* _config;
70         ExportFormat _format;
71         bool _mixdown_to_stereo;
72         bool _split_reels;
73         bool _split_streams;
74         int _x264_crf;
75 };
76
77
78 #endif
79