End the show when its world closes and verify the MP4 lifecycle (#89)
A frame hook ends an active film or export when the world is gone. The game stops ticking at the title screen but keeps rendering, so an export used to keep recording the title with its playback clock frozen (a sec=10 request produced 3898 frames) and went on after re-entering the world. Session cleanup runs once with WorldChange and cancels the capture. Real short exports on a scratch home and world (pin 57f8b2853, API 29, Metal): h264+AAC both 2.07 s with non-silent audio, reported frames equal ffprobe nb_frames; cancel, SDK refusal, encoder failure and restart all leave no capture running; 1920x1080 works. The engine still leaves *.audio.raw and *.ffmpeg.log behind on an encoder error (game/film.rs). Co-Authored-By: Kimi Code <noreply@moonshot.ai>
This commit is contained in:
@@ -81,6 +81,15 @@ AirDef не принимает чужие Recording/Done за свой эксп
|
||||
сбрасывает готовность. Уже переданный writer файл на Encoding может всё же завершиться:
|
||||
это запрос отмены, не гарантия удаления файла.
|
||||
|
||||
Проверено на реальном экспорте 4 ноября (pin `57f8b2853`):
|
||||
|
||||
- Смена мира доходит до движка только через снимок мода (`set_snapshot`). На экране заголовка тики
|
||||
не вызываются, поэтому мод без хука `frame` не сообщает о закрытии мира, и захват продолжает
|
||||
писать заголовок. AirDef теперь просит `frame` и завершает показ по `game.world-id = none`.
|
||||
- При ошибке энкодера писатель удаляет только отменённые файлы: `<имя>.audio.raw` и
|
||||
`<имя>.ffmpeg.log` остаются. Успешная и отменённая записи временных файлов не оставляют.
|
||||
Это ограничение движка, а не мода; исправление — в `game/film.rs`.
|
||||
|
||||
## Отдельный тяжёлый WASM tier
|
||||
|
||||
```sh
|
||||
|
||||
Reference in New Issue
Block a user