pub struct OggSink {
path: String,
clients: Arc<Mutex<Vec<Client>>>,
shutdown: Arc<AtomicBool>,
serial: u32,
seq: u32,
}Expand description
One Ogg Opus stream served to every consumer of a Unix socket.
Fields§
§path: String§clients: Arc<Mutex<Vec<Client>>>§shutdown: Arc<AtomicBool>§serial: u32§seq: u32Implementations§
Source§impl OggSink
impl OggSink
Sourcepub fn bind(path: &str, head: &OpusHead) -> Result<Self, String>
pub fn bind(path: &str, head: &OpusHead) -> Result<Self, String>
Bind the socket at path, or say why it cannot be bound. A file there that another
account owns is left alone and refused: in a shared directory it is that account’s
listener, and a reader of this stream would reach it.
Sourcepub fn write_packet(&mut self, packet: &[u8], granule: u64)
pub fn write_packet(&mut self, packet: &[u8], granule: u64)
Send one packet as a page; granule is the 48 kHz sample count at its end.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OggSink
impl RefUnwindSafe for OggSink
impl Send for OggSink
impl Sync for OggSink
impl Unpin for OggSink
impl UnsafeUnpin for OggSink
impl UnwindSafe for OggSink
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more