diff --git a/livekit-ffi/protocol/ffi.proto b/livekit-ffi/protocol/ffi.proto index 4279cab2..8c715bbf 100644 --- a/livekit-ffi/protocol/ffi.proto +++ b/livekit-ffi/protocol/ffi.proto @@ -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; + } } @@ -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; } } diff --git a/livekit-ffi/src/livekit.proto.rs b/livekit-ffi/src/livekit.proto.rs index d455652e..ee6f7053 100644 --- a/livekit-ffi/src/livekit.proto.rs +++ b/livekit-ffi/src/livekit.proto.rs @@ -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, } /// Nested message and enum types in `FfiRequest`. @@ -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, } /// Nested message and enum types in `FfiResponse`. @@ -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. diff --git a/livekit-ffi/src/server/requests.rs b/livekit-ffi/src/server/requests.rs index 274a9ac0..c2831801 100644 --- a/livekit-ffi/src/server/requests.rs +++ b/livekit-ffi/src/server/requests.rs @@ -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)