// Add a gap of one second from the old frames to the new ones.
start_pts += TIMEBASE;
}
+ current_pts = start_pts;
for (int stream_idx = 0; stream_idx < MAX_STREAMS; ++stream_idx) {
sort(frames[stream_idx].begin(), frames[stream_idx].end(),
FrameOnDisk frame = write_frame(pkt.stream_index, pts, pkt.data, pkt.size, &db);
post_to_main_thread([pkt, frame] {
- if (pkt.stream_index == 0) {
- global_mainwindow->ui->input1_display->setFrame(pkt.stream_index, frame);
- } else if (pkt.stream_index == 1) {
- global_mainwindow->ui->input2_display->setFrame(pkt.stream_index, frame);
- } else if (pkt.stream_index == 2) {
- global_mainwindow->ui->input3_display->setFrame(pkt.stream_index, frame);
- } else if (pkt.stream_index == 3) {
- global_mainwindow->ui->input4_display->setFrame(pkt.stream_index, frame);
- }
+ global_mainwindow->display_frame(pkt.stream_index, frame);
});
if (last_pts != -1 && global_flags.slow_down_input) {