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

Replace payloaders with parsers and adjust tests to new timestamp generation #87

Merged
merged 7 commits into from
Sep 6, 2023
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
12 changes: 9 additions & 3 deletions lib/membrane_http_adaptive_stream/sink_bin.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ defmodule Membrane.HTTPAdaptiveStream.SinkBin do
"""
use Membrane.Bin

alias Membrane.{MP4, Time}
alias Membrane.{AAC, H264, MP4, Time}
alias Membrane.HTTPAdaptiveStream.{Manifest, Sink, Storage}

def_options manifest_name: [
Expand Down Expand Up @@ -190,6 +190,10 @@ defmodule Membrane.HTTPAdaptiveStream.SinkBin do

spec =
bin_input(pad)
# |> child(%Membrane.Debug.Filter{
# handle_buffer: &File.write("#{inspect(self())}-old", "#{inspect(&1)}\n", [:append]),
# handle_stream_format: &File.write("#{inspect(self())}-old", "#{inspect(&1)}\n", [:append])
# })
varsill marked this conversation as resolved.
Show resolved Hide resolved
|> child({:payloader, ref}, get_payloader(pad_options.encoding, state))
|> child({:cmaf_muxer, ref}, cmaf_child_definiton(pad_options))
|> via_in(pad, options: track_options(ctx))
Expand Down Expand Up @@ -339,7 +343,9 @@ defmodule Membrane.HTTPAdaptiveStream.SinkBin do

defp get_payloader(encoding, state) do
if encoding == :AAC,
do: MP4.Payloader.AAC,
else: %MP4.Payloader.H264{parameters_in_band?: state.mp4_parameters_in_band?}
do: %AAC.Parser{output_config: :esds, out_encapsulation: :none},
else: %H264.Parser{
output_stream_structure: if(state.mp4_parameters_in_band?, do: :avc3, else: :avc1)
}
end
end
12 changes: 8 additions & 4 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,15 @@ defmodule Membrane.HTTPAdaptiveStream.MixProject do
[
{:membrane_core, "~> 0.12.0"},
{:membrane_tee_plugin, "~> 0.11.0"},
{:membrane_mp4_plugin, "~> 0.26.1"},
{:membrane_aac_plugin, "~> 0.15.0", only: :test},
{:membrane_hackney_plugin, "~> 0.10.0", only: :test},
{:membrane_h264_ffmpeg_plugin, "~> 0.27.0", only: :test},
{:membrane_mp4_plugin, "~> 0.29.0"},
{:membrane_aac_plugin, "~> 0.16.0"},
# {:membrane_h264_plugin, "~> 0.7.0"},
{:membrane_h264_plugin,
github: "membraneframework/membrane_h264_plugin",
branch: "pass-framerate-to-output-format",
override: true},
{:bunch, "~> 1.5"},
{:membrane_hackney_plugin, "~> 0.10.0", only: :test},
{:credo, "~> 1.6.1", only: :dev, runtime: false},
{:ex_doc, "~> 0.25", only: :dev, runtime: false},
{:dialyxir, "~> 1.1", only: :dev, runtime: false}
Expand Down
Loading