feat: audio support (#45)

- Receive/Send audio frames
- LocalAudioTrack
This commit is contained in:
Théo Monnom
2023-03-19 21:58:20 +01:00
committed by GitHub
parent cad6d36201
commit 64c0705916
30 changed files with 1207 additions and 69 deletions
@@ -63,16 +63,22 @@ impl PeerConnectionFactory {
pub mod native {
use super::PeerConnectionFactory;
use crate::media_stream::RtcVideoTrack;
use crate::audio_source::native::NativeAudioSource;
use crate::media_stream::{RtcAudioTrack, RtcVideoTrack};
use crate::video_source::native::NativeVideoSource;
pub trait PeerConnectionFactoryExt {
fn create_video_track(&self, label: &str, source: NativeVideoSource) -> RtcVideoTrack;
fn create_audio_track(&self, label: &str, source: NativeAudioSource) -> RtcAudioTrack;
}
impl PeerConnectionFactoryExt for PeerConnectionFactory {
fn create_video_track(&self, label: &str, source: NativeVideoSource) -> RtcVideoTrack {
self.handle.create_video_track(label, source)
}
fn create_audio_track(&self, label: &str, source: NativeAudioSource) -> RtcAudioTrack {
self.handle.create_audio_track(label, source)
}
}
}