enums.h 2.11 KB
Newer Older
Matteo's avatar
Matteo committed
1
2
3
4
5
6
/**
 * @file enums.h
 * @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 <string>
Matteo's avatar
update  
Matteo committed
23

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

Matteo's avatar
Matteo committed
34
35
/**
 * @enum IrregularityType
Matteo's avatar
Matteo committed
36
37
38
 * @brief The type of Irregularity (Brands on tape, Splice, etc.) that can be
 * present on the tape.
 *
Matteo's avatar
Matteo committed
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
 * 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
54
55
56
57
58
 *
 * @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
59
 */
Matteo's avatar
update  
Matteo committed
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
enum IrregularityType {
    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
81
#endif  // ENUMS_H