enums.h 2.1 KB
Newer Older
Matteo's avatar
Matteo committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/**
 * @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
 * 
 * @copyright Copyright (c) 2023
 * 
 * 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)
 * - 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).
 * 
 */
#ifndef ENUMS_H
#define ENUMS_H
Matteo's avatar
update  
Matteo committed
20
21
#include<string>

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

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