pub struct TranscodeSessionManager { /* private fields */ }Expand description
Manages a collection of transcode sessions.
Implementations§
Source§impl TranscodeSessionManager
impl TranscodeSessionManager
Sourcepub fn create(
&mut self,
input_path: impl Into<String>,
output_path: impl Into<String>,
total_duration_ms: u64,
) -> u64
pub fn create( &mut self, input_path: impl Into<String>, output_path: impl Into<String>, total_duration_ms: u64, ) -> u64
Creates a new session and registers it. Returns the session ID.
Sourcepub fn get(&self, id: u64) -> Option<&TranscodeSession>
pub fn get(&self, id: u64) -> Option<&TranscodeSession>
Returns a reference to the session with the given ID, if it exists.
Sourcepub fn get_mut(&mut self, id: u64) -> Option<&mut TranscodeSession>
pub fn get_mut(&mut self, id: u64) -> Option<&mut TranscodeSession>
Returns a mutable reference to the session with the given ID.
Sourcepub fn active_count(&self) -> usize
pub fn active_count(&self) -> usize
Returns the number of currently active (Running) sessions.
Sourcepub fn total_count(&self) -> usize
pub fn total_count(&self) -> usize
Returns the total number of sessions tracked.
Sourcepub fn sessions_in_state(&self, state: SessionState) -> Vec<u64>
pub fn sessions_in_state(&self, state: SessionState) -> Vec<u64>
Returns IDs of all sessions in a given state.
Trait Implementations§
Source§impl Debug for TranscodeSessionManager
impl Debug for TranscodeSessionManager
Source§impl Default for TranscodeSessionManager
impl Default for TranscodeSessionManager
Source§fn default() -> TranscodeSessionManager
fn default() -> TranscodeSessionManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TranscodeSessionManager
impl RefUnwindSafe for TranscodeSessionManager
impl Send for TranscodeSessionManager
impl Sync for TranscodeSessionManager
impl Unpin for TranscodeSessionManager
impl UnsafeUnpin for TranscodeSessionManager
impl UnwindSafe for TranscodeSessionManager
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more