Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated protocol to v1.9.9 #311

Merged
merged 3 commits into from
Feb 28, 2024
Merged
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: 7 additions & 2 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,14 @@ name: Builds
on:
push:
branches: ["main"]
paths:
- livekit/**
- libwebrtc/**
pull_request:
branches: ["main"]
paths:
- livekit/**
- libwebrtc/**

env:
CARGO_TERM_COLOR: always
Expand Down Expand Up @@ -53,11 +59,10 @@ jobs:
- os: ubuntu-20.04
target: x86_64-linux-android


name: Build (${{ matrix.target }})
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/gen-protocol.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Copyright 2023 LiveKit, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Generate protocol

on:
pull_request:
branches: ["main"]
paths:
- livekit-protocol/**

env:
CARGO_TERM_COLOR: always
PACKAGE_DIR: ./livekit-protocol

jobs:
generate_protobuf:
runs-on: ubuntu-latest
name: Generating protobuf

defaults:
run:
working-directory: ${{ env.PACKAGE_DIR }}

steps:
- uses: actions/checkout@v4
with:
submodules: true
ref: ${{ github.event.pull_request.head.ref }}

- uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Install Protoc
uses: arduino/setup-protoc@v2
with:
version: "25.2"
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install prost generators
run: cargo install protoc-gen-prost protoc-gen-prost-serde

- name: generate python stubs
run: ./generate_proto.sh

- name: Add changes
uses: EndBug/add-and-commit@v9
with:
add: '["livekit-protocol/"]'
default_author: github_actions
message: generated protobuf
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion livekit-protocol/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "livekit-protocol"
version = "0.3.0"
version = "0.3.1"
edition = "2021"
license = "Apache-2.0"
description = "Livekit protocol and utilities for the Rust SDK"
Expand Down
2 changes: 1 addition & 1 deletion livekit-protocol/protocol
Submodule protocol updated 54 files
+1 −1 .github/workflows/buildtest.yaml
+7 −0 auth/accesstoken.go
+20 −0 auth/accesstoken_test.go
+30 −0 auth/grants.go
+18 −0 auth/grants_test.go
+2 −0 egress/token.go
+8 −8 go.mod
+17 −19 go.sum
+5 −2 ingress/token.go
+266 −232 livekit/livekit_ingress.pb.go
+89 −88 livekit/livekit_ingress.twirp.go
+276 −914 livekit/livekit_internal.pb.go
+29 −21 livekit/livekit_models.pb.go
+461 −328 livekit/livekit_rtc.pb.go
+85 −455 livekit/livekit_sip.pb.go
+61 −906 livekit/livekit_sip.twirp.go
+7 −1 livekit_ingress.proto
+0 −46 livekit_internal.proto
+2 −0 livekit_models.proto
+16 −1 livekit_rtc.proto
+7 −36 livekit_sip.proto
+3 −2 magefile.go
+2 −3 psrpc/logging.go
+23 −14 redis/redis.go
+18 −17 rpc/egress.pb.go
+1 −0 rpc/egress.proto
+51 −48 rpc/egress.psrpc.go
+24 −18 rpc/egress_client.go
+84 −65 rpc/ingress.pb.go
+2 −0 rpc/ingress.proto
+47 −39 rpc/ingress.psrpc.go
+259 −153 rpc/io.pb.go
+13 −2 rpc/io.proto
+64 −54 rpc/io.psrpc.go
+168 −0 rpc/keepalive.pb.go
+39 −0 rpc/keepalive.proto
+131 −0 rpc/keepalive.psrpc.go
+14 −0 rpc/participant.pb.go
+14 −0 rpc/participant.proto
+1 −1 rpc/participant.psrpc.go
+14 −0 rpc/room.pb.go
+14 −0 rpc/room.proto
+1 −1 rpc/room.psrpc.go
+259 −0 rpc/rpcfakes/fake_keepalive_pub_sub.go
+92 −197 rpc/sip.pb.go
+10 −14 rpc/sip.proto
+38 −58 rpc/sip.psrpc.go
+20 −1 rpc/typed_api.go
+24 −7 sip/sip.go
+39 −0 sip/token.go
+1 −1 utils/cpu_darwin.go
+43 −0 utils/cpu_null.go
+0 −1 utils/id.go
+75 −0 xtls/tls.go
64 changes: 63 additions & 1 deletion livekit-protocol/src/livekit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -929,6 +929,8 @@ pub enum DisconnectReason {
RoomDeleted = 5,
StateMismatch = 6,
JoinFailure = 7,
Migration = 8,
SignalClose = 9,
}
impl DisconnectReason {
/// String value of the enum field names used in the ProtoBuf definition.
Expand All @@ -945,6 +947,8 @@ impl DisconnectReason {
DisconnectReason::RoomDeleted => "ROOM_DELETED",
DisconnectReason::StateMismatch => "STATE_MISMATCH",
DisconnectReason::JoinFailure => "JOIN_FAILURE",
DisconnectReason::Migration => "MIGRATION",
DisconnectReason::SignalClose => "SIGNAL_CLOSE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
Expand All @@ -958,6 +962,8 @@ impl DisconnectReason {
"ROOM_DELETED" => Some(Self::RoomDeleted),
"STATE_MISMATCH" => Some(Self::StateMismatch),
"JOIN_FAILURE" => Some(Self::JoinFailure),
"MIGRATION" => Some(Self::Migration),
"SIGNAL_CLOSE" => Some(Self::SignalClose),
_ => None,
}
}
Expand Down Expand Up @@ -2295,10 +2301,51 @@ pub struct UpdateTrackSettings {
pub struct LeaveRequest {
/// sent when server initiates the disconnect due to server-restart
/// indicates clients should attempt full-reconnect sequence
/// NOTE: `can_reconnect` obsoleted by `action` starting in protocol version 13
#[prost(bool, tag="1")]
pub can_reconnect: bool,
#[prost(enumeration="DisconnectReason", tag="2")]
pub reason: i32,
#[prost(enumeration="leave_request::Action", tag="3")]
pub action: i32,
#[prost(message, optional, tag="4")]
pub regions: ::core::option::Option<RegionSettings>,
}
/// Nested message and enum types in `LeaveRequest`.
pub mod leave_request {
/// indicates action clients should take on receiving this message
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Action {
/// should disconnect
Disconnect = 0,
/// should attempt a resume with `reconnect=1` in join URL
Resume = 1,
/// should attempt a reconnect, i. e. no `reconnect=1`
Reconnect = 2,
}
impl Action {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Action::Disconnect => "DISCONNECT",
Action::Resume => "RESUME",
Action::Reconnect => "RECONNECT",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DISCONNECT" => Some(Self::Disconnect),
"RESUME" => Some(Self::Resume),
"RECONNECT" => Some(Self::Reconnect),
_ => None,
}
}
}
}
/// message to indicate published video track dimensions are changing
#[allow(clippy::derive_partial_eq_without_eq)]
Expand Down Expand Up @@ -2443,6 +2490,8 @@ pub struct SyncState {
/// last received server side offer before reconnecting
#[prost(message, optional, tag="5")]
pub offer: ::core::option::Option<SessionDescription>,
#[prost(string, repeated, tag="6")]
pub track_sids_disabled: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
Expand All @@ -2457,7 +2506,7 @@ pub struct DataChannelInfo {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SimulateScenario {
#[prost(oneof="simulate_scenario::Scenario", tags="1, 2, 3, 4, 5, 6")]
#[prost(oneof="simulate_scenario::Scenario", tags="1, 2, 3, 4, 5, 6, 7, 8")]
pub scenario: ::core::option::Option<simulate_scenario::Scenario>,
}
/// Nested message and enum types in `SimulateScenario`.
Expand All @@ -2484,6 +2533,12 @@ pub mod simulate_scenario {
/// when zero, clears artificial bandwidth limit
#[prost(int64, tag="6")]
SubscriberBandwidth(i64),
/// disconnect signal on resume
#[prost(bool, tag="7")]
DisconnectSignalOnResume(bool),
/// disconnect signal on resume before sending any messages from server
#[prost(bool, tag="8")]
DisconnectSignalOnResumeNoMessages(bool),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
Expand Down Expand Up @@ -2814,6 +2869,9 @@ pub struct CreateIngressRequest {
/// name of publishing participant (used for display only)
#[prost(string, tag="5")]
pub participant_name: ::prost::alloc::string::String,
/// metadata associated with the publishing participant
#[prost(string, tag="10")]
pub participant_metadata: ::prost::alloc::string::String,
/// whether to pass through the incoming media without transcoding, only compatible with some input types
#[prost(bool, tag="8")]
pub bypass_transcoding: bool,
Expand Down Expand Up @@ -2918,6 +2976,8 @@ pub struct IngressInfo {
pub participant_identity: ::prost::alloc::string::String,
#[prost(string, tag="10")]
pub participant_name: ::prost::alloc::string::String,
#[prost(string, tag="14")]
pub participant_metadata: ::prost::alloc::string::String,
#[prost(bool, tag="11")]
pub reusable: bool,
/// Description of error/stream non compliance and debug info for publisher otherwise (received bitrate, resolution, bandwidth)
Expand Down Expand Up @@ -3025,6 +3085,8 @@ pub struct UpdateIngressRequest {
pub participant_identity: ::prost::alloc::string::String,
#[prost(string, tag="5")]
pub participant_name: ::prost::alloc::string::String,
#[prost(string, tag="9")]
pub participant_metadata: ::prost::alloc::string::String,
#[prost(bool, optional, tag="8")]
pub bypass_transcoding: ::core::option::Option<bool>,
#[prost(message, optional, tag="6")]
Expand Down
Loading
Loading