Skip to content

Commit cd0f73e

Browse files
authored
Merge pull request #4 from membraneframework/minor-bug-fixes
Minor improvements, release v0.1.1
2 parents 3643708 + 1a30ccd commit cd0f73e

File tree

4 files changed

+24
-5
lines changed

4 files changed

+24
-5
lines changed

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The package can be installed by adding `membrane_transcoder_plugin` to your list
1717
```elixir
1818
def deps do
1919
[
20-
{:membrane_transcoder_plugin, "~> 0.1.0"}
20+
{:membrane_transcoder_plugin, "~> 0.1.1"}
2121
]
2222
end
2323
```

Diff for: lib/transcoder/audio.ex

+9
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,20 @@ defmodule Membrane.Transcoder.Audio do
5353

5454
defp do_plug_audio_transcoding(builder, input_format, output_format) do
5555
builder
56+
|> maybe_plug_parser(input_format)
5657
|> maybe_plug_decoder(input_format)
5758
|> maybe_plug_resampler(input_format, output_format)
5859
|> maybe_plug_encoder(output_format)
5960
end
6061

62+
defp maybe_plug_parser(builder, %AAC{}) do
63+
builder |> child(:aac_parser, AAC.Parser)
64+
end
65+
66+
defp maybe_plug_parser(builder, _input_format) do
67+
builder
68+
end
69+
6170
defp maybe_plug_decoder(builder, %Opus{}) do
6271
builder |> child(:opus_decoder, Opus.Decoder)
6372
end

Diff for: lib/transcoder/video.ex

+12-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@ defmodule Membrane.Transcoder.Video do
33

44
import Membrane.ChildrenSpec
55
require Membrane.Logger
6-
alias Membrane.{ChildrenSpec, H264, H265, RawVideo, VP8}
6+
alias Membrane.{ChildrenSpec, H264, H265, RawVideo, RemoteStream, VP8}
77

88
@type video_stream_format :: VP8.t() | H264.t() | H265.t() | RawVideo.t()
99

1010
defguard is_video_format(format)
11-
when is_struct(format) and format.__struct__ in [VP8, H264, H265, RawVideo]
11+
when is_struct(format) and
12+
(format.__struct__ in [VP8, H264, H265, RawVideo] or
13+
(format.__struct__ == RemoteStream and format.content_format == VP8 and
14+
format.type == :packetized))
1215

1316
@spec plug_video_transcoding(
1417
ChildrenSpec.builder(),
@@ -69,6 +72,13 @@ defmodule Membrane.Transcoder.Video do
6972
builder |> child(:vp8_decoder, %VP8.Decoder{})
7073
end
7174

75+
defp maybe_plug_parser_and_decoder(builder, %RemoteStream{
76+
content_format: VP8,
77+
type: :packetized
78+
}) do
79+
builder |> child(:vp8_decoder, %VP8.Decoder{})
80+
end
81+
7282
defp maybe_plug_parser_and_decoder(builder, %RawVideo{}) do
7383
builder
7484
end

Diff for: mix.exs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
defmodule Membrane.Transcoder.Plugin.Mixfile do
22
use Mix.Project
33

4-
@version "0.1.0"
4+
@version "0.1.1"
55
@github_url "https://github.com/membraneframework/membrane_transcoder_plugin"
66

77
def project do
@@ -39,6 +39,7 @@ defmodule Membrane.Transcoder.Plugin.Mixfile do
3939
[
4040
{:membrane_core, "~> 1.1"},
4141
{:membrane_opus_plugin, "~> 0.20.3"},
42+
{:membrane_aac_plugin, "~> 0.19.0"},
4243
{:membrane_aac_fdk_plugin, "~> 0.18.0"},
4344
{:membrane_vpx_plugin, "~> 0.2.0"},
4445
{:membrane_h26x_plugin, "~> 0.10.0"},
@@ -57,7 +58,6 @@ defmodule Membrane.Transcoder.Plugin.Mixfile do
5758
{:credo, ">= 0.0.0", only: :dev, runtime: false},
5859
{:membrane_file_plugin, "~> 0.17.2", only: :test},
5960
{:membrane_raw_audio_parser_plugin, "~> 0.4.0", only: :test},
60-
{:membrane_aac_plugin, "~> 0.19.0", only: :test},
6161
{:membrane_ivf_plugin, "~> 0.8.0", only: :test}
6262
]
6363
end

0 commit comments

Comments
 (0)