{
QString value;
do_clear_options_list();
- do_add_option(QString::fromUtf8("c:v"), QString::fromUtf8("libx264"));
+ do_add_option(QString::fromUtf8("c:v"), QString::fromUtf8("mpeg4"));
do_add_option(QString::fromUtf8("c:a"), QString::fromUtf8("aac"));
//do_add_option(QString::fromUtf8("c:v"), QString::fromUtf8("theora"));
//do_add_option(QString::fromUtf8("c:a"), QString::fromUtf8("vorbis"));
static double prev_vm_fps = -1;
double vm_fps = vm_frame_rate();
frames = vm_fps / (double)rec_video_fps;
-
+
while(rec_video_run_frames > 0) {
rec_video_run_frames -= frames;
rec_video_frames += frames;
if(frames <= 1.0) {
if(counter <= 0) return counter;
} else {
- counter = counter + ((int)frames - 1);
+ counter = counter + (int)frames;
}
if(using_flags->is_use_one_board_computer()) {
int size = vm_screen_buffer.pImage.byteCount();
frames = fps * (double)samples / (double)sound_rate;
//}
rec_video_frames -= frames;
- if(rec_video_frames > 2) {
- rec_video_run_frames -= (rec_video_frames - 2);
- } else if(rec_video_frames < -2) {
- rec_video_run_frames -= (rec_video_frames + 2);
+ if(rec_video_frames > 2.0) {
+ rec_video_run_frames -= (rec_video_frames - 2.0);
+ } else if(rec_video_frames < -2.0) {
+ rec_video_run_frames -= (rec_video_frames + 2.0);
}
}
//printf("Wrote %d samples ptr=%d\n", samples, rec_sound_buffer_ptr);