Skip to content
Draft
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
86 changes: 70 additions & 16 deletions livekit-ffi-node-bindings/proto/capture_pb.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 34 additions & 10 deletions livekit-ffi-node-bindings/proto/capture_pb.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 16 additions & 4 deletions livekit-ffi-node-bindings/proto/ffi_pb.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions livekit-ffi-node-bindings/proto/ffi_pb.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 16 additions & 9 deletions livekit-ffi/protocol/capture.proto
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ import "video_frame.proto";
// embeds an OwnedVideoSource for the existing CreateVideoTrackRequest and
// the recommended TrackPublishOptions for PublishTrackRequest.
// 2. StartCaptureRequest: starts pumping frames into the RTC source.
// 3. The capture runs until StopCaptureRequest, end of stream, or an error;
// a CaptureSourceEvent is delivered exactly once when it ends.
// 3. StopCaptureRequest signals the pump to stop without waiting.
// 4. JoinCaptureRequest consumes the running pump and completes asynchronously
// after its thread exits, returning its terminal result.

// Bitrate unit expected by a GStreamer encoder property.
enum GstreamerBitrateUnit {
Expand Down Expand Up @@ -153,12 +154,19 @@ message NewCaptureSourceCallback {
message StartCaptureRequest { required uint64 capture_handle = 1; }
message StartCaptureResponse { optional string error = 1; }

// Signal a running capture to stop after the frame in flight. The terminal
// CaptureSourceEvent follows shortly. Stopping an already-finished capture
// is a no-op.
// Signal a running capture to stop after the frame in flight without waiting
// for its thread to exit. Stopping an already-finished capture is a no-op.
message StopCaptureRequest { required uint64 capture_handle = 1; }
message StopCaptureResponse { optional string error = 1; }

// Consume a running capture and wait asynchronously for its pump thread to
// exit. Like RunningPump::join, this does not signal the pump to stop.
message JoinCaptureRequest {
required uint64 capture_handle = 1;
optional uint64 request_async_id = 2;
}
message JoinCaptureResponse { required uint64 async_id = 1; }

// Why a capture ended without error.
enum CaptureExit {
// Stopped by StopCaptureRequest (or handle disposal).
Expand All @@ -174,10 +182,9 @@ message CaptureFinished {

message CaptureError { required string error = 1; }

// Delivered exactly once when a started capture ends, regardless of why
// (stop request, end of stream, or failure).
message CaptureSourceEvent {
required uint64 capture_handle = 1;
// Completes JoinCaptureRequest with the pump's terminal result.
message JoinCaptureCallback {
required uint64 async_id = 1;
oneof message {
CaptureFinished finished = 2;
CaptureError error = 3;
Expand Down
Loading