serviceWindowGenerationFromSRT.h
1.3 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
#ifndef SERVICEWINDOWGENERATIONFROMSRT_H
#define SERVICEWINDOWGENERATIONFROMSRT_H
#include "serviceWindowGeneration.h"
#include <pthread.h>
#include "inputFile.h"
#include "extratorFactory.h"
#include "listenerSRT.h"
#include "stdint.h"
#include <vector>
#include "jthread.h"
#define SRT 1
using namespace std;
using namespace jthread;
using namespace Util;
class ServiceWindowGenerationFromSRT : public ServiceWindowGeneration, public ListenerSRT, public Thread {
private:
pthread_mutex_t *mutex_serviceSRT;
ExtratorFactory *extrator_factory;
ExtratorSRT * extratorSRT;
char* path_srt;
bool finish;
public:
/* Construtor 1 - legenda e vídeo */
ServiceWindowGenerationFromSRT(char* path_video, char* path_srt, int sublanguage,
int position, int size, int transparency, char* id, int _serviceType);
/* Construtor 2 - só legenda */
ServiceWindowGenerationFromSRT(char* path_srt, int transparency, char* id, int _serviceType);
~ServiceWindowGenerationFromSRT();
virtual void notifySubtitle(unsigned char* subtitle, int64_t pts);
virtual void notifyEnd(int sub_size);
void notifyTranslator(unsigned char* subtitle);
void initialize();
bool isFinished();
void Run();
void setPathSRT(char* path_srt);
};
#endif /* SERVICEWINDOWGENERATIONFROMSRT_H */