- A recording killed mid-way had wrong timestamps in players: its fragmented MP4's header gives a length of 0, and one cut short never gets the index a clean stop writes. modules/Screen_Record's record_remux now copies every recording's packets, as they are, into a regular MP4 (one header first with the length and every frame's index; faststart) before it goes into the library; should that fail, the fragmented MP4 goes in as it was. - Keyframes were every 60 frames, which, with frames written only on change, could span minutes of time, and a crash could lose a fragment that long. One is now forced every 2 s of time (forced-idr for NVENC and libx264). - A crash's leftover no longer claims a region at 0, 0 in its capture.json. - record-probe -remux IN OUT. Tests: a recording cut at its last fragment, as a crash cuts it, goes in as a regular MP4 of the time before the cut. - Checked on the recording that showed it: its MP4, cut mid-fragment, rewrites to 76 frames (5.2 s) with positive frame durations. A 12 s still recording now fragments every ~2 s, and the app killed 10 s into a recording leaves 8.1 s.
52 lines
1.6 KiB
Plaintext
52 lines
1.6 KiB
Plaintext
// Type-checks src/App.jai for another OS without producing or linking a binary, to catch errors
|
|
// in code your machine does not build:
|
|
//
|
|
// jai check_targets.jai - linux (from any OS)
|
|
// jai check_targets.jai - macos (from a Mac only: the Objective_C module runs code at compile time)
|
|
//
|
|
// The constants below stand in for the ones first.jai generates; keep their names in step.
|
|
#run,stallable {
|
|
set_build_options_dc(.{do_output = false});
|
|
args := get_build_options().compile_time_command_line;
|
|
target := Operating_System_Tag.LINUX;
|
|
cpu := CPU_Tag.X64;
|
|
if array_find(args, "macos") { target = .MACOS; cpu = .ARM64; }
|
|
|
|
options := get_build_options();
|
|
options.os_target = target;
|
|
options.cpu_target = cpu;
|
|
options.output_type = .NO_OUTPUT;
|
|
options.backend = .LLVM;
|
|
options.output_executable_name = "check";
|
|
options.output_path = ".build";
|
|
|
|
w := compiler_create_workspace("check");
|
|
set_build_options(options, w);
|
|
compiler_begin_intercept(w);
|
|
add_build_file("src/App.jai", w);
|
|
add_build_string(#string S
|
|
APP_NAME :: "mcap";
|
|
APP_FOLDER_NAME :: "mcap";
|
|
GIT_BRANCH :: "check";
|
|
GIT_HASH :: "-";
|
|
VERSION :: "0.1.7";
|
|
BUILD_DATE :: "-";
|
|
DEBUG :: true;
|
|
COMPILE_TESTS :: true;
|
|
COMPILE_ARGS :: "";
|
|
NO_CRASH_DIALOG :: false;
|
|
S, w);
|
|
while true {
|
|
message := compiler_wait_for_message();
|
|
if message.kind == .COMPLETE {
|
|
m := cast(*Message_Complete) message;
|
|
log("% check: %", target, m.error_code);
|
|
break;
|
|
}
|
|
}
|
|
compiler_end_intercept(w);
|
|
}
|
|
|
|
#import "Basic";
|
|
#import "Compiler";
|