Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from membraneframework/metadata
Frame Metadata
- Loading branch information
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
defmodule Membrane.Caps.Audio.FLAC.FrameMetadata do | ||
@moduledoc """ | ||
Module defining metadata struct for FLAC buffers with audio frames. | ||
Based on contents of [frame header](https://xiph.org/flac/format.html#frame_header) | ||
""" | ||
|
||
@type t() :: %__MODULE__{ | ||
channels: 1..8, | ||
channel_mode: :independent | :left_side | :right_side | :mid_side, | ||
sample_rate: pos_integer, | ||
sample_size: 4 | 8 | 12 | 16 | 20 | 24 | 32, | ||
samples: pos_integer, | ||
starting_sample_number: non_neg_integer() | ||
} | ||
|
||
@enforce_keys [ | ||
:channels, | ||
:channel_mode, | ||
:sample_rate, | ||
:sample_size, | ||
:samples, | ||
:starting_sample_number | ||
] | ||
|
||
defstruct @enforce_keys | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters