View Source Vtc.Source.Frames protocol (vtc v0.4.0)
Protocol which types can implement to be passed as the main value of
Timecode.with_frames/2
.
implementations
Implementations
Out of the box, this protocol is implemented for the following types:
Link to this section Summary
Functions
Returns the value as a frame count.
Link to this section Types
@type result() :: {:ok, integer()} | {:error, Vtc.Timecode.ParseError.t()}
Result type of frames/2
.
@type t() :: term()
Link to this section Functions
@spec frames(t(), Vtc.Framerate.t()) :: result()
Returns the value as a frame count.
Arguments
value: The source value.
rate: The framerate of the timecode being parsed.
Returns
A result tuple with an integer value representing the frame count on success.