@@ -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 )
0 commit comments