diff --git a/lib/membrane_h264_plugin/h264_parser.ex b/lib/membrane_h264_plugin/h264_parser.ex index e4bcde6..6c721b7 100644 --- a/lib/membrane_h264_plugin/h264_parser.ex +++ b/lib/membrane_h264_plugin/h264_parser.ex @@ -17,7 +17,7 @@ defmodule Membrane.H264.Parser do * `:au_aligned` - each input buffer contains a single access unit's payload The parser's mode is set automatically, based on the input stream format received by that element: - * Receiving `%Membrane.RemoteStream{type: :bytestream}` results in the parser mode being set to `:bytestream` + * Receiving `Membrane.RemoteStream` results in the parser mode being set to `:bytestream` * Receiving `%Membrane.H264{alignment: :nalu}` results in the parser mode being set to `:nalu_aligned` * Receiving `%Membrane.H264{alignment: :au}` results in the parser mode being set to `:au_aligned` @@ -57,7 +57,7 @@ defmodule Membrane.H264.Parser do def_input_pad :input, flow_control: :auto, - accepted_format: any_of(%RemoteStream{type: :bytestream}, H264) + accepted_format: any_of(RemoteStream, H264) def_output_pad :output, flow_control: :auto, @@ -211,7 +211,7 @@ defmodule Membrane.H264.Parser do def parse_raw_input_stream_structure(stream_format) do {alignment, input_raw_stream_structure} = case stream_format do - %RemoteStream{type: :bytestream} -> + %RemoteStream{} -> {:bytestream, :annexb} %H264{alignment: alignment, stream_structure: stream_structure} -> diff --git a/lib/membrane_h264_plugin/h265_parser.ex b/lib/membrane_h264_plugin/h265_parser.ex index 7850c29..14a66ee 100644 --- a/lib/membrane_h264_plugin/h265_parser.ex +++ b/lib/membrane_h264_plugin/h265_parser.ex @@ -16,7 +16,7 @@ defmodule Membrane.H265.Parser do * `:au_aligned` - each input buffer contains a single access unit's payload The parser's mode is set automatically, based on the input stream format received by that element: - * Receiving `%Membrane.RemoteStream{type: :bytestream}` results in the parser mode being set to `:bytestream` + * Receiving `Membrane.RemoteStream` results in the parser mode being set to `:bytestream` * Receiving `%Membrane.H265{alignment: :nalu}` results in the parser mode being set to `:nalu_aligned`. * Receiving `%Membrane.H265{alignment: :au}` results in the parser mode being set to `:au_aligned`. @@ -43,7 +43,7 @@ defmodule Membrane.H265.Parser do def_input_pad :input, flow_control: :auto, - accepted_format: any_of(%RemoteStream{type: :bytestream}, H265) + accepted_format: any_of(RemoteStream, H265) def_output_pad :output, flow_control: :auto, @@ -215,7 +215,7 @@ defmodule Membrane.H265.Parser do def parse_raw_input_stream_structure(stream_format) do {alignment, input_raw_stream_structure} = case stream_format do - %RemoteStream{type: :bytestream} -> + %RemoteStream{} -> {:bytestream, :annexb} %H265{alignment: alignment, stream_structure: stream_structure} -> diff --git a/test/support/test_source.ex b/test/support/test_source.ex index d3149a6..47befec 100644 --- a/test/support/test_source.ex +++ b/test/support/test_source.ex @@ -11,7 +11,7 @@ defmodule Membrane.H26x.Support.TestSource do flow_control: :push, accepted_format: any_of( - %Membrane.RemoteStream{type: :bytestream}, + %Membrane.RemoteStream{type: :packetized}, %Membrane.H264{alignment: alignment} when alignment in [:au, :nalu], %Membrane.H265{alignment: alignment} when alignment in [:au, :nalu] ) @@ -36,7 +36,7 @@ defmodule Membrane.H26x.Support.TestSource do stream_format = case {state.codec, state.mode} do {_codec, :bytestream} -> - %Membrane.RemoteStream{type: :bytestream} + %Membrane.RemoteStream{type: :packetized} {:H264, :nalu_aligned} -> %Membrane.H264{alignment: :nalu, stream_structure: state.output_raw_stream_structure}