1 /*
2    mkvmerge -- utility for splicing together matroska files
3    from component media subtypes
4 
5    Distributed under the GPL v2
6    see the file COPYING for details
7    or visit https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
8 
9    some hacks that the author might want to use
10 
11    Written by Moritz Bunkus <moritz@bunkus.org>.
12 */
13 
14 #pragma once
15 
16 #include "common/common_pch.h"
17 
18 namespace mtx::hacks {
19 
20 // Some hacks that are configurable via command line but which should ONLY!
21 // be used by the author.
22 
23 namespace {
24 constexpr unsigned int SPACE_AFTER_CHAPTERS          =  0;
25 constexpr unsigned int NO_CHAPTERS_IN_META_SEEK      =  1;
26 constexpr unsigned int NO_META_SEEK                  =  2;
27 constexpr unsigned int LACING_XIPH                   =  3;
28 constexpr unsigned int LACING_EBML                   =  4;
29 constexpr unsigned int NATIVE_MPEG4                  =  5;
30 constexpr unsigned int NO_VARIABLE_DATA              =  6;
31 constexpr unsigned int FORCE_PASSTHROUGH_PACKETIZER  =  7;
32 constexpr unsigned int WRITE_HEADERS_TWICE           =  8;
33 constexpr unsigned int ALLOW_AVC_IN_VFW_MODE         =  9;
34 constexpr unsigned int KEEP_BITSTREAM_AR_INFO        = 10;
35 constexpr unsigned int NO_SIMPLE_BLOCKS              = 11;
36 constexpr unsigned int USE_CODEC_STATE_ONLY          = 12;
37 constexpr unsigned int ENABLE_TIMESTAMP_WARNING      = 13;
38 constexpr unsigned int REMOVE_BITSTREAM_AR_INFO      = 14;
39 constexpr unsigned int VOBSUB_SUBPIC_STOP_CMDS       = 15;
40 constexpr unsigned int NO_CUE_DURATION               = 16;
41 constexpr unsigned int NO_CUE_RELATIVE_POSITION      = 17;
42 constexpr unsigned int NO_DELAY_FOR_GARBAGE_IN_AVI   = 18;
43 constexpr unsigned int KEEP_LAST_CHAPTER_IN_MPLS     = 19;
44 constexpr unsigned int KEEP_TRACK_STATISTICS_TAGS    = 20;
45 constexpr unsigned int ALL_I_SLICES_ARE_KEY_FRAMES   = 21;
46 constexpr unsigned int APPEND_AND_SPLIT_FLAC         = 22;
47 constexpr unsigned int DONT_NORMALIZE_PARAMETER_SETS = 23;
48 constexpr unsigned int MAX_IDX                       = 23;
49 }
50 
51 struct hack_t {
52   std::string name;
53   std::vector<std::string> description;
54 
hack_thack_t55   hack_t(std::string const &p_name, std::vector<std::string> const &p_description)
56     : name{p_name}
57     , description{p_description}
58   {
59   }
60 
61   hack_t(hack_t const &) = default;
62   hack_t(hack_t &&) = default;
63 
64   hack_t &operator =(hack_t const &) = default;
65   hack_t &operator =(hack_t &&) = default;
66 };
67 
68 void engage(const std::string &hacks);
69 void engage(unsigned int id);
70 bool is_engaged(unsigned int id);
71 void init();
72 std::vector<hack_t> get_list();
73 
74 }
75