Commit 7c68d56f24349e711ea00b80b340ea02c4c7ea98
1 parent
260bb19d
Exists in
master
and in
1 other branch
Corrige geração de thumbnail e verifica. Serviço REC captura informações referentes ao PCR do .TS
Showing
4 changed files
with
14 additions
and
6 deletions
Show diff stats
extratorSRT/src/extratorSRT.cpp
... | ... | @@ -49,7 +49,7 @@ void ExtratorSRT::notifyEndExtraction(int sub_size) { |
49 | 49 | void ExtratorSRT::setFilePath(char* path){ |
50 | 50 | filepath = (char*) path; |
51 | 51 | string command = "perl -p -e \'s/\n/ /\' "; |
52 | - command.append(filepath); | |
52 | + command.append(filepath).append(" > /dev/null"); | |
53 | 53 | system(command.c_str()); |
54 | 54 | } |
55 | 55 | ... | ... |
servico/src/serviceWindowGeneration.cpp
... | ... | @@ -273,7 +273,7 @@ void ServiceWindowGeneration::transcodeVideoToMp4() { |
273 | 273 | void ServiceWindowGeneration::createThumbnail(){ |
274 | 274 | |
275 | 275 | string command = "ffmpeg -ss 10 -i "; |
276 | - command.append(getPathInput()) | |
276 | + command.append(PATH_API).append(user_id).append(".mp4") | |
277 | 277 | .append(" -vcodec png -vframes 1 -an -f rawvideo -y -vf scale=200:200 ") |
278 | 278 | .append(PATH_API).append(user_id).append(".png"); |
279 | 279 | system(command.c_str()); | ... | ... |
servico/src/serviceWindowGenerationFromREC.cpp
... | ... | @@ -42,17 +42,25 @@ void ServiceWindowGenerationFromREC::initialize() { |
42 | 42 | inputfile = new InputFile(this->path_input); |
43 | 43 | monitor_pcr_base = new MonitorPCR(); |
44 | 44 | |
45 | + if (strstr(this->path_input, "ts") != NULL) { | |
46 | + char* format_video = new char[3]; | |
47 | + strcpy(format_video, "ts"); | |
48 | + monitor_pcr_base->setFormatVideo(format_video); | |
49 | + } | |
50 | + | |
45 | 51 | monitor_pcr_base->addListenerPCRBase(rec); |
46 | 52 | inputfile->registraOuvinte(monitor_pcr_base); |
47 | 53 | |
48 | 54 | ServiceWindowGeneration::initialize(); |
49 | 55 | |
50 | 56 | try{ |
51 | - rec->initialize(); | |
52 | 57 | inputfile->initialize(); |
53 | - }catch(RecognizeException ex){ | |
58 | + rec->initialize(); | |
59 | + } catch(RecognizeException ex){ | |
54 | 60 | throw ServiceException(ex.getMessage()); |
55 | - } | |
61 | + } catch(InputException ex){ | |
62 | + throw ServiceException(ex.getMessage()); | |
63 | + } | |
56 | 64 | this->Start(); |
57 | 65 | } |
58 | 66 | ... | ... |
servico/src/serviceWindowGenerationFromSRT.cpp
... | ... | @@ -110,8 +110,8 @@ void ServiceWindowGenerationFromSRT::initialize() { |
110 | 110 | ServiceWindowGeneration::initialize(); |
111 | 111 | |
112 | 112 | try{ |
113 | - extratorSRT->initialize(); | |
114 | 113 | inputfile->initialize(); |
114 | + extratorSRT->initialize(); | |
115 | 115 | }catch(ExtratorSrtException ex){ |
116 | 116 | throw ServiceException(ex.getMessage()); |
117 | 117 | }catch(InputException ex){ | ... | ... |