finish proto of livekit-ffi (#36)

* ffi req

* handle req_id

* remaining room events

* fix

* Update ffi.proto

* use sid instead of info

* state -> stream_state

* "s"

* participant is optional on data received

* add ReleaseHandleRequest

* Update ffi.proto

* add DataPacketKind

* VideoSinkInfo

* append info

It looks nicer on the FFI languages

* wip

* keep it simple

* Update ffi.proto

* update server to latest proto

* to_i420

* i420_to_abgr

* to_argb

* add publications to ParticipantInfo

It'll be used when we join a Room

* cleanup + DisposeRequest

* fix compilation

* send the whole buffer info with to_i420
This commit is contained in:
Théo Monnom
2023-02-06 00:57:43 +01:00
committed by GitHub
parent 1610f86316
commit e023b34fd1
14 changed files with 832 additions and 239 deletions
+39
View File
@@ -3,6 +3,32 @@ pub mod ffi {
unsafe extern "C++" {
include!("livekit/yuv_helper.h");
unsafe fn i420_to_argb(
src_y: *const u8,
src_stride_y: i32,
src_u: *const u8,
src_stride_u: i32,
src_v: *const u8,
src_stride_v: i32,
dst_argb: *mut u8,
dst_stride_argb: i32,
width: i32,
height: i32,
);
unsafe fn i420_to_bgra(
src_y: *const u8,
src_stride_y: i32,
src_u: *const u8,
src_stride_u: i32,
src_v: *const u8,
src_stride_v: i32,
dst_bgra: *mut u8,
dst_stride_bgra: i32,
width: i32,
height: i32,
);
unsafe fn i420_to_abgr(
src_y: *const u8,
src_stride_y: i32,
@@ -15,5 +41,18 @@ pub mod ffi {
width: i32,
height: i32,
);
unsafe fn i420_to_rgba(
src_y: *const u8,
src_stride_y: i32,
src_u: *const u8,
src_stride_u: i32,
src_v: *const u8,
src_stride_v: i32,
dst_rgba: *mut u8,
dst_stride_rgba: i32,
width: i32,
height: i32,
);
}
}