Commit 126bc23b00c78cdfc9d4654bcd50c6153b1b7aee
1 parent
fac85c34
Exists in
master
and in
1 other branch
Ajustes no Renderizador
Showing
1 changed file
with
6 additions
and
6 deletions
Show diff stats
renderer/src/renderer.cpp
... | ... | @@ -3,7 +3,7 @@ |
3 | 3 | Renderer::Renderer(char* videoPath, char* user_id) { |
4 | 4 | this->folder_id = user_id; |
5 | 5 | this->path_video = videoPath; |
6 | - //serverInitialize(); | |
6 | + serverInitialize(); | |
7 | 7 | running = true; |
8 | 8 | count_task = 0; |
9 | 9 | glosa_processed = 0; |
... | ... | @@ -20,8 +20,8 @@ Renderer::~Renderer() { |
20 | 20 | } |
21 | 21 | |
22 | 22 | void Renderer::serverInitialize(){ |
23 | - string render = "./render.sh "; | |
24 | - render.append(folder_id).append(" \"VLIBRAS\"").append(" 1920 1080").append(" 1").append(" 30"); | |
23 | + string render = "python render.py "; | |
24 | + render.append(folder_id).append(" >/dev/null 2>&1 &"); | |
25 | 25 | |
26 | 26 | string command = "cd "; |
27 | 27 | char* shPath; |
... | ... | @@ -33,7 +33,7 @@ void Renderer::serverInitialize(){ |
33 | 33 | |
34 | 34 | command.append(" && ").append(render); |
35 | 35 | system(command.c_str()); |
36 | - sleep(2); | |
36 | + sleep(5); | |
37 | 37 | } |
38 | 38 | |
39 | 39 | void Renderer::receiveGlosa(std::string glosa, int64_t pts) { |
... | ... | @@ -138,7 +138,7 @@ void Renderer::Run() { |
138 | 138 | |
139 | 139 | void Renderer::render() { |
140 | 140 | string command = "avconv -loglevel quiet -framerate 30 -i "; |
141 | - command.append(PATH_SCREENS).append(folder_id).append("/frame_%d.png ") | |
141 | + command.append(PATH_SCREENS).append("[\'").append(folder_id).append("\']").append("/frame_%d.png ") | |
142 | 142 | .append("-vcodec libx264 -pix_fmt yuv420p ").append(path_video); |
143 | 143 | system(command.c_str()); |
144 | 144 | notifyListeners(); |
... | ... | @@ -146,6 +146,6 @@ void Renderer::render() { |
146 | 146 | |
147 | 147 | void Renderer::cleanFiles() { |
148 | 148 | string clean = "rm -rf "; |
149 | - clean.append(PATH_SCREENS).append(user_id).append("/"); | |
149 | + clean.append(PATH_SCREENS).append(folder_id).append("/"); | |
150 | 150 | system(clean.c_str()); |
151 | 151 | } |
152 | 152 | \ No newline at end of file | ... | ... |