Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #2

Merged
merged 6 commits into from
May 19, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/bionic-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
14 changes: 7 additions & 7 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,31 @@ defmodule Membrane.Opus.Description do
@typedoc """
Number of channels transmitted in the stream.
"""
@type channels_t :: 1 | 2
@type channels_t :: 1 | 2 | nil
bblaszkow06 marked this conversation as resolved.
Show resolved Hide resolved

@typedoc """
Enable/disable in-band _Forward Error Correction_ (FEC).
Determines whether the stream is equipped with in-band _Forward Error Correction_ (FEC).
"""
@type fec_enabled_t :: boolean
@type fec_available_t :: boolean | nil
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this actually needed? I haven't found a way to detect that FEC is enabled, so for RTP received streams we'll never know and when encoding it is enough to set it as encoder option


@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
fec_available: fec_available_t
}

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