Mercurial > hg > aimc
comparison trunk/src/Modules/Output/Graphics/Devices/GraphicsOutputDeviceMovie.cc @ 576:5c607bcfa89f
- Add limits.h
- Fix a compile warning.
author | tom@acousticscale.org |
---|---|
date | Tue, 10 Jul 2012 07:44:29 +0000 |
parents | 167d8ec2468e |
children | b5dca605c3d5 |
comparison
equal
deleted
inserted
replaced
575:f56d2eedd878 | 576:5c607bcfa89f |
---|---|
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__ |