Supporters update.
[dcpomatic.git] / src / lib / create_cli.h
1 /*
2     Copyright (C) 2019-2021 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 #include "video_frame_type.h"
23 #include <dcp/types.h>
24 #include <boost/optional.hpp>
25 #include <boost/filesystem.hpp>
26 #include <vector>
27
28
29 class DCPContentType;
30 class Film;
31 class Ratio;
32
33 struct create_cli_test;
34
35
36 class CreateCLI
37 {
38 public:
39         CreateCLI (int argc, char* argv[]);
40
41         struct Content {
42                 boost::filesystem::path path;
43                 VideoFrameType frame_type;
44                 boost::optional<dcp::Channel> channel;
45                 boost::optional<float> gain;
46                 boost::optional<boost::filesystem::path> kdm;
47                 boost::optional<std::string> cpl;
48         };
49
50         bool version;
51         boost::optional<int> dcp_frame_rate;
52         boost::optional<int> still_length;
53         boost::optional<boost::filesystem::path> config_dir;
54         boost::optional<boost::filesystem::path> output_dir;
55         boost::optional<std::string> error;
56         std::vector<Content> content;
57
58         std::shared_ptr<Film> make_film() const;
59
60 private:
61         friend struct ::create_cli_test;
62
63         boost::optional<std::string> _template_name;
64         std::string _name;
65         Ratio const* _container_ratio = nullptr;
66         bool _no_encrypt = false;
67         bool _encrypt = false;
68         bool _twod = false;
69         bool _threed = false;
70         DCPContentType const* _dcp_content_type = nullptr;
71         boost::optional<dcp::Standard> _standard;
72         bool _no_use_isdcf_name = false;
73         bool _twok = false;
74         bool _fourk = false;
75         boost::optional<int> _j2k_bandwidth;
76
77         static std::string _help;
78 };