Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .devcontainer/docker/devcontainer-lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"features": {
"ghcr.io/devcontainers/features/node:1": {
"version": "1.7.1",
"resolved": "ghcr.io/devcontainers/features/node@sha256:8c0de46939b61958041700ee89e3493f3b2e4131a06dc46b4d9423427d06e5f6",
"integrity": "sha256:8c0de46939b61958041700ee89e3493f3b2e4131a06dc46b4d9423427d06e5f6"
}
}
}
15 changes: 9 additions & 6 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,15 @@ func getDefaultConfig() Config {
VideoQualityFactor: 1.0,
VideoCodecPreference: "auto",
MqttConfig: &MQTTConfig{
Enabled: false,
Port: 1883,
BaseTopic: "jetkvm",
EnableHADiscovery: false,
EnableActions: true,
DebounceMs: 500,
Enabled: false,
Port: 1883,
BaseTopic: "jetkvm",
EnableHADiscovery: false,
EnableActions: true,
DebounceMs: 500,
PublishScreenshot: false,
ScreenshotIntervalSec: 60,
PublishScreenshotButton: false,
},
}
}
Expand Down
4 changes: 4 additions & 0 deletions internal/native/cgo/ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,10 @@ void jetkvm_video_shutdown() {
video_shutdown();
}

int jetkvm_video_capture_jpeg(uint8_t **out_buf, size_t *out_len) {
return video_capture_jpeg(out_buf, out_len);
}

void jetkvm_crash() {
// let's call a function that will crash the program
int* p = 0;
Expand Down
10 changes: 10 additions & 0 deletions internal/native/cgo/ctrl.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,16 @@ void video_report_format(bool ready, const char *error, u_int16_t width, u_int16
void video_send_format_report();
int video_send_frame(const uint8_t *frame, ssize_t len);

/**
* @brief Capture a single JPEG frame from the live video stream.
*
* On success, *out_buf is set to a malloc'd buffer containing JPEG bytes and
* *out_len to its length. The caller must free *out_buf with free().
*
* @return 0 on success, non-zero on error.
*/
int jetkvm_video_capture_jpeg(uint8_t **out_buf, size_t *out_len);



#endif //VIDEO_DAEMON_CTRL_H
Loading
Loading