subtitle.h
3.26 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
/***************************************************************************
* Universidade Federal da Paraíba *
* Copyright (C) 2013 by Laboratório de Aplicações de Vídeo Digital *
* *
* Centro de Informática - UFPB - Campus I *
* João Pessoa - PB - Brasil *
* *
* Author: Leonardo de Araújo Domingues (leonardo.araujo@lavid.ufpb.br) *
* Date: Qui Out 24 22:26:35 BRT 2013 *
* *
**************************************************************************/
#ifndef SUBTITLE_H
#define SUBTITLE_H
#include <string>
#include <stdint.h>
#include <stdio.h>
#define MAX_FIELD 64
using namespace std;
namespace sndesc {
/**
* Classe que modela legendas.
* Objetos com informações de legendas
* são implementados através desta classe.
*/
class Subtitle {
public:
/**
* Construtor da classe.
* Cria uma nova instância da classe para
* representar uma legenda, as variáveis
* iniciam com valores default.
*/
Subtitle();
/**
* Construtor da clasee.
* Cria uma nova instância da classe para a representar uma legenda,
* as variáveis iniciam com valores passados por parametros.
* @param _id O numero da legenda.
* @param _sub_text O texto da legenda.
* @param _timein O tempo de inicio da legenda.
* @param _timeout O tempo de termino da legenda.
*/
Subtitle(int _id, string _sub_text, int64_t _timein, int64_t _timeout);
/**
* Destrutor da classe.
* Desaloca todo espaço de armazenamento atribuído
* para a instância do Subtitle.
*/
~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 saida.
*/
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:
/**
* O numero da legenda.
*/
int id;
/**
* O texto da legenda.
*/
string subtitle_text;
/**
* O tempo de entrada da legenda.
*/
int64_t time_in;
/**
* O tempo de saida da legenda.
*/
int64_t time_out;
};
}
#endif /* SUBTITLE_H */