View Source Vtc.Source.Seconds protocol (vtc v0.17.5)
Protocol which types can implement to be passed as the main value of
Framestamp.with_seconds/3
.
implementations
Implementations
Out of the box, this protocol is implemented for the following types:
Integer
Float
Ratio
String
- runtime ("01:00:00.0")
- decimal ("3600.0")
Vtc.Source.Seconds.RuntimeStr
Vtc.Source.Seconds.PremiereTicks
Link to this section Summary
Functions
Returns the value as a rational, real-world seconds value.
Link to this section Types
@type result() :: {:ok, Ratio.t()} | {:error, Vtc.Framestamp.ParseError.t()}
Result type of seconds/2
.
@type t() :: term()
Link to this section Functions
@spec seconds(t(), Vtc.Framerate.t()) :: result()
Returns the value as a rational, real-world seconds value.
arguments
Arguments
value: The source value.
rate: The framerate of the framestamp being parsed.
returns
Returns
A result tuple with a rational representation of the seconds value using Ratio
on
success.