Debian Codegraph @

src/modes.hpp

raw
1 /*
2 * This file is part of Bino, a 3D video player.
3 *
4 * Copyright (C) 2022, 2023, 2024
5 * Martin Lambers <[email protected]>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #pragma once
22
23 #include <QString>
24
25
26 /* Input mode: Is this 2D or 3D, and in the latter case, how are the
27 * left and right view arranged in one frame? */
28 enum InputMode {
29 Input_Unknown = 0, // unknown; needs to be guessed
30 Input_Mono = 1, // monoscopic video (2D)
31 Input_Top_Bottom = 2, // stereoscopic video, left eye top, right eye bottom
32 Input_Top_Bottom_Half = 3, // stereoscopic video, left eye top, right eye bottom, both half height
33 Input_Bottom_Top = 4, // stereoscopic video, left eye bottom, right eye top
34 Input_Bottom_Top_Half = 5, // stereoscopic video, left eye bottom, right eye top, both half height
35 Input_Left_Right = 6, // stereoscopic video, left eye left, right eye right
36 Input_Left_Right_Half = 7, // stereoscopic video, left eye left, right eye right, both half width
37 Input_Right_Left = 8, // stereoscopic video, left eye right, right eye left
38 Input_Right_Left_Half = 9, // stereoscopic video, left eye right, right eye left, both half width
39 Input_Alternating_LR = 10, // stereoscopic video, alternating frames, left first
40 Input_Alternating_RL = 11, // stereoscopic video, alternating frames, right first
41 };
42
43 const char* inputModeToString(InputMode mode);
44 QString inputModeToStringUI(InputMode mode);
45 InputMode inputModeFromString(const QString& s, bool* ok = nullptr);
46
47 /* Surround mode (180° / 360°) */
48 enum SurroundMode {
49 Surround_Unknown = 0, // unknown; needs to be guessed
50 Surround_Off = 1, // conventional video
51 Surround_180 = 2, // 180° video
52 Surround_360 = 3, // 360° video
53 };
54
55 const char* surroundModeToString(SurroundMode mode);
56 QString surroundModeToStringUI(SurroundMode mode);
57 SurroundMode surroundModeFromString(const QString& s, bool* ok = nullptr);
58
59 /* Output mode: Is the output 2D or 3D, and in the latter case, how should
60 * the left and right view be arranged on screen? */
61 // Note that this is mirrored in shader-display-frag.glsl!
62 enum OutputMode {
63 Output_Left = 0,
64 Output_Right = 1,
65 Output_OpenGL_Stereo = 2,
66 Output_Alternating = 3,
67 Output_HDMI_Frame_Pack = 4,
68 Output_Left_Right = 5,
69 Output_Left_Right_Half = 6,
70 Output_Right_Left = 7,
71 Output_Right_Left_Half = 8,
72 Output_Top_Bottom = 9,
73 Output_Top_Bottom_Half = 10,
74 Output_Bottom_Top = 11,
75 Output_Bottom_Top_Half = 12,
76 Output_Even_Odd_Rows = 13,
77 Output_Even_Odd_Columns = 14,
78 Output_Checkerboard = 15,
79 Output_Red_Cyan_Dubois = 16,
80 Output_Red_Cyan_FullColor = 17,
81 Output_Red_Cyan_HalfColor = 18,
82 Output_Red_Cyan_Monochrome = 19,
83 Output_Green_Magenta_Dubois = 20,
84 Output_Green_Magenta_FullColor = 21,
85 Output_Green_Magenta_HalfColor = 22,
86 Output_Green_Magenta_Monochrome = 23,
87 Output_Amber_Blue_Dubois = 24,
88 Output_Amber_Blue_FullColor = 25,
89 Output_Amber_Blue_HalfColor = 26,
90 Output_Amber_Blue_Monochrome = 27,
91 Output_Red_Green_Monochrome = 28,
92 Output_Red_Blue_Monochrome = 29
93 };
94
95 const char* outputModeToString(OutputMode mode);
96 QString outputModeToStringUI(OutputMode mode);
97 OutputMode outputModeFromString(const QString& s, bool* ok = nullptr);
98
99 /* Loop mode for the playlist */
100
101 enum LoopMode
102 {
103 Loop_Off,
104 Loop_One,
105 Loop_All
106 };
107
108 const char* loopModeToString(LoopMode mode);
109 QString loopModeToStringUI(LoopMode mode);
110 LoopMode loopModeFromString(const QString& s, bool* ok = nullptr);
111
112 /* Wait mode for the playlist */
113
114 enum WaitMode
115 {
116 Wait_Off,
117 Wait_On
118 };
119
120 const char* waitModeToString(WaitMode mode);
121 QString waitModeToStringUI(WaitMode mode);
122 WaitMode waitModeFromString(const QString& s, bool* ok = nullptr);