pub struct TranscodeGraph { /* private fields */ }Expand description
A directed acyclic graph of pipeline stages for a transcode job.
Implementations§
Source§impl TranscodeGraph
impl TranscodeGraph
Sourcepub fn add_stage(&mut self, stage: GraphStage) -> u32
pub fn add_stage(&mut self, stage: GraphStage) -> u32
Add a stage to the graph and return its assigned id.
Sourcepub fn connect(&mut self, from_id: u32, to_id: u32) -> bool
pub fn connect(&mut self, from_id: u32, to_id: u32) -> bool
Connect two stages by their ids. Returns false if either id is unknown.
Sourcepub fn stage_count(&self) -> usize
pub fn stage_count(&self) -> usize
Return the total number of stages in the graph.
Sourcepub fn active_stage_count(&self) -> usize
pub fn active_stage_count(&self) -> usize
Return the number of active (enabled) stages.
Sourcepub fn has_transcode_stage(&self) -> bool
pub fn has_transcode_stage(&self) -> bool
Return true if the graph contains at least one transcode-class stage.
Sourcepub fn is_fully_passthrough(&self) -> bool
pub fn is_fully_passthrough(&self) -> bool
Return true if every enabled stage is a passthrough or analyse stage.
Sourcepub fn total_cost(&self) -> u32
pub fn total_cost(&self) -> u32
Estimate total processing cost by summing all enabled stage costs.
Sourcepub fn stage_labels(&self) -> Vec<&str>
pub fn stage_labels(&self) -> Vec<&str>
Return a list of stage labels in insertion order.
Sourcepub fn find_stage(&self, id: u32) -> Option<&GraphStage>
pub fn find_stage(&self, id: u32) -> Option<&GraphStage>
Find a stage by id.
Sourcepub fn remove_stage(&mut self, id: u32) -> bool
pub fn remove_stage(&mut self, id: u32) -> bool
Remove a stage by id. Also removes associated edges.
Trait Implementations§
Source§impl Clone for TranscodeGraph
impl Clone for TranscodeGraph
Source§fn clone(&self) -> TranscodeGraph
fn clone(&self) -> TranscodeGraph
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TranscodeGraph
impl Debug for TranscodeGraph
Source§impl Default for TranscodeGraph
impl Default for TranscodeGraph
Source§fn default() -> TranscodeGraph
fn default() -> TranscodeGraph
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TranscodeGraph
impl<'de> Deserialize<'de> for TranscodeGraph
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TranscodeGraph
impl RefUnwindSafe for TranscodeGraph
impl Send for TranscodeGraph
impl Sync for TranscodeGraph
impl Unpin for TranscodeGraph
impl UnsafeUnpin for TranscodeGraph
impl UnwindSafe for TranscodeGraph
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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