enums.hpp 2.14 KB
Newer Older
Matteo's avatar
Matteo committed
1
/**
Matteo's avatar
Matteo committed
2
 * @file enums.hpp
Matteo's avatar
Matteo committed
3
4
5
6
 * @author Matteo Spanio (dev2@audioinnova.com)
 * @brief A collection of enums and functions to handle them.
 * @version 1.0
 * @date 2023-05-13
Matteo's avatar
Matteo committed
7
 *
Matteo's avatar
Matteo committed
8
 * @copyright Copyright (c) 2023
Matteo's avatar
Matteo committed
9
 *
Matteo's avatar
Matteo committed
10
11
12
 * This file contains a set of enums to define properties of an Irregularity.
 * The enums are:
 * - Source: the source of the Irregularity (Audio, Video or Both)
Matteo's avatar
Matteo committed
13
14
15
16
17
18
 * - IrregularityType: the type of Irregularity (Brands on tape, Splice, etc.)
 * that can be present on the tape.
 *
 * The file also contains functions to convert from enum to string and viceversa
 * (useful when saving the Irregularity to a file).
 *
Matteo's avatar
Matteo committed
19
20
21
 */
#ifndef ENUMS_H
#define ENUMS_H
Matteo's avatar
Matteo committed
22
#include <stdexcept>
Matteo's avatar
Matteo committed
23
#include <string>
Matteo's avatar
update  
Matteo committed
24

Matteo's avatar
Matteo committed
25
26
27
/**
 * @enum Source
 * @brief The source of the Irregularity (Audio, Video or Both)
Matteo's avatar
Matteo committed
28
29
30
31
 *
 * An Irregularity can be detected by the Audio analyser, the Video analyser or
 * both.
 *
Matteo's avatar
Matteo committed
32
 */
Matteo's avatar
Matteo committed
33
enum class Source { Audio, Video, Both };
Matteo's avatar
update  
Matteo committed
34

Matteo's avatar
Matteo committed
35
36
/**
 * @enum IrregularityType
Matteo's avatar
Matteo committed
37
38
39
 * @brief The type of Irregularity (Brands on tape, Splice, etc.) that can be
 * present on the tape.
 *
Matteo's avatar
Matteo committed
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
 * The types of Irregularities are:
 * - BRANDS_ON_TAPE: Brands on tape
 * - SPLICE: Splice
 * - START_OF_TAPE: Start of tape
 * - ENDS_OF_TAPE: End of tape
 * - DAMAGED_TAPE: Damaged tape
 * - DIRT: Dirt
 * - MARKS: Marks
 * - SHADOWS: Shadows
 * - WOW_AND_FLUTTER: Wow and flutter
 * - PLAY_PAUSE_STOP: Play, pause, stop
 * - SPEED: Speed
 * - EQUALIZATION: Equalization
 * - SPEED_AND_EQUALIZATION: Speed and equalization
 * - BACKWARD: Backward
Matteo's avatar
Matteo committed
55
56
57
58
59
 *
 * @note Speed, Equalization and Speed and equalization are detected only by the
 * Audio analyser, while the other Irregularities are detected only by the Video
 * analyser.
 *
Matteo's avatar
Matteo committed
60
 */
Matteo's avatar
Matteo committed
61
enum class IrregularityType {
Matteo's avatar
update  
Matteo committed
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
    BRANDS_ON_TAPE,
    SPLICE,
    START_OF_TAPE,
    ENDS_OF_TAPE,
    DAMAGED_TAPE,
    DIRT,
    MARKS,
    SHADOWS,
    WOW_AND_FLUTTER,
    PLAY_PAUSE_STOP,
    SPEED,
    EQUALIZATION,
    SPEED_AND_EQUALIZATION,
    BACKWARD
};

std::string sourceToString(Source source);
Source sourceFromString(std::string source);
std::string irregularityTypeToString(IrregularityType type);
IrregularityType irregularityTypeFromString(std::string type);
Matteo's avatar
Matteo committed
82
#endif  // ENUMS_H