subtitle.h
2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/**
* \file subtitle.h
*
* \author Leonardo de Araújo Domingues <leonardo.araujo@lavid.ufpb.br>
* \date 24/10/2015
*/
#ifndef SUBTITLE_H
#define SUBTITLE_H
#include <string>
#include <stdint.h>
#include <stdio.h>
#define MAX_FIELD 64
using namespace std;
namespace sndesc {
/** \brief Representação abstrata de legendas.
*
* Objetos com informações de legendas
* são implementados através desta classe.
* \headerfile extrator/src/include/subtitle.h
*/
class Subtitle {
public:
/** Construtor */
Subtitle();
/** Construtor.
*
* \param _id Número da legenda.
* \param _sub_text Texto da legenda.
* \param _timein Tempo de inicio da legenda.
* \param _timeout Tempo de termino da legenda.
*/
Subtitle(int _id, string _sub_text, int64_t _timein, int64_t _timeout);
/** Destrutor */
~Subtitle();
/** Seta o id da legenda.
*
* \param _id O numero da legenda.
*/
void setID(int _id);
/** Seta o texto da legenda.
*
* \param _subtext O texto da legenda.
*/
void setSubtitleText(std::string _subtext);
/** Seta o tempo de inicio da legenda.
*
* \param _timein O tempo de entrada da legenda.
*/
void setTimeIn(int64_t _timein);
/** Seta o tempo de termino da legenda.
*
* \param _timeout O tempo de saida da legenda.
*/
void setTimeOut(int64_t _timeout);
/** Obtém o texto da legenda.
*
* \return O texto da legenda.
*/
std::string getSubtitleText();
/** Obtém o tempo de inicio da legenda.
*
* \return O tempo de inicio.
*/
int64_t getTimeIn();
/** Obtém o tempo de termino da legenda.
*
* \return O tempo de termino.
*/
int64_t getTimeOut();
/** Obtém o id da legenda.
*
* \return O numero da legenda.
*/
int getID();
/** Converte os dados de uma legenda em uma string.
*
* \return Uma string com a representação da legenda.
*/
string toString();
private:
int id;
int64_t time_in;
int64_t time_out;
string subtitle_text;
};
}
#endif /* SUBTITLE_H */