Commit abe2505652edbdb63d23cce9c81727788548abf5

Authored by Wesnydy Ribeiro
1 parent 7e25af70
Exists in master and in 1 other branch devel

Pequenas correções

extrator/src/extratorSRT.cpp
... ... @@ -87,7 +87,7 @@ void ExtratorSRT::Run(){
87 87 free(subtitle);
88 88 }
89 89 if(sub_index == 0)
90   - notifyListeners((unsigned char*)"ARQUIVO_VAZIO", 0);
  90 + notifyListeners((unsigned char*)"ARQUIVO_INVALIDO", 0);
91 91 finish = true;
92 92 notifyEndExtraction(sub_index);
93 93 }
... ...
extrator/src/extratorTXT.cpp
... ... @@ -92,7 +92,7 @@ void ExtratorTXT::Run(){
92 92 }
93 93 }catch (EOFException &ex){
94 94 if(line_index == 0)
95   - notifyListeners((unsigned char*)"ARQUIVO_VAZIO");
  95 + notifyListeners((unsigned char*)"ARQUIVO_INVALIDO");
96 96 hasNext = false;
97 97 }catch (...){
98 98 Util::Logger::Instance()->writeLog((char*) "[ERRO: extratorTXT.cpp] Erro durante a leitura do arquivo de texto.");
... ...
recognize/src/recognize.cpp
... ... @@ -209,7 +209,7 @@ void Recognize::breakVideoParts(int timeTotal) {
209 209 void Recognize::executeJuliusEngine() {
210 210  
211 211 string type, freqStr;
212   - string command = "julius - C ";
  212 + string command = "julius -C ";
213 213 char cfreq[10];
214 214  
215 215 char* jPath;
... ...
servico/src/serviceWindowGenerationFromRec.cpp
... ... @@ -64,6 +64,7 @@ void ServiceWindowGenerationFromRec::setPathContents(){
64 64 ifstream conf_file(PATH_CONF_FILE, ifstream::binary);
65 65 parsingSuccessful = reader.parse(conf_file, root);
66 66 if(!parsingSuccessful){
  67 + conf_file.close();
67 68 throw ServiceException("Fail to parsing param.json");
68 69 }
69 70 string attr = root.get("storage", PATH_VBOX_UPLOADS).asString();
... ... @@ -71,6 +72,7 @@ void ServiceWindowGenerationFromRec::setPathContents(){
71 72 strcpy(this->path_contents, attr.c_str());
72 73 this->path_uploads = PATH_VBOX_UPLOADS;
73 74 rec->setPathAudioContents(path_uploads);
  75 + conf_file.close();
74 76 }else{
75 77 throw ServiceException("Invalid client!");
76 78 }
... ...
servico/src/serviceWindowGenerationFromSRT.cpp
... ... @@ -67,12 +67,14 @@ void ServiceWindowGenerationFromSRT::setPathContents() {
67 67 ifstream conf_file(PATH_CONF_FILE, ifstream::binary);
68 68 parsingSuccessful = reader.parse(conf_file, root);
69 69 if(!parsingSuccessful){
  70 + conf_file.close();
70 71 throw ServiceException("Fail to parsing param.json");
71 72 }
72 73 string attr = root.get("storage", PATH_VBOX_UPLOADS).asString();
73 74 this->path_contents = new char[MAX_SIZE_PATH];
74 75 strcpy(this->path_contents, attr.c_str());
75 76 this->path_uploads = PATH_VBOX_UPLOADS;
  77 + conf_file.close();
76 78 }else{
77 79 throw ServiceException("Invalid client!");
78 80 }
... ...