File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ defmodule ExWebRTC.RTP.PayloaderTest do
55 alias ExWebRTC.RTP.Payloader
66
77 @ frame << 0 , 1 , 2 , 3 >>
8+ @ av1_temporal_unit << 0 :: 1 , 2 :: 4 , 0 :: 3 >>
89
910 test "creates a VP8 payloader and dispatches calls to its module" do
1011 assert { :ok , _payloader } =
@@ -19,6 +20,18 @@ defmodule ExWebRTC.RTP.PayloaderTest do
1920 assert Payloader . payload ( payloader , @ frame ) == Payloader.VP8 . payload ( payloader , @ frame )
2021 end
2122
23+ test "creates an AV1 payloader and dispatches calls to its module" do
24+ assert { :ok , payloader } =
25+ % RTPCodecParameters { payload_type: 45 , mime_type: "video/AV1" , clock_rate: 90_000 }
26+ |> Payloader . new ( )
27+
28+ assert Payloader . payload ( payloader , @ av1_temporal_unit ) ==
29+ Payloader.AV1 . payload ( payloader , @ av1_temporal_unit )
30+
31+ # The sample frame is not a valid AV1 temporal unit
32+ assert_raise RuntimeError , fn -> Payloader . payload ( payloader , @ frame ) end
33+ end
34+
2235 test "creates an Opus payloader and dispatches calls to its module" do
2336 assert { :ok , payloader } =
2437 % RTPCodecParameters {
You can’t perform that action at this time.
0 commit comments