In-line run of subs_in_out so that it gets the environment more easily.
[libdcp.git] / src / equality_options.h
1 /*
2     Copyright (C) 2012-2023 Carl Hetherington <cth@carlh.net>
3
4     This file is part of libdcp.
5
6     libdcp 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     libdcp 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 libdcp.  If not, see <http://www.gnu.org/licenses/>.
18
19     In addition, as a special exception, the copyright holders give
20     permission to link the code of portions of this program with the
21     OpenSSL library under certain conditions as described in each
22     individual source file, and distribute linked combinations
23     including the two.
24
25     You must obey the GNU General Public License in all respects
26     for all of the code used other than OpenSSL.  If you modify
27     file(s) with this exception, you may extend this exception to your
28     version of the file(s), but you are not obligated to do so.  If you
29     do not wish to do so, delete this exception statement from your
30     version.  If you delete this exception statement from all source
31     files in the program, then also delete it here.
32 */
33
34
35 /** @file  src/equality_options.h
36  *  @brief Class to describe what equality means when calling Asset::equals().
37  */
38
39
40 #ifndef LIBDCP_EQUALITY_OPTIONS_H
41 #define LIBDCP_EQUALITY_OPTIONS_H
42
43
44 namespace dcp {
45
46
47 /** @class EqualityOptions
48  *  @brief A class to describe what "equality" means for a particular test.
49  *
50  *  When comparing things, we want to be able to ignore some differences;
51  *  this class expresses those differences.
52  *
53  *  It also contains some settings for how the comparison should be done.
54  */
55 class EqualityOptions
56 {
57 public:
58         /** Construct an EqualityOptions where nothing at all can differ */
59         EqualityOptions() = default;
60
61         /** The maximum allowable mean difference in pixel value between two images */
62         double max_mean_pixel_error = 0;
63         /** The maximum standard deviation of the differences in pixel value between two images */
64         double max_std_dev_pixel_error = 0;
65         /** The maximum difference in audio sample value between two soundtracks */
66         int max_audio_sample_error = 0;
67         /** true if the &lt;AnnotationText&gt; nodes of CPLs are allowed to differ */
68         bool cpl_annotation_texts_can_differ = false;
69         /** true if the &lt;AnnotationText&gt; nodes of Reels are allowed to differ */
70         bool reel_annotation_texts_can_differ = false;
71         /** true if <Hash>es in Reels can differ */
72         bool reel_hashes_can_differ = false;
73         /** true if asset hashes can differ */
74         bool asset_hashes_can_differ = false;
75         /** true if IssueDate nodes can differ */
76         bool issue_dates_can_differ = false;
77         bool load_font_nodes_can_differ = false;
78         bool sound_assets_can_differ = false;
79         bool keep_going = false;
80         /** true to save the last pair of different image subtitles to the current working directory */
81         bool export_differing_subtitles = false;
82         /** The maximum allowable absolute difference between the vertical position of subtitles */
83         float max_subtitle_vertical_position_error = 0;
84 };
85
86
87 }
88
89
90 #endif
91