Skip to content

Commit

Permalink
update ffi
Browse files Browse the repository at this point in the history
  • Loading branch information
theomonnom committed Dec 8, 2023
1 parent 9e40599 commit fd35cbf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions livekit-ffi/protocol/video_frame.proto
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ enum VideoCodec {
VP8 = 0;
H264 = 1;
AV1 = 2;
VP9 = 3;
}

enum VideoRotation {
Expand Down
1 change: 1 addition & 0 deletions livekit-ffi/src/conversion/video_frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ impl From<proto::VideoCodec> for VideoCodec {
proto::VideoCodec::Vp8 => Self::VP8,
proto::VideoCodec::H264 => Self::H264,
proto::VideoCodec::Av1 => Self::AV1,
proto::VideoCodec::Vp9 => Self::VP9,
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions livekit-ffi/src/livekit.proto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1843,6 +1843,7 @@ pub enum VideoCodec {
Vp8 = 0,
H264 = 1,
Av1 = 2,
Vp9 = 3,
}
impl VideoCodec {
/// String value of the enum field names used in the ProtoBuf definition.
Expand All @@ -1854,6 +1855,7 @@ impl VideoCodec {
VideoCodec::Vp8 => "VP8",
VideoCodec::H264 => "H264",
VideoCodec::Av1 => "AV1",
VideoCodec::Vp9 => "VP9",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
Expand All @@ -1862,6 +1864,7 @@ impl VideoCodec {
"VP8" => Some(Self::Vp8),
"H264" => Some(Self::H264),
"AV1" => Some(Self::Av1),
"VP9" => Some(Self::Vp9),
_ => None,
}
}
Expand Down

0 comments on commit fd35cbf

Please sign in to comment.