serviceWindowGenerationFromRec.h 1.21 KB
#ifndef SERVICEWINDOWGENERATIONFROMREC_H
#define SERVICEWINDOWGENERATIONFROMREC_H

#include "recognize.h"
#include "recognizeListener.h"
#include "serviceWindowGeneration.h"

#define SERVICE_TYPE_REC 2
#define SERVICE_TYPE_REC_ONLY_AUDIO 5

class ServiceWindowGenerationFromRec : public ServiceWindowGeneration, public RecognizeListener, public ListenerTradutor, public Thread {

private:
	Recognize* rec;

	void addPTS(int64_t pts);
	void setSizeOfSubtitles(int sub_size);
	void setPathContents();

	void connectToUnity();
	void sendGlosa(string glosa);
	void waitVideoGeneration();

    bool isRunning();
public:
	ServiceWindowGenerationFromRec(char* pathVideo, int sublanguage, int position, int size,
		int transparency, char* id, int serviceType, char* rate);
	ServiceWindowGenerationFromRec(char* pathVideo, int sublanguage, int pos, int size,
		int transp, char* id, char* client, int serviceType);
	~ServiceWindowGenerationFromRec();

	void notifyTextRecognized(unsigned char* text, int64_t pts);
	void notifyTranslation(vector<string>* glosas);
	void notifyTranslator(unsigned char* text);
    void notifyEnd(int sentences_size);

	void initialize();
	bool isFinished();
	void Run();
};

#endif /* SERVICEWINDOWGENERATIONFROMREC_H */