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