Skip to content

Commit db5f1ff

Browse files
committed
Conform to the new API
1 parent 3c8f00c commit db5f1ff

4 files changed

Lines changed: 18 additions & 17 deletions

File tree

rtp/lib/membrane_demo_rtp/receive_pipeline.ex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ defmodule Membrane.Demo.RTP.ReceivePipeline do
1111
def handle_init(_ctx, opts) do
1212
%{audio_port: audio_port, video_port: video_port, secure?: secure?, srtp_key: srtp_key} = opts
1313

14-
use_srtp =
14+
srtp =
1515
if secure? do
16-
{true, [%ExLibSRTP.Policy{ssrc: :any_inbound, key: srtp_key}]}
16+
[%ExLibSRTP.Policy{ssrc: :any_inbound, key: srtp_key}]
1717
else
1818
false
1919
end
@@ -24,7 +24,7 @@ defmodule Membrane.Demo.RTP.ReceivePipeline do
2424
local_port_no: video_port,
2525
local_address: @local_ip
2626
})
27-
|> child(:video_rtp_demuxer, %RTP.Demuxer{use_srtp: use_srtp})
27+
|> child(:video_rtp_demuxer, %RTP.Demuxer{srtp: srtp})
2828
|> via_out(:output, options: [stream_id: {:encoding_name, :H264}])
2929
|> child(:video_depayloader, RTP.H264.Depayloader)
3030
|> child(:video_parser, %H264.Parser{
@@ -36,7 +36,7 @@ defmodule Membrane.Demo.RTP.ReceivePipeline do
3636
local_port_no: audio_port,
3737
local_address: @local_ip
3838
})
39-
|> child(:audio_rtp_demuxer, %RTP.Demuxer{use_srtp: use_srtp})
39+
|> child(:audio_rtp_demuxer, %RTP.Demuxer{srtp: srtp})
4040
|> via_out(:output, options: [stream_id: {:encoding_name, :opus}])
4141
|> child(:audio_depayloader, RTP.Opus.Depayloader)
4242
|> child(:audio_decoder, Opus.Decoder)

rtp/lib/membrane_demo_rtp/send_pipeline.ex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ defmodule Membrane.Demo.RTP.SendPipeline do
1212
srtp_key: srtp_key
1313
} = opts
1414

15-
use_srtp =
15+
srtp =
1616
if secure? do
17-
{true, [%ExLibSRTP.Policy{ssrc: :any_inbound, key: srtp_key}]}
17+
[%ExLibSRTP.Policy{ssrc: :any_inbound, key: srtp_key}]
1818
else
1919
false
2020
end
@@ -28,7 +28,7 @@ defmodule Membrane.Demo.RTP.SendPipeline do
2828
output_alignment: :nalu
2929
})
3030
|> child(:video_payloader, RTP.H264.Payloader)
31-
|> child(:video_rtp_muxer, %RTP.Muxer{use_srtp: use_srtp})
31+
|> child(:video_rtp_muxer, %RTP.Muxer{srtp: srtp})
3232
|> child(:video_realtimer, Membrane.Realtimer)
3333
|> child(:video_sink, %UDP.Sink{
3434
destination_port_no: video_port,
@@ -43,7 +43,7 @@ defmodule Membrane.Demo.RTP.SendPipeline do
4343
generate_best_effort_timestamps?: true
4444
})
4545
|> child(:audio_payloader, RTP.Opus.Payloader)
46-
|> child(:audio_rtp_muxer, %RTP.Muxer{use_srtp: use_srtp})
46+
|> child(:audio_rtp_muxer, %RTP.Muxer{srtp: srtp})
4747
|> child(:audio_realtimer, Membrane.Realtimer)
4848
|> child(:audio_sink, %UDP.Sink{
4949
destination_port_no: audio_port,

rtp/mix.exs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ defmodule Membrane.Demo.RTP.MixProject do
2424
defp deps do
2525
[
2626
{:membrane_core, "~> 1.0"},
27-
{:membrane_rtp_plugin, path: "../../membrane_rtp_plugin/"},
27+
{:membrane_rtp_plugin,
28+
github: "membraneframework/membrane_rtp_plugin", branch: "srtp-demuxer-muxer"},
2829
# {:membrane_rtp_plugin, "~> 0.27.1"},
2930
{:membrane_udp_plugin, "~> 0.13.0"},
3031
{:membrane_h264_ffmpeg_plugin, "~> 0.31.6"},

0 commit comments

Comments
 (0)