Skip to content

Commit

Permalink
fix forwarding issues
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasIO committed Dec 20, 2024
1 parent 94b6e75 commit f1ae8d1
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
9 changes: 9 additions & 0 deletions livekit-ffi/protocol/ffi.proto
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ message FfiRequest {
// Track Publication
EnableRemoteTrackPublicationRequest enable_remote_track_publication = 42;
UpdateRemoteTrackPublicationDimensionRequest update_remote_track_publication_dimension = 43;

// Data Streams
SendStreamHeaderRequest send_stream_header = 44;
SendStreamChunkRequest send_stream_chunk = 45;

}
}

Expand Down Expand Up @@ -168,6 +173,10 @@ message FfiResponse {
// Track Publication
EnableRemoteTrackPublicationResponse enable_remote_track_publication = 41;
UpdateRemoteTrackPublicationDimensionResponse update_remote_track_publication_dimension = 42;

// Data Streams
SendStreamHeaderResponse send_stream_header = 43;
SendStreamChunkResponse send_stream_chunk = 44;
}
}

Expand Down
14 changes: 12 additions & 2 deletions livekit-ffi/src/livekit.proto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3946,7 +3946,7 @@ pub struct RpcMethodInvocationEvent {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FfiRequest {
#[prost(oneof="ffi_request::Message", tags="2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43")]
#[prost(oneof="ffi_request::Message", tags="2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45")]
pub message: ::core::option::Option<ffi_request::Message>,
}
/// Nested message and enum types in `FfiRequest`.
Expand Down Expand Up @@ -4044,13 +4044,18 @@ pub mod ffi_request {
EnableRemoteTrackPublication(super::EnableRemoteTrackPublicationRequest),
#[prost(message, tag="43")]
UpdateRemoteTrackPublicationDimension(super::UpdateRemoteTrackPublicationDimensionRequest),
/// Data Streams
#[prost(message, tag="44")]
SendStreamHeader(super::SendStreamHeaderRequest),
#[prost(message, tag="45")]
SendStreamChunk(super::SendStreamChunkRequest),
}
}
/// This is the output of livekit_ffi_request function.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FfiResponse {
#[prost(oneof="ffi_response::Message", tags="2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42")]
#[prost(oneof="ffi_response::Message", tags="2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44")]
pub message: ::core::option::Option<ffi_response::Message>,
}
/// Nested message and enum types in `FfiResponse`.
Expand Down Expand Up @@ -4146,6 +4151,11 @@ pub mod ffi_response {
EnableRemoteTrackPublication(super::EnableRemoteTrackPublicationResponse),
#[prost(message, tag="42")]
UpdateRemoteTrackPublicationDimension(super::UpdateRemoteTrackPublicationDimensionResponse),
/// Data Streams
#[prost(message, tag="43")]
SendStreamHeader(super::SendStreamHeaderResponse),
#[prost(message, tag="44")]
SendStreamChunk(super::SendStreamChunkResponse),
}
}
/// To minimize complexity, participant events are not included in the protocol.
Expand Down
6 changes: 6 additions & 0 deletions livekit-ffi/src/server/requests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1057,6 +1057,12 @@ pub fn handle_request(
on_update_remote_track_publication_dimension(server, request)?,
)
}
proto::ffi_request::Message::SendStreamHeader(request) => {
proto::ffi_response::Message::SendStreamHeader(on_send_stream_header(server, request)?)
}
proto::ffi_request::Message::SendStreamChunk(request) => {
proto::ffi_response::Message::SendStreamChunk(on_send_stream_chunk(server, request)?)
}
});

Ok(res)
Expand Down

0 comments on commit f1ae8d1

Please sign in to comment.