#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 setPathLibras(); //void setBackground(); void connectToUnity(); void sendGlosa(string glosa); void waitVideoGeneration(); void transcodeVideoToMp4(); void createThumbnail(); 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* glosas); void notifyTranslator(unsigned char* text); //void notifyEndOfSynchronization(); void notifyEnd(int sub_size); void initialize(); bool isFinished(); void Run(); }; #endif /* SERVICEWINDOWGENERATIONFROMSRT_H_ */