Commit cdd4f2d9f75af9861a4bc8262e5e19b8097cbffc

Authored by Wesnydy Ribeiro
1 parent 30c5aa69
Exists in master and in 1 other branch devel

Adicionado mais log de debug

extrator/src/extratorFactory.cpp
@@ -4,8 +4,10 @@ Extrator* ExtratorFactory::getExtrator(Extrator::ExtratorType extrator_type) { @@ -4,8 +4,10 @@ Extrator* ExtratorFactory::getExtrator(Extrator::ExtratorType extrator_type) {
4 extrator = extrator_type; 4 extrator = extrator_type;
5 switch(extrator){ 5 switch(extrator){
6 case Extrator::SRT: 6 case Extrator::SRT:
  7 + PRINTL(util::_DEBUG, "ExtratorSRT selected!\n");
7 return new ExtratorSRT(); 8 return new ExtratorSRT();
8 case Extrator::TXT: 9 case Extrator::TXT:
  10 + PRINTL(util::_DEBUG, "ExtratorTXT selected!\n");
9 return new ExtratorTXT(); 11 return new ExtratorTXT();
10 } 12 }
11 } 13 }
12 \ No newline at end of file 14 \ No newline at end of file
extrator/src/extratorSRT.cpp
@@ -5,7 +5,7 @@ ExtratorSRT::ExtratorSRT(){ @@ -5,7 +5,7 @@ ExtratorSRT::ExtratorSRT(){
5 finish = false; 5 finish = false;
6 seek_pos = 0; 6 seek_pos = 0;
7 hasNextSub = true; 7 hasNextSub = true;
8 - PRINTL(util::_DEBUG, "Done!\n"); 8 + PRINTL(util::_DEBUG, "ExtratorSTR Done!\n");
9 } 9 }
10 10
11 ExtratorSRT::~ExtratorSRT(){ 11 ExtratorSRT::~ExtratorSRT(){
extrator/src/extratorTXT.cpp
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 ExtratorTXT::ExtratorTXT(){ 14 ExtratorTXT::ExtratorTXT(){
15 listeners = new list<ListenerTXT*>(); 15 listeners = new list<ListenerTXT*>();
16 finish = false; 16 finish = false;
17 - PRINTL(util::_DEBUG, "Done!\n"); 17 + PRINTL(util::_DEBUG, "ExtratorTXT Done!\n");
18 } 18 }
19 19
20 ExtratorTXT::~ExtratorTXT(){ 20 ExtratorTXT::~ExtratorTXT(){
@@ -84,8 +84,7 @@ void ExtratorTXT::Run(){ @@ -84,8 +84,7 @@ void ExtratorTXT::Run(){
84 try{ 84 try{
85 line = bff_reader->readLine(); 85 line = bff_reader->readLine();
86 if (line.length() > 0){ 86 if (line.length() > 0){
87 - notifyListeners((unsigned char*) line.c_str());  
88 - //cout << " . "; 87 + notifyListeners((unsigned char*) line.c_str());
89 line_index++; 88 line_index++;
90 } 89 }
91 }catch (EOFException &ex){ 90 }catch (EOFException &ex){
mixer/src/Mixer.cpp
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 /* Construtores e destrutores...*/ 9 /* Construtores e destrutores...*/
10 Mixer::Mixer() { 10 Mixer::Mixer() {
11 this->setNumThreads("1"); 11 this->setNumThreads("1");
12 - PRINTL(util::_DEBUG, "Done!\n"); 12 + PRINTL(util::_DEBUG, "Mixer Done!\n");
13 } 13 }
14 Mixer::Mixer(string mainVideo, string secondaryVideo) { 14 Mixer::Mixer(string mainVideo, string secondaryVideo) {
15 this->setMainVideo(mainVideo); 15 this->setMainVideo(mainVideo);
recognize/src/recognize.cpp
@@ -11,7 +11,7 @@ Recognize::Recognize(char* _pathVideo, char* _id) { @@ -11,7 +11,7 @@ Recognize::Recognize(char* _pathVideo, char* _id) {
11 ss << _id; 11 ss << _id;
12 ss >> id; 12 ss >> id;
13 confidenceRate=CONFIDENCE_RATE; 13 confidenceRate=CONFIDENCE_RATE;
14 - PRINTL(util::_DEBUG, "Done!\n"); 14 + PRINTL(util::_DEBUG, "Recognize Done!\n");
15 } 15 }
16 16
17 Recognize::Recognize(char* _pathVideo, char* _id, char* rate) { 17 Recognize::Recognize(char* _pathVideo, char* _id, char* rate) {
@@ -27,7 +27,7 @@ Recognize::Recognize(char* _pathVideo, char* _id, char* rate) { @@ -27,7 +27,7 @@ Recognize::Recognize(char* _pathVideo, char* _id, char* rate) {
27 istringstream(rate) >> confidenceRate; 27 istringstream(rate) >> confidenceRate;
28 if (confidenceRate == 0) 28 if (confidenceRate == 0)
29 confidenceRate=CONFIDENCE_RATE; 29 confidenceRate=CONFIDENCE_RATE;
30 - PRINTL(util::_DEBUG, "Done!\n"); 30 + PRINTL(util::_DEBUG, "Recognize Done!\n");
31 } 31 }
32 32
33 Recognize::Recognize(char* _pathVideo, int _inputType, char* _id) { 33 Recognize::Recognize(char* _pathVideo, int _inputType, char* _id) {
@@ -38,7 +38,7 @@ Recognize::Recognize(char* _pathVideo, int _inputType, char* _id) { @@ -38,7 +38,7 @@ Recognize::Recognize(char* _pathVideo, int _inputType, char* _id) {
38 frequency = FREQUENCY_PATTERN; 38 frequency = FREQUENCY_PATTERN;
39 sizeBlocs = BLOCS_PATTERN; 39 sizeBlocs = BLOCS_PATTERN;
40 id = _id; 40 id = _id;
41 - PRINTL(util::_DEBUG, "Done!\n"); 41 + PRINTL(util::_DEBUG, "Recognize Done!\n");
42 } 42 }
43 43
44 Recognize::~Recognize() { 44 Recognize::~Recognize() {
renderer/src/renderer.cpp
@@ -9,7 +9,7 @@ Renderer::Renderer(char* videoPath, char* user_id) { @@ -9,7 +9,7 @@ Renderer::Renderer(char* videoPath, char* user_id) {
9 core_socket = new StreamSocket(); 9 core_socket = new StreamSocket();
10 listeners = new list<ListenerRenderer*>(); 10 listeners = new list<ListenerRenderer*>();
11 serverInitialize(); 11 serverInitialize();
12 - PRINTL(util::_DEBUG, "Done!\n"); 12 + PRINTL(util::_DEBUG, "Renderer Done!\n");
13 } 13 }
14 14
15 Renderer::~Renderer() { 15 Renderer::~Renderer() {
@@ -79,6 +79,7 @@ void Renderer::connectToUnity() { @@ -79,6 +79,7 @@ void Renderer::connectToUnity() {
79 try{ 79 try{
80 static InetAddress* addr = InetAddress::createByName(HOST); 80 static InetAddress* addr = InetAddress::createByName(HOST);
81 while(!core_socket->isConnected()){ 81 while(!core_socket->isConnected()){
  82 + PRINTL(util::_DEBUG, "Conectando ao Unity...\n");
82 core_socket->connect(addr, PORTNO); 83 core_socket->connect(addr, PORTNO);
83 sleep(1); 84 sleep(1);
84 } 85 }
@@ -108,6 +109,7 @@ void Renderer::addListener(ListenerRenderer* listener) { @@ -108,6 +109,7 @@ void Renderer::addListener(ListenerRenderer* listener) {
108 } 109 }
109 110
110 void Renderer::notifyListeners() { 111 void Renderer::notifyListeners() {
  112 + PRINTL(util::_DEBUG, "Renderização finalizada!\n");
111 for (list<ListenerRenderer*>::iterator i = listeners->begin(); i != listeners->end(); i++) { 113 for (list<ListenerRenderer*>::iterator i = listeners->begin(); i != listeners->end(); i++) {
112 (*i)->notifyEndOfRenderization(); 114 (*i)->notifyEndOfRenderization();
113 } 115 }
servico/src/serviceTester.cpp
@@ -15,7 +15,7 @@ ServiceTester::ServiceTester(int _position, int _size, int _background) { @@ -15,7 +15,7 @@ ServiceTester::ServiceTester(int _position, int _size, int _background) {
15 msgErr = ""; 15 msgErr = "";
16 finish = false; 16 finish = false;
17 fail = false; 17 fail = false;
18 - PRINTL(util::_DEBUG, "Done!\n"); 18 + PRINTL(util::_DEBUG, "ServiceTester Done!\n");
19 } 19 }
20 20
21 ServiceTester::~ServiceTester() { 21 ServiceTester::~ServiceTester() {
@@ -23,7 +23,7 @@ ServiceTester::~ServiceTester() { @@ -23,7 +23,7 @@ ServiceTester::~ServiceTester() {
23 } 23 }
24 24
25 void ServiceTester::checkServiceSRT() { 25 void ServiceTester::checkServiceSRT() {
26 - 26 + PRINTL(util::_DEBUG, "Checando extração de legenda...\n");
27 setPathContents(); 27 setPathContents();
28 28
29 service_srt = new ServiceWindowGenerationFromSRT((char*)VID_FILE, (char*)SRT_FILE, 1, position, 29 service_srt = new ServiceWindowGenerationFromSRT((char*)VID_FILE, (char*)SRT_FILE, 1, position,
@@ -50,7 +50,7 @@ void ServiceTester::checkServiceSRT() { @@ -50,7 +50,7 @@ void ServiceTester::checkServiceSRT() {
50 } 50 }
51 51
52 void ServiceTester::checkServiceRec() { 52 void ServiceTester::checkServiceRec() {
53 - 53 + PRINTL(util::_DEBUG, "Checando reconhecimento...\n");
54 setPathContents(); 54 setPathContents();
55 55
56 service_rec = new ServiceWindowGenerationFromRec((char*)REC_FILE, 0, 0, 56 service_rec = new ServiceWindowGenerationFromRec((char*)REC_FILE, 0, 0,
@@ -75,7 +75,7 @@ void ServiceTester::checkServiceRec() { @@ -75,7 +75,7 @@ void ServiceTester::checkServiceRec() {
75 deleteFiles(); 75 deleteFiles();
76 } 76 }
77 void ServiceTester::checkServiceText() { 77 void ServiceTester::checkServiceText() {
78 - 78 + PRINTL(util::_DEBUG, "Checando extração de texto...\n");
79 setPathContents(); 79 setPathContents();
80 80
81 service_text = new ServiceWindowGenerationFromText((char*)TXT_FILE, 1, background, 81 service_text = new ServiceWindowGenerationFromText((char*)TXT_FILE, 1, background,
servico/src/serviceWindowGenerationFromRec.cpp
@@ -17,7 +17,7 @@ ServiceWindowGenerationFromRec::ServiceWindowGenerationFromRec( @@ -17,7 +17,7 @@ ServiceWindowGenerationFromRec::ServiceWindowGenerationFromRec(
17 tradutor = new TradutorPortGlosa(); 17 tradutor = new TradutorPortGlosa();
18 running = true; 18 running = true;
19 finish = false; 19 finish = false;
20 - PRINTL(util::_DEBUG, "Done!\n"); 20 + PRINTL(util::_DEBUG, "Service Rec Done!\n");
21 } 21 }
22 22
23 ServiceWindowGenerationFromRec::ServiceWindowGenerationFromRec( 23 ServiceWindowGenerationFromRec::ServiceWindowGenerationFromRec(
@@ -42,7 +42,7 @@ ServiceWindowGenerationFromRec::ServiceWindowGenerationFromRec( @@ -42,7 +42,7 @@ ServiceWindowGenerationFromRec::ServiceWindowGenerationFromRec(
42 } 42 }
43 running = true; 43 running = true;
44 finish = false; 44 finish = false;
45 - PRINTL(util::_DEBUG, "Done!\n"); 45 + PRINTL(util::_DEBUG, "Service Rec Done!\n");
46 } 46 }
47 47
48 ServiceWindowGenerationFromRec::~ServiceWindowGenerationFromRec(){ 48 ServiceWindowGenerationFromRec::~ServiceWindowGenerationFromRec(){
servico/src/serviceWindowGenerationFromSRT.cpp
@@ -23,7 +23,7 @@ ServiceWindowGenerationFromSRT::ServiceWindowGenerationFromSRT(char* pathVideo, @@ -23,7 +23,7 @@ ServiceWindowGenerationFromSRT::ServiceWindowGenerationFromSRT(char* pathVideo,
23 } 23 }
24 running = true; 24 running = true;
25 finish = false; 25 finish = false;
26 - PRINTL(util::_DEBUG, "Done!\n"); 26 + PRINTL(util::_DEBUG, "Service SRT Done!\n");
27 } 27 }
28 28
29 ServiceWindowGenerationFromSRT::ServiceWindowGenerationFromSRT(char* pathSRT, int sublanguage, int transp, char* id, int mode, int serviceType) { 29 ServiceWindowGenerationFromSRT::ServiceWindowGenerationFromSRT(char* pathSRT, int sublanguage, int transp, char* id, int mode, int serviceType) {
@@ -44,7 +44,7 @@ ServiceWindowGenerationFromSRT::ServiceWindowGenerationFromSRT(char* pathSRT, in @@ -44,7 +44,7 @@ ServiceWindowGenerationFromSRT::ServiceWindowGenerationFromSRT(char* pathSRT, in
44 } 44 }
45 running = true; 45 running = true;
46 finish = false; 46 finish = false;
47 - PRINTL(util::_DEBUG, "Done!\n"); 47 + PRINTL(util::_DEBUG, "Service SRT Done!\n");
48 } 48 }
49 49
50 ServiceWindowGenerationFromSRT::~ServiceWindowGenerationFromSRT() { 50 ServiceWindowGenerationFromSRT::~ServiceWindowGenerationFromSRT() {
servico/src/serviceWindowGenerationFromText.cpp
@@ -18,7 +18,7 @@ ServiceWindowGenerationFromText::ServiceWindowGenerationFromText(char* pathFile, @@ -18,7 +18,7 @@ ServiceWindowGenerationFromText::ServiceWindowGenerationFromText(char* pathFile,
18 } 18 }
19 running = true; 19 running = true;
20 finish = false; 20 finish = false;
21 - PRINTL(util::_DEBUG, "Done!\n"); 21 + PRINTL(util::_DEBUG, "Service Text Done!\n");
22 } 22 }
23 23
24 ServiceWindowGenerationFromText::~ServiceWindowGenerationFromText() { 24 ServiceWindowGenerationFromText::~ServiceWindowGenerationFromText() {
tradutor/src/tradutorPortGlosa.cpp
@@ -21,7 +21,7 @@ namespace Tradutor { @@ -21,7 +21,7 @@ namespace Tradutor {
21 // Inicia o mutex 21 // Inicia o mutex
22 mutex = (pthread_mutex_t *) malloc( sizeof(pthread_mutex_t) ); 22 mutex = (pthread_mutex_t *) malloc( sizeof(pthread_mutex_t) );
23 pthread_mutex_init(mutex, NULL); 23 pthread_mutex_init(mutex, NULL);
24 - PRINTL(util::_DEBUG, "Done!\n"); 24 + PRINTL(util::_DEBUG, "Translator Done!\n");
25 } 25 }
26 26
27 27