Add VNC snapshot recording#238
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b77e8cedb3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| vncSession = vncConnection.session | ||
|
|
||
| if config.VNCRecordingDir != "" { | ||
| if !startVNCRecording(ctx, state, config, ui, vncSession) { |
There was a problem hiding this comment.
Serialize VNC writes while recording boot commands
When both vnc_recording_dir and boot_command are set, this starts the recorder goroutine on the same vncSession before typeBootCommandOverVNC sends keys. The recorder periodically calls FramebufferUpdateRequest while bootcommand.NewVNCDriver writes key events to the same go-vnc ClientConn; go-vnc's KeyEvent emits one VNC message through several writes, so a recording request can interleave mid-key event and corrupt the VNC protocol stream. Please guard all ClientConn writes with a shared mutex or use a separate VNC connection for recording.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
I think the bot is right here. If we're recording off of the VNC stream in real-time, we probably need to factor this out and share the resulting FB with the detection and recording.
Summary
Tests