comparison src/Modules/Output/Graphics/Devices/GraphicsOutputDeviceMovie.cc @ 515:0986e63dd1d7

- Add limits.h - Fix a compile warning.
author tom@acousticscale.org
date Tue, 10 Jul 2012 07:44:29 +0000
parents a4353a6d8241
children 087f3b3c36d3
comparison
equal deleted inserted replaced
514:1875194aab99 515:0986e63dd1d7
43 # include <sys/types.h> 43 # include <sys/types.h>
44 # include <dirent.h> // for opendir&friends 44 # include <dirent.h> // for opendir&friends
45 #endif 45 #endif
46 #include <stdio.h> 46 #include <stdio.h>
47 #include <string.h> 47 #include <string.h>
48 #include <limits.h>
48 49
49 #include "Modules/Output/Graphics/Devices/GraphicsOutputDeviceMovie.h" 50 #include "Modules/Output/Graphics/Devices/GraphicsOutputDeviceMovie.h"
50 51
51 namespace aimc { 52 namespace aimc {
52 53
166 float frame_rate = global_parameters_->DefaultFloat("frame_rate", -1.0); 167 float frame_rate = global_parameters_->DefaultFloat("frame_rate", -1.0);
167 char sCmdLine[1024]; //!\todo check that snprintf does not want a larger buffer 168 char sCmdLine[1024]; //!\todo check that snprintf does not want a larger buffer
168 snprintf(sCmdLine, sizeof(sCmdLine)/sizeof(sCmdLine[0]), 169 snprintf(sCmdLine, sizeof(sCmdLine)/sizeof(sCmdLine[0]),
169 "%s -y -i \"%s\" -r %.2f -i \"%s%%06d.png\" " 170 "%s -y -i \"%s\" -r %.2f -i \"%s%%06d.png\" "
170 "-sameq -r %.2f -ar 44100 -acodec pcm_s16le %s \"%s\"", 171 "-sameq -r %.2f -ar 44100 -acodec pcm_s16le %s \"%s\"",
171 sffmpegPath, sound_filename_.c_str(), frame_rate, directory_.c_str(), 172 sffmpegPath, sound_filename_.c_str(), frame_rate, directory_.c_str(),
172 frame_rate, sCodecOptions, movie_filename_.c_str()); 173 frame_rate, sCodecOptions, movie_filename_.c_str());
173 printf(sCmdLine); 174 printf("%s", sCmdLine);
174 printf("\n"); 175 printf("\n");
175 if (system(sCmdLine)) { 176 if (system(sCmdLine)) {
176 LOG_ERROR(_T("Couldn't create movie output.")); 177 LOG_ERROR(_T("Couldn't create movie output."));
177 } 178 }
178 179
179 #ifdef __WX__ 180 #ifdef __WX__