Skip to content

Commit 288c208

Browse files
committed
wip2
1 parent 349dd03 commit 288c208

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

lib/ex_webrtc/rtp/av1/depayloader.ex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ defmodule ExWebRTC.RTP.Depayloader.AV1 do
2323
|> OBU.serialize()
2424

2525
@type t :: %__MODULE__{
26-
current_temporal_unit: [],
27-
current_obu: nil,
28-
current_timestamp: nil
26+
current_temporal_unit: [OBU.t()],
27+
current_obu: binary() | nil,
28+
current_timestamp: ExRTP.Packet.uint32() | nil
2929
}
3030

31-
defstruct [:current_temporal_unit, :current_obu, :current_timestamp]
31+
defstruct [current_temporal_unit: [], current_obu: nil, current_timestamp: nil]
3232

3333
# XXX where warnings, where debugs?
3434
# XXX MUST ignore TD OBU, Tile List OBU
@@ -53,7 +53,7 @@ defmodule ExWebRTC.RTP.Depayloader.AV1 do
5353
Resetting depayloader state. Payload: #{inspect(packet.payload)}.\
5454
""")
5555

56-
{:ok, %{depayloader | current_temporal_unit: nil, current_timestamp: nil}}
56+
{:ok, %{depayloader | current_temporal_unit: [], current_timestamp: nil}}
5757
end
5858
end
5959

lib/ex_webrtc/rtp/depayloader.ex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ defmodule ExWebRTC.RTP.Depayloader do
3737
case String.downcase(mime_type) do
3838
"video/vp8" -> {:ok, ExWebRTC.RTP.Depayloader.VP8}
3939
"video/h264" -> {:ok, ExWebRTC.RTP.Depayloader.H264}
40+
"video/av1" -> {:ok, ExWebRTC.RTP.Depayloader.AV1}
4041
"audio/opus" -> {:ok, ExWebRTC.RTP.Depayloader.Opus}
4142
"audio/pcma" -> {:ok, ExWebRTC.RTP.Depayloader.G711}
4243
"audio/pcmu" -> {:ok, ExWebRTC.RTP.Depayloader.G711}

lib/ex_webrtc/rtp/vp8/depayloader.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ defmodule ExWebRTC.RTP.Depayloader.VP8 do
1111
alias ExWebRTC.RTP.VP8.Payload
1212

1313
@type t() :: %__MODULE__{
14-
current_frame: nil,
15-
current_timestamp: nil
14+
current_frame: binary() | nil,
15+
current_timestamp: ExRTP.Packet.uint32() | nil
1616
}
1717

1818
defstruct [:current_frame, :current_timestamp]

0 commit comments

Comments
 (0)