pub struct PassthroughTranscoderFactory { /* private fields */ }Expand description
Factory that builds a PassthroughTranscoder for each
video-track source stream a crate::TranscodeRunner sees.
Constructed with a single RenditionSpec; register N
factory instances on the runner (typically three, one per
rung of RenditionSpec::default_ladder) to scaffold an
ABR ladder’s observability without the gstreamer dep.
Implementations§
Source§impl PassthroughTranscoderFactory
impl PassthroughTranscoderFactory
Sourcepub fn new(rendition: RenditionSpec) -> Self
pub fn new(rendition: RenditionSpec) -> Self
Build a factory for the supplied rendition.
Trait Implementations§
Source§impl TranscoderFactory for PassthroughTranscoderFactory
impl TranscoderFactory for PassthroughTranscoderFactory
Source§fn name(&self) -> &str
fn name(&self) -> &str
Stable identifier used in metric labels and logs (e.g.
"passthrough", "x264", "nvenc"). Pick something
short, lowercase, snake_case.Source§fn rendition(&self) -> &RenditionSpec
fn rendition(&self) -> &RenditionSpec
Target rendition this factory produces. Consumed by the
crate::TranscodeRunner when building the
TranscoderContext.Source§fn build(&self, ctx: &TranscoderContext) -> Option<Box<dyn Transcoder>>
fn build(&self, ctx: &TranscoderContext) -> Option<Box<dyn Transcoder>>
Build a fresh transcoder for
ctx, or return None to
skip this (broadcast, track) entirely. Returning None
is the correct path when the factory wants to opt out –
e.g. a video transcoder returning None for an audio
track, or a factory targeting only source broadcasts (not
already-transcoded renditions).Auto Trait Implementations§
impl Freeze for PassthroughTranscoderFactory
impl RefUnwindSafe for PassthroughTranscoderFactory
impl Send for PassthroughTranscoderFactory
impl Sync for PassthroughTranscoderFactory
impl Unpin for PassthroughTranscoderFactory
impl UnsafeUnpin for PassthroughTranscoderFactory
impl UnwindSafe for PassthroughTranscoderFactory
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