#
View Source Vtc.Source.Frames protocol (vtc v0.13.15)

Protocol which types can implement to be passed as the main value of `Framestamp.with_frames/2`.

##

implementations

Implementations

Out of the box, this protocol is implemented for the following types:

- `Integer`

- `String` & `BitString`

  - timecode ("01:00:00:00")

  - integer ("86400")

  - Feet+Frames ("5400+00")

- SMPTETimecodeStr

- FeetAndFrames

# Link to this section Summary

## Types

result()

Result type of `frames/2`.

t()

## Functions

frames(value, rate)

Returns the value as a frame count.

# Link to this section Types

Link to this type

# result()

View Source

    @type result() :: {:ok, integer()} | {:error, Vtc.Framestamp.ParseError.t()}

Result type of `frames/2`.

Link to this type

# t()

View Source

    @type t() :: term()

# Link to this section Functions

Link to this function

# frames(value, rate)

View Source

    @spec frames(t(), Vtc.Framerate.t()) :: result()

Returns the value as a frame count.

# Arguments

- value: The source value.

- rate: The framerate of the framestamp being parsed.

# Returns

A result tuple with an integer value representing the frame count on success.