Commit b2bb9e8ac0657dfc36d2261c5b7ea59023b7e83e
1 parent
e009fab1
Exists in
devel
Fixes quotes bug
Showing
3 changed files
with
7 additions
and
3 deletions
Show diff stats
extrator/src/extratorTXT.cpp
... | ... | @@ -10,7 +10,6 @@ |
10 | 10 | **************************************************************************/ |
11 | 11 | |
12 | 12 | #include "extratorTXT.h" |
13 | -#include <iostream> | |
14 | 13 | |
15 | 14 | ExtratorTXT::ExtratorTXT(){ |
16 | 15 | listeners = new list<ListenerTXT*>(); |
... | ... | @@ -56,6 +55,10 @@ void ExtratorTXT::encodingfiletoUTF8() { |
56 | 55 | system(sedcmd.c_str()); |
57 | 56 | } |
58 | 57 | |
58 | +void ExtratorTXT::remove_quotes(std::string &str) { | |
59 | + str.erase(std::remove(str.begin(), str.end(), '\"'), str.end()); | |
60 | +} | |
61 | + | |
59 | 62 | void ExtratorTXT::setFilePath(char* path){ |
60 | 63 | this->filePath = path; |
61 | 64 | encodingfiletoUTF8(); |
... | ... | @@ -87,6 +90,7 @@ void ExtratorTXT::Run(){ |
87 | 90 | getline(ifs_, current_line, '\n'); |
88 | 91 | |
89 | 92 | if (current_line.length() != 0) { |
93 | + remove_quotes(current_line); | |
90 | 94 | notifyListeners((unsigned char*) current_line.c_str()); |
91 | 95 | line_index++; |
92 | 96 | } | ... | ... |
extrator/src/include/extratorTXT.h
renderer/src/renderer.cpp
1 | 1 | #include "renderer.h" |
2 | -#include <iostream> | |
3 | 2 | |
4 | 3 | Renderer::Renderer(char* path_Contents, char* id) { |
5 | 4 | this->pathOutVideo = path_Contents; |
... | ... | @@ -103,7 +102,7 @@ void Renderer::exportGlosa() { |
103 | 102 | strcpy(glosaBff, glosaCpy.c_str()); |
104 | 103 | try { |
105 | 104 | cSocket->write(glosaBff, size); //Envia a glosa formatada p/ o player |
106 | - usleep(1500); | |
105 | + usleep(5000); | |
107 | 106 | }catch(lavidlib::IOException &ex){ |
108 | 107 | throw lavidlib::RuntimeException("Erro ao enviar glosa"); |
109 | 108 | } | ... | ... |