@@ -69,7 +69,7 @@ defmodule Membrane.WebRTC.IntegrationTest do
6969 defmodule Utils do
7070 import ExUnit.Assertions
7171
72- def fixture_processing_timeout , do: 30_000
72+ def fixture_processing_timeout ( ) , do: 30_000
7373
7474 def prepare_input ( pipeline , opts ) do
7575 demuxer_name = { :demuxer , make_ref ( ) }
@@ -504,4 +504,58 @@ defmodule Membrane.WebRTC.IntegrationTest do
504504 end )
505505 end
506506 end
507+
508+ defmodule AV1RawRTPPassthrough do
509+ use ExUnit.Case , async: true
510+
511+ import Membrane.ChildrenSpec
512+ import Membrane.Testing.Assertions
513+
514+ require Membrane.Pad , as: Pad
515+
516+ alias Membrane.Testing
517+ alias Membrane.WebRTC
518+ alias Membrane.WebRTC.Signaling
519+
520+ test "send and receive AV1 via raw RTP passthrough" do
521+ signaling = Signaling . new ( )
522+
523+ send_pipeline = Testing.Pipeline . start_link_supervised! ( )
524+ receive_pipeline = Testing.Pipeline . start_link_supervised! ( )
525+
526+ Testing.Pipeline . execute_actions ( send_pipeline ,
527+ spec: [
528+ child ( :video_source , % KeyframeTestSource {
529+ stream_format: % Membrane.RTP { }
530+ } )
531+ |> via_in ( :input , options: [ kind: :video ] )
532+ |> child ( :webrtc , % WebRTC.Sink {
533+ signaling: signaling ,
534+ payload_rtp: false ,
535+ video_codec: :av1 ,
536+ tracks: [ :video ]
537+ } )
538+ ]
539+ )
540+
541+ Testing.Pipeline . execute_actions ( receive_pipeline ,
542+ spec: [
543+ child ( :webrtc , % WebRTC.Source {
544+ signaling: signaling ,
545+ depayload_rtp: false ,
546+ allowed_video_codecs: :av1
547+ } )
548+ |> via_out ( Pad . ref ( :output , :video ) , options: [ kind: :video ] )
549+ |> child ( :video_sink , KeyframeTestSink )
550+ ]
551+ )
552+
553+ assert_pipeline_notified ( send_pipeline , :webrtc , { :negotiated_video_codecs , [ :av1 ] } )
554+ assert_pipeline_notified ( receive_pipeline , :webrtc , { :negotiated_video_codecs , [ :av1 ] } )
555+ assert_pipeline_notified ( receive_pipeline , :video_sink , { :buffer , _buffer } , 5_000 )
556+
557+ Testing.Pipeline . terminate ( send_pipeline )
558+ Testing.Pipeline . terminate ( receive_pipeline )
559+ end
560+ end
507561end
0 commit comments