pub struct TimecodeFilter { /* private fields */ }Expand description
Timecode burn-in filter.
This filter overlays timecode and metadata information onto video frames.
Implementations§
Source§impl TimecodeFilter
impl TimecodeFilter
Sourcepub fn new(
id: NodeId,
name: impl Into<String>,
config: TimecodeConfig,
font_data: Vec<u8>,
) -> GraphResult<Self>
pub fn new( id: NodeId, name: impl Into<String>, config: TimecodeConfig, font_data: Vec<u8>, ) -> GraphResult<Self>
Create a new timecode filter with a provided font.
§Errors
Returns error if the font data is invalid.
Sourcepub fn from_font_file(
id: NodeId,
name: impl Into<String>,
config: TimecodeConfig,
font_path: &str,
) -> GraphResult<Self>
pub fn from_font_file( id: NodeId, name: impl Into<String>, config: TimecodeConfig, font_path: &str, ) -> GraphResult<Self>
Load a font from a file path and create the filter.
§Errors
Returns error if the font file cannot be read or is invalid.
Sourcepub fn config(&self) -> &TimecodeConfig
pub fn config(&self) -> &TimecodeConfig
Get the current configuration.
Sourcepub fn set_config(&mut self, config: TimecodeConfig)
pub fn set_config(&mut self, config: TimecodeConfig)
Update the configuration.
Sourcepub fn set_context(&mut self, context: FrameContext)
pub fn set_context(&mut self, context: FrameContext)
Update the frame context.
Trait Implementations§
Source§impl Node for TimecodeFilter
impl Node for TimecodeFilter
Source§fn outputs(&self) -> &[OutputPort]
fn outputs(&self) -> &[OutputPort]
Get the node’s output ports.
Source§fn process(
&mut self,
input: Option<FilterFrame>,
) -> GraphResult<Option<FilterFrame>>
fn process( &mut self, input: Option<FilterFrame>, ) -> GraphResult<Option<FilterFrame>>
Process available input and produce output. Read more
Source§fn reset(&mut self) -> GraphResult<()>
fn reset(&mut self) -> GraphResult<()>
Reset the node to initial state.
Source§fn initialize(&mut self) -> GraphResult<()>
fn initialize(&mut self) -> GraphResult<()>
Initialize the node before processing starts.
Source§fn flush(&mut self) -> GraphResult<Vec<FilterFrame>>
fn flush(&mut self) -> GraphResult<Vec<FilterFrame>>
Flush any buffered data.
Source§fn output_port(&self, id: PortId) -> Option<&OutputPort>
fn output_port(&self, id: PortId) -> Option<&OutputPort>
Get output port by ID.
Source§fn accepts_input(&self, port_type: PortType) -> bool
fn accepts_input(&self, port_type: PortType) -> bool
Check if node accepts the given port type as input.
Source§fn produces_output(&self, port_type: PortType) -> bool
fn produces_output(&self, port_type: PortType) -> bool
Check if node produces the given port type as output.
Auto Trait Implementations§
impl Freeze for TimecodeFilter
impl RefUnwindSafe for TimecodeFilter
impl Send for TimecodeFilter
impl Sync for TimecodeFilter
impl Unpin for TimecodeFilter
impl UnsafeUnpin for TimecodeFilter
impl UnwindSafe for TimecodeFilter
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> 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