Commit b14f85878c320b16755c019b4bdc8abfa8f7f08d
1 parent
4a6c42f7
Exists in
master
and in
2 other branches
Correção do path de log e do arquivo tamanho.txt gerado pelo Mixer.
Showing
4 changed files
with
14 additions
and
6 deletions
Show diff stats
mixer/src/Mixer.cpp
| @@ -29,10 +29,14 @@ Mixer::~Mixer() { | @@ -29,10 +29,14 @@ Mixer::~Mixer() { | ||
| 29 | 29 | ||
| 30 | /*Faz a chamada ffmpeg no terminal.*/ | 30 | /*Faz a chamada ffmpeg no terminal.*/ |
| 31 | 31 | ||
| 32 | -void Mixer::initialize(string mainVideo, string slVideo, int positionSecondaryVideo, int sizeSecondaryVideo, int transparency){ | 32 | +void Mixer::initialize(string mainVideo, string slVideo, int positionSecondaryVideo, int sizeSecondaryVideo, int transparency, char* _id){ |
| 33 | 33 | ||
| 34 | DDPRINTF("[AGUARDE] Mixando...\n") | 34 | DDPRINTF("[AGUARDE] Mixando...\n") |
| 35 | 35 | ||
| 36 | + stringstream ss; | ||
| 37 | + ss << _id; | ||
| 38 | + ss >> this->user_id; | ||
| 39 | + | ||
| 36 | this->setMainVideo(mainVideo); | 40 | this->setMainVideo(mainVideo); |
| 37 | this->setSecondaryVideo(slVideo); | 41 | this->setSecondaryVideo(slVideo); |
| 38 | this->setNumThreads("8"); //tem que aparecer antes do metodo adjustVideosFps() | 42 | this->setNumThreads("8"); //tem que aparecer antes do metodo adjustVideosFps() |
| @@ -308,7 +312,11 @@ void Mixer::setMainVideo(string mainVideo){ | @@ -308,7 +312,11 @@ void Mixer::setMainVideo(string mainVideo){ | ||
| 308 | } | 312 | } |
| 309 | //ajeitar isso depois | 313 | //ajeitar isso depois |
| 310 | string nameOfMainVideo = mainVideo.substr(0, dotPosition); | 314 | string nameOfMainVideo = mainVideo.substr(0, dotPosition); |
| 311 | - this->temporaryTextFile = "tamanho.txt"; | 315 | + this->temporaryTextFile = "vlibras_user/vlibras-web/public/uploads/videos/"; |
| 316 | + temporaryTextFile.append(this->user_id).append("/tamanho.txt"); | ||
| 317 | + | ||
| 318 | + printf("##########temporaryTextFile: %s\n", temporaryTextFile.c_str()); | ||
| 319 | + | ||
| 312 | } | 320 | } |
| 313 | string Mixer::getMainVideo(){ | 321 | string Mixer::getMainVideo(){ |
| 314 | return this->mainVideo; | 322 | return this->mainVideo; |
mixer/src/include/Mixer.h
| @@ -65,7 +65,7 @@ public: | @@ -65,7 +65,7 @@ public: | ||
| 65 | int getTransparency(); | 65 | int getTransparency(); |
| 66 | void setNumThreads(string); | 66 | void setNumThreads(string); |
| 67 | string getNumThreads(); | 67 | string getNumThreads(); |
| 68 | - void initialize(string mainVideo, string slVideo, int, int, int); | 68 | + void initialize(string mainVideo, string slVideo, int, int, int, char*); |
| 69 | void setPathFinal(string path); | 69 | void setPathFinal(string path); |
| 70 | string getPathFinal(); | 70 | string getPathFinal(); |
| 71 | 71 | ||
| @@ -83,7 +83,7 @@ private: | @@ -83,7 +83,7 @@ private: | ||
| 83 | void convertMainVideoFPS(fpsAndLine [], int *); | 83 | void convertMainVideoFPS(fpsAndLine [], int *); |
| 84 | void convertSecondaryVideoFPS(double); | 84 | void convertSecondaryVideoFPS(double); |
| 85 | 85 | ||
| 86 | - string mainVideo, secondaryVideo, temporaryTextFile, numThreads, pathFinal; | 86 | + string mainVideo, secondaryVideo, temporaryTextFile, numThreads, pathFinal, user_id; |
| 87 | int positionSecondaryVideo; | 87 | int positionSecondaryVideo; |
| 88 | double widthSecondaryVideo, heightSecondaryVideo; | 88 | double widthSecondaryVideo, heightSecondaryVideo; |
| 89 | int transparency; | 89 | int transparency; |
servico/src/serviceWindowGeneration.cpp
| @@ -46,7 +46,7 @@ bool ServiceWindowGeneration::isRunning() { | @@ -46,7 +46,7 @@ bool ServiceWindowGeneration::isRunning() { | ||
| 46 | void ServiceWindowGeneration::finalizouSincronizacao() { | 46 | void ServiceWindowGeneration::finalizouSincronizacao() { |
| 47 | if (getRunningOption() != '2' && serviceType != SERVICE_TYPE_TEXT && serviceType != SERVICE_TYPE_SRT_ONLY) { | 47 | if (getRunningOption() != '2' && serviceType != SERVICE_TYPE_TEXT && serviceType != SERVICE_TYPE_SRT_ONLY) { |
| 48 | mixer = new Mixer(); | 48 | mixer = new Mixer(); |
| 49 | - mixer->initialize(this->path_input, this->path_libras,this->position,this->size,this->transparency); | 49 | + mixer->initialize(this->path_input, this->path_libras,this->position,this->size,this->transparency, this->user_id); |
| 50 | sendFileToPath(mixer->getPathFinal()); | 50 | sendFileToPath(mixer->getPathFinal()); |
| 51 | } | 51 | } |
| 52 | 52 |
util/src/logger.cpp