serviceWindowGenerationFromSRT.h
1.37 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
#ifndef SERVICEWINDOWGENERATIONFROMSRT_H
#define SERVICEWINDOWGENERATIONFROMSRT_H
#include "serviceWindowGeneration.h"
#include <pthread.h>
#include "inputFile.h"
#include "extratorSRT.h"
#include "listenerSRT.h"
#include "monitor_pcr.h"
#include "stdint.h"
#include <vector>
#include "jthread.h"
using namespace std;
using namespace jthread;
using namespace Util;
class ServiceWindowGenerationFromSRT : public ServiceWindowGeneration, public ListenerSRT, public Thread {
private:
pthread_mutex_t *mutex_serviceSRT;
ExtratorSRT * extratorSRT;
char* path_srt;
bool finish_srt;
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);
/* Destrutor */
~ServiceWindowGenerationFromSRT();
virtual void notifySubtitle(unsigned char* subtitle, int64_t pts);
virtual void notifyEnd(int sub_size);
void notificaTradutor(unsigned char *legenda);
bool finished();
void notificaSincronizadorSemTradutor(unsigned char *legenda, int64_t pts);
void initialize();
void setPathSRT(char* path_srt);
void Run();
};
#endif /* SERVICEWINDOWGENERATIONFROMSRT_H */