Commit 93f2bb11fd9afe6fa8d895033194db32800c381e

Authored by Erickson Silva
1 parent 01eb3dc9
Exists in master and in 1 other branch devel

Corrige REC Only Audio

recognize/src/include/recognize.h
@@ -45,15 +45,12 @@ public: @@ -45,15 +45,12 @@ public:
45 void notifyPCRBase(uint64_t pcrbase); 45 void notifyPCRBase(uint64_t pcrbase);
46 46
47 bool isFinished(); 47 bool isFinished();
48 - void hasAudio();  
49 -  
50 48
51 void Run(); 49 void Run();
52 int count_lines; 50 int count_lines;
53 51
54 private: 52 private:
55 53
56 - bool isAudio;  
57 int64_t pcr_base; 54 int64_t pcr_base;
58 bool hasPCRBase; 55 bool hasPCRBase;
59 char* pathVideo; 56 char* pathVideo;
recognize/src/recognize.cpp
@@ -124,10 +124,6 @@ void Recognize::Run(){ @@ -124,10 +124,6 @@ void Recognize::Run(){
124 notifyEndExtraction(count_lines); 124 notifyEndExtraction(count_lines);
125 } 125 }
126 126
127 -void Recognize::hasAudio(){  
128 - isAudio = true;  
129 -}  
130 -  
131 void Recognize::setFrequency(int freq) { 127 void Recognize::setFrequency(int freq) {
132 frequency = freq; 128 frequency = freq;
133 } 129 }
servico/src/include/serviceWindowGeneration.h
@@ -31,7 +31,7 @@ @@ -31,7 +31,7 @@
31 #define SERVICE_TYPE_REC 3 /* Reconhecimento de Voz */ 31 #define SERVICE_TYPE_REC 3 /* Reconhecimento de Voz */
32 #define SERVICE_TYPE_TEXT 4 /* Texto */ 32 #define SERVICE_TYPE_TEXT 4 /* Texto */
33 #define SERVICE_TYPE_SRT_ONLY 5 /* Subtitle SRT ONLY */ 33 #define SERVICE_TYPE_SRT_ONLY 5 /* Subtitle SRT ONLY */
34 -#define SERVICE_TYPE_REC_ONLY_LIBRAS 6 /* Subtitle SRT ONLY */ 34 +#define SERVICE_TYPE_REC_ONLY_AUDIO 6 /* Subtitle AUDIO ONLY */
35 35
36 using namespace Tradutor; 36 using namespace Tradutor;
37 using namespace Util; 37 using namespace Util;
servico/src/serviceWindowGeneration.cpp
@@ -46,7 +46,7 @@ bool ServiceWindowGeneration::isRunning() { @@ -46,7 +46,7 @@ bool ServiceWindowGeneration::isRunning() {
46 46
47 /* Quando o sincronizador termina, ele invoca esse método para avisar! */ 47 /* Quando o sincronizador termina, ele invoca esse método para avisar! */
48 void ServiceWindowGeneration::finalizouSincronizacao() { 48 void ServiceWindowGeneration::finalizouSincronizacao() {
49 - if (getRunningOption() != '2' && serviceType == SERVICE_TYPE_REC && serviceType == SERVICE_TYPE_SRT) { 49 + if (getRunningOption() != '2' && serviceType == SERVICE_TYPE_REC || serviceType == SERVICE_TYPE_SRT) {
50 mixer = new Mixer(); 50 mixer = new Mixer();
51 mixer->initialize(this->path_input, this->path_libras,this->position,this->size,this->transparency, this->user_id); 51 mixer->initialize(this->path_input, this->path_libras,this->position,this->size,this->transparency, this->user_id);
52 createThumbnail(); 52 createThumbnail();
@@ -149,7 +149,7 @@ void ServiceWindowGeneration::initialize() { @@ -149,7 +149,7 @@ void ServiceWindowGeneration::initialize() {
149 vector<string> tokens; 149 vector<string> tokens;
150 /* Se for texto não é necessário vídeo de entrada (path_input) */ 150 /* Se for texto não é necessário vídeo de entrada (path_input) */
151 if (serviceType != SERVICE_TYPE_TEXT && serviceType != SERVICE_TYPE_SRT_ONLY && 151 if (serviceType != SERVICE_TYPE_TEXT && serviceType != SERVICE_TYPE_SRT_ONLY &&
152 - serviceType != SERVICE_TYPE_REC_ONLY_LIBRAS) { 152 + serviceType != SERVICE_TYPE_REC_ONLY_AUDIO) {
153 char * pathtmp = this->path_input; 153 char * pathtmp = this->path_input;
154 int size = strlen(pathtmp); 154 int size = strlen(pathtmp);
155 char vtemp [size]; 155 char vtemp [size];
servico/src/serviceWindowGenerationFromREC.cpp
@@ -39,10 +39,7 @@ void ServiceWindowGenerationFromREC::initialize() { @@ -39,10 +39,7 @@ void ServiceWindowGenerationFromREC::initialize() {
39 39
40 rec->addListener(this); 40 rec->addListener(this);
41 41
42 - if (serviceType == 6){  
43 - rec->hasAudio();  
44 -  
45 - } else { 42 + if (serviceType != SERVICE_TYPE_REC_ONLY_AUDIO){
46 43
47 inputfile = new InputFile(this->path_input); 44 inputfile = new InputFile(this->path_input);
48 monitor_pcr_base = new MonitorPCR(); 45 monitor_pcr_base = new MonitorPCR();