1 /*
2    mkvextract -- extract tracks from Matroska files into other files
3 
4    Distributed under the GPL v2
5    see the file COPYING for details
6    or visit https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
7 
8    Written by Moritz Bunkus <moritz@bunkus.org>.
9 */
10 
11 #pragma once
12 
13 #include "common/common_pch.h"
14 
15 #include "common/bcp47.h"
16 #include "extract/track_spec.h"
17 
18 class options_c {
19 public:
20   enum extraction_mode_e {
21     em_unknown,
22     em_attachments,
23     em_chapters,
24     em_cuesheet,
25     em_tags,
26     em_timestamps_v2,
27     em_tracks,
28     em_cues,
29   };
30 
31   class mode_options_c {
32   public:
33     bool m_simple_chapter_format;
34     mtx::bcp47::language_c m_simple_chapter_language;
35     extraction_mode_e m_extraction_mode;
36 
37     std::vector<track_spec_t> m_tracks;
38 
39     std::string m_output_file_name;
40 
41     mode_options_c();
42 
43     void dump(std::string const &prefix) const;
44   };
45 
46   std::string m_file_name;
47   kax_analyzer_c::parse_mode_e m_parse_mode;
48 
49   std::vector<mode_options_c> m_modes;
50 
51 public:
52   options_c();
53 
54   void dump() const;
55   std::vector<mode_options_c>::iterator get_options_for_mode(extraction_mode_e mode);
56   void merge_tracks_and_timestamps_targets();
57 };
58