We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3643708 + 1a30ccd commit cd0f73eCopy full SHA for cd0f73e
4 files changed
README.md
@@ -17,7 +17,7 @@ The package can be installed by adding `membrane_transcoder_plugin` to your list
17
```elixir
18
def deps do
19
[
20
- {:membrane_transcoder_plugin, "~> 0.1.0"}
+ {:membrane_transcoder_plugin, "~> 0.1.1"}
21
]
22
end
23
```
lib/transcoder/audio.ex
@@ -53,11 +53,20 @@ defmodule Membrane.Transcoder.Audio do
53
54
defp do_plug_audio_transcoding(builder, input_format, output_format) do
55
builder
56
+ |> maybe_plug_parser(input_format)
57
|> maybe_plug_decoder(input_format)
58
|> maybe_plug_resampler(input_format, output_format)
59
|> maybe_plug_encoder(output_format)
60
61
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
69
70
defp maybe_plug_decoder(builder, %Opus{}) do
71
builder |> child(:opus_decoder, Opus.Decoder)
72
lib/transcoder/video.ex
@@ -3,12 +3,15 @@ defmodule Membrane.Transcoder.Video do
3
4
import Membrane.ChildrenSpec
5
require Membrane.Logger
6
- alias Membrane.{ChildrenSpec, H264, H265, RawVideo, VP8}
+ alias Membrane.{ChildrenSpec, H264, H265, RawVideo, RemoteStream, VP8}
7
8
@type video_stream_format :: VP8.t() | H264.t() | H265.t() | RawVideo.t()
9
10
defguard is_video_format(format)
11
- when is_struct(format) and format.__struct__ in [VP8, H264, H265, RawVideo]
+ 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))
15
16
@spec plug_video_transcoding(
ChildrenSpec.builder(),
@@ -69,6 +72,13 @@ defmodule Membrane.Transcoder.Video do
builder |> child(:vp8_decoder, %VP8.Decoder{})
73
74
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
81
82
defp maybe_plug_parser_and_decoder(builder, %RawVideo{}) do
83
84
mix.exs
@@ -1,7 +1,7 @@
1
defmodule Membrane.Transcoder.Plugin.Mixfile do
2
use Mix.Project
- @version "0.1.0"
+ @version "0.1.1"
@github_url "https://github.com/membraneframework/membrane_transcoder_plugin"
def project do
@@ -39,6 +39,7 @@ defmodule Membrane.Transcoder.Plugin.Mixfile do
39
40
{:membrane_core, "~> 1.1"},
41
{:membrane_opus_plugin, "~> 0.20.3"},
42
+ {:membrane_aac_plugin, "~> 0.19.0"},
43
{:membrane_aac_fdk_plugin, "~> 0.18.0"},
44
{:membrane_vpx_plugin, "~> 0.2.0"},
45
{:membrane_h26x_plugin, "~> 0.10.0"},
@@ -57,7 +58,6 @@ defmodule Membrane.Transcoder.Plugin.Mixfile do
{:credo, ">= 0.0.0", only: :dev, runtime: false},
{:membrane_file_plugin, "~> 0.17.2", only: :test},
{:membrane_raw_audio_parser_plugin, "~> 0.4.0", only: :test},
- {:membrane_aac_plugin, "~> 0.19.0", only: :test},
{:membrane_ivf_plugin, "~> 0.8.0", only: :test}
0 commit comments