Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ It is a part of [Membrane Multimedia Framework](https://membraneframework.org).
Add the following line to your `deps` in `mix.exs`. Then, run `mix deps.get`.

```elixir
{:membrane_mp3_lame_plugin, "~> 0.18.2"}
{:membrane_mp3_lame_plugin, "~> 0.18.3"}
```

This package depends on the [Lame encoder library](http://lame.sourceforge.net) library. The precompiled builds will be pulled and linked automatically. However, should there be any problems, consider installing it manually.
Expand Down
8 changes: 4 additions & 4 deletions lib/membrane_mp3_lame/encoder.ex
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ defmodule Membrane.MP3.Lame.Encoder do

alias __MODULE__.Native
alias Membrane.Buffer
alias Membrane.Caps.Audio.MPEG
alias Membrane.MPEGAudio
alias Membrane.RawAudio

@samples_per_frame 1152
@channels 2
@sample_size 4

def_output_pad :output,
accepted_format: %MPEG{channels: 2, sample_rate: 44_100, layer: :layer3, version: :v1}
accepted_format: %MPEGAudio{channels: 2, sample_rate: 44_100, layer: :layer3, version: :v1}

def_input_pad :input,
accepted_format:
Expand Down Expand Up @@ -62,7 +62,7 @@ defmodule Membrane.MP3.Lame.Encoder do
native: nil,
queue: <<>>,
options: options,
raw_frame_size: MPEG.samples_per_frame(:v1, :layer3) * @sample_size * @channels,
raw_frame_size: MPEGAudio.samples_per_frame(:v1, :layer3) * @sample_size * @channels,
next_frame_pts: nil
}}
end
Expand All @@ -86,7 +86,7 @@ defmodule Membrane.MP3.Lame.Encoder do

@impl true
def handle_playing(_ctx, state) do
stream_format = %MPEG{
stream_format = %MPEGAudio{
channels: 2,
sample_rate: 44_100,
version: :v1,
Expand Down
8 changes: 3 additions & 5 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Membrane.MP3.Lame.Mixfile do
use Mix.Project

@version "0.18.2"
@version "0.18.3"
@github_url "https://github.com/membraneframework/membrane_mp3_lame_plugin"

def project do
Expand All @@ -18,8 +18,7 @@ defmodule Membrane.MP3.Lame.Mixfile do
name: "Membrane MP3 Lame Plugin",
source_url: @github_url,
homepage_url: "https://membraneframework.org",
docs: docs(),
preferred_cli_env: [espec: :test, format: :test]
docs: docs()
]
end

Expand Down Expand Up @@ -71,12 +70,11 @@ defmodule Membrane.MP3.Lame.Mixfile do
[
{:membrane_core, "~> 1.0"},
{:membrane_raw_audio_format, "~> 0.12.0"},
{:membrane_caps_audio_mpeg, "~> 0.2.0"},
{:membrane_mpegaudio_format, "~> 0.3.0"},
{:membrane_common_c, "~> 0.16.0"},
{:bunch, "~> 1.0"},
{:bundlex, "~> 1.2"},
{:membrane_precompiled_dependency_provider, "~> 0.1.0"},
{:espec, "~> 1.7", only: [:dev, :test]},
{:membrane_file_plugin, "~> 0.16.0", only: :test},
{:membrane_raw_audio_parser_plugin, "~> 0.4.0", only: :test},
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false},
Expand Down
Loading