serviceWindowGenerationFromSRT.h
1.36 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
#ifndef SERVICEWINDOWGENERATIONFROMSRT_H
#define SERVICEWINDOWGENERATIONFROMSRT_H
#include "listenerSRT.h"
#include "extratorFactory.h"
#include "serviceWindowGeneration.h"
#define SERVICE_TYPE_SRT 1
#define SERVICE_TYPE_SRT_ONLY 4
class ServiceWindowGenerationFromSRT : public ServiceWindowGeneration, public ListenerSRT, public ListenerTradutor, public Thread {
private:
ExtratorFactory* extrator_factory;
ExtratorSRT* extratorSRT;
char* path_srt;
void addPTS(int64_t pts);
void setSizeOfSubtitles(int sub_size);
void setPathContents();
void connectToUnity();
void sendGlosa(string glosa);
void waitVideoGeneration();
bool isRunning();
public:
//construtor de serviço de video e legenda
ServiceWindowGenerationFromSRT(char* pathVideo, char* pathSRT, int sublanguage, int pos,
int size, int transp, char* id, char* client, int serviceType);
//construtor de serviço de somente legenda
ServiceWindowGenerationFromSRT(char* pathSRT, int transparency, char* id, char* client, int serviceType);
~ServiceWindowGenerationFromSRT();
void notifySubtitle(unsigned char* subtitle, int64_t pts);
void notifyTranslation(vector<string>* glosas);
void notifyTranslator(unsigned char* text);
void notifyEnd(int sub_size);
void initialize();
bool isFinished();
void Run();
};
#endif /* SERVICEWINDOWGENERATIONFROMSRT_H_ */