Skip to content

Commit

Permalink
Develop (#2)
Browse files Browse the repository at this point in the history
* update naming

* update format description

* update readme

* add circle config

* remove fec_enabled field

* update CI
  • Loading branch information
mat-hek authored May 19, 2020
1 parent 331a818 commit 34fb7ff
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 13 deletions.
15 changes: 15 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2.0
jobs:
build:
docker:
- image: membrane/membrane:latest
environment:
MIX_ENV: test

working_directory: ~/app

steps:
- checkout
- run: mix deps.get
- run: mix format --check-formatted
- run: mix test
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Membrane Multimedia Framework: Opus Audio Format Description
# Membrane OPUS Format

[![Hex.pm](https://img.shields.io/hexpm/v/membrane_opus_format.svg)](https://hex.pm/packages/membrane_opus_format)
[![API Docs](https://img.shields.io/badge/api-docs-yellow.svg?style=flat)](https://hexdocs.pm/membrane_opus_format/)
Expand Down
17 changes: 5 additions & 12 deletions lib/membrane_opus/description.ex → lib/membrane_opus.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
defmodule Membrane.Opus.Description do
defmodule Membrane.Opus do
@moduledoc """
This module implements struct describing an Opus-encoded audio stream.
Expand All @@ -8,31 +8,24 @@ defmodule Membrane.Opus.Description do
@typedoc """
Number of channels transmitted in the stream.
"""
@type channels_t :: 1 | 2

@typedoc """
Enable/disable in-band _Forward Error Correction_ (FEC).
"""
@type fec_enabled_t :: boolean
@type channels_t :: 1 | 2 | nil

@typedoc """
Bitrate used to encode the stream in `bit/s`.
Opus supports all bitrates from `6 kbit/s` to `510 kbit/s`,
so this value has to be in range `6144` to `522240`.
"""
@type bitrate_t :: non_neg_integer
@type bitrate_t :: non_neg_integer | nil

@type t :: %__MODULE__{
bitrate: bitrate_t,
channels: channels_t,
fec_enabled: fec_enabled_t
channels: channels_t
}

@enforce_keys [
:bitrate,
:channels,
:fec_enabled
:channels
]
defstruct @enforce_keys
end

0 comments on commit 34fb7ff

Please sign in to comment.