Skip to content

Commit 3f6e541

Browse files
committed
cleanup
1 parent 3e73975 commit 3f6e541

File tree

2 files changed

+6
-158
lines changed

2 files changed

+6
-158
lines changed

lib/ex_webrtc/rtp/h264/depayloader.ex

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
defmodule ExWebRTC.RTP.Depayloader.H264 do
22
@moduledoc """
3-
Depayloads H264 RTP payloads into H264 NAL Units.
3+
Extracts H264 NAL Units from RTP packets.
44
55
Based on [RFC 6184](https://tools.ietf.org/html/rfc6184).
66
@@ -27,8 +27,6 @@ defmodule ExWebRTC.RTP.Depayloader.H264 do
2727
end
2828

2929
@impl true
30-
def depayload(depayloader, packet)
31-
3230
def depayload(depayloader, %ExRTP.Packet{payload: <<>>, padding: true}), do: {nil, depayloader}
3331

3432
def depayload(depayloader, packet) do
@@ -60,11 +58,11 @@ defmodule ExWebRTC.RTP.Depayloader.H264 do
6058
{header, payload}
6159
) do
6260
if fu_parser_acc != nil and current_timestamp != packet.timestamp do
63-
{:error, "fu-a colliding rtp timestamps"}
61+
{:error, "Invalid timestamp inside FU-A"}
6462

6563
Logger.debug("""
66-
Received packet with timestamp from a new frame that is not a beginning of this frame \
67-
and without finishing the previous frame. Dropping both.\
64+
Received packet with FU-A type payload that is not a start of Fragmentation Unit with timestamp \
65+
different than last start and without finishing the previous FU. Dropping FU.\
6866
""")
6967
end
7068

@@ -92,10 +90,10 @@ defmodule ExWebRTC.RTP.Depayloader.H264 do
9290
end
9391

9492
defp handle_unit_type(unsupported_type, _depayloader, _packet, _nal) do
95-
{:error, "unsupported nal type #{unsupported_type}"}
93+
{:error, "Unsupported nal type #{unsupported_type}"}
9694

9795
Logger.debug("""
98-
Received packet with unsupported NAL type. Supported types are: NAL unit types, STAP-A, FU-A. Dropping packet.
96+
Received packet with unsupported NAL type. Supported types are: Single NALU, STAP-A, FU-A. Dropping packet.
9997
""")
10098
end
10199

lib/ex_webrtc/rtp/h264/payload.ex

Lines changed: 0 additions & 150 deletions
This file was deleted.

0 commit comments

Comments
 (0)