feat: basic ffi server to support other languages (#34)

* wip

* wip

* wip

* wip

not a fan of the way I do handles ..

* errors and async semantic

* fix example
This commit is contained in:
Théo Monnom
2023-01-25 00:09:19 +01:00
committed by GitHub
parent 84d2f234f5
commit 1610f86316
24 changed files with 1231 additions and 66 deletions
+13
View File
@@ -15,3 +15,16 @@ pub mod yuv_helper;
pub const MEDIA_TYPE_VIDEO: &str = "video";
pub const MEDIA_TYPE_AUDIO: &str = "audio";
pub const MEDIA_TYPE_DATA: &str = "data";
macro_rules! impl_thread_safety {
($obj:ty, Send) => {
unsafe impl Send for $obj {}
};
($obj:ty, Send + Sync) => {
unsafe impl Send for $obj {}
unsafe impl Sync for $obj {}
};
}
pub(crate) use impl_thread_safety;