pub struct MediaStreamingService { /* private fields */ }Implementations§
Source§impl MediaStreamingService
impl MediaStreamingService
pub fn new(buffer_capacity: usize) -> Self
Sourcepub async fn start_file_stream(
&self,
file_path: PathBuf,
stream_config: MediaStream,
) -> RS2Stream<MediaChunk>
pub async fn start_file_stream( &self, file_path: PathBuf, stream_config: MediaStream, ) -> RS2Stream<MediaChunk>
Start streaming from a file
Sourcepub async fn start_live_stream(
&self,
stream_config: MediaStream,
) -> RS2Stream<MediaChunk>
pub async fn start_live_stream( &self, stream_config: MediaStream, ) -> RS2Stream<MediaChunk>
Start streaming from live input (camera, microphone, etc.)
Sourcepub fn determine_chunk_type(&self, sequence: u64) -> ChunkType
pub fn determine_chunk_type(&self, sequence: u64) -> ChunkType
Determine chunk type based on sequence
Sourcepub fn determine_priority(&self, sequence: u64) -> MediaPriority
pub fn determine_priority(&self, sequence: u64) -> MediaPriority
Determine priority based on sequence and chunk type
Sourcepub fn get_chunk_stream(
&self,
) -> impl Stream<Item = MediaChunk> + Send + 'static
pub fn get_chunk_stream( &self, ) -> impl Stream<Item = MediaChunk> + Send + 'static
Get stream from priority queue
Sourcepub async fn get_metrics(&self) -> StreamMetrics
pub async fn get_metrics(&self) -> StreamMetrics
Get current metrics with updated buffer utilization
Sourcepub fn get_metrics_stream(&self) -> RS2Stream<StreamMetrics>
pub fn get_metrics_stream(&self) -> RS2Stream<StreamMetrics>
Create a metrics monitoring stream
Auto Trait Implementations§
impl Freeze for MediaStreamingService
impl !RefUnwindSafe for MediaStreamingService
impl Send for MediaStreamingService
impl Sync for MediaStreamingService
impl Unpin for MediaStreamingService
impl !UnwindSafe for MediaStreamingService
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