diff --git a/lib/ex_webrtc/rtp/h264/nal_formats/fu/header.ex b/lib/ex_webrtc/rtp/h264/nal_formats/fu/header.ex index 037eb978..be84ebe5 100644 --- a/lib/ex_webrtc/rtp/h264/nal_formats/fu/header.ex +++ b/lib/ex_webrtc/rtp/h264/nal_formats/fu/header.ex @@ -1,16 +1,15 @@ defmodule ExWebRTC.RTP.H264.FU.Header do - @moduledoc """ - Defines a structure representing Fragmentation Unit (FU) header - which is defined in [RFC6184](https://tools.ietf.org/html/rfc6184#page-31) - - ``` - +---------------+ - |0|1|2|3|4|5|6|7| - +-+-+-+-+-+-+-+-+ - |S|E|R| Type | - +---------------+ - ``` - """ + @moduledoc false + # Defines a structure representing Fragmentation Unit (FU) header + # which is defined in [RFC6184](https://tools.ietf.org/html/rfc6184#page-31) + # + # + # +---------------+ + # |0|1|2|3|4|5|6|7| + # +-+-+-+-+-+-+-+-+ + # |S|E|R| Type | + # +---------------+ + # alias ExWebRTC.RTP.H264.NAL diff --git a/lib/ex_webrtc/rtp/h264/nal_formats/stap_a.ex b/lib/ex_webrtc/rtp/h264/nal_formats/stap_a.ex index b2c30227..77fcd1bb 100644 --- a/lib/ex_webrtc/rtp/h264/nal_formats/stap_a.ex +++ b/lib/ex_webrtc/rtp/h264/nal_formats/stap_a.ex @@ -1,29 +1,26 @@ defmodule ExWebRTC.RTP.H264.StapA do - @moduledoc """ - Module responsible for parsing Single Time Agregation Packets type A. - - Documented in [RFC6184](https://tools.ietf.org/html/rfc6184#page-22) - - ``` - 0 1 2 3 - 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | RTP Header | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - |STAP-A NAL HDR | NALU 1 Size | NALU 1 HDR | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | NALU 1 Data | - : : - + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | | NALU 2 Size | NALU 2 HDR | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | NALU 2 Data | - : : - | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | :...OPTIONAL RTP padding | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - ``` - """ + @moduledoc false + # Module responsible for parsing Single Time Agregation Packets type A. + # + # Documented in [RFC6184](https://tools.ietf.org/html/rfc6184#page-22) + # + # 0 1 2 3 + # 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + # | RTP Header | + # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + # |STAP-A NAL HDR | NALU 1 Size | NALU 1 HDR | + # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + # | NALU 1 Data | + # : : + # + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + # | | NALU 2 Size | NALU 2 HDR | + # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + # | NALU 2 Data | + # : : + # | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + # | :...OPTIONAL RTP padding | + # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ @spec parse(binary()) :: {:ok, [binary()]} | {:error, :packet_malformed} def parse(data) do diff --git a/lib/ex_webrtc/rtp/h264/nal_header.ex b/lib/ex_webrtc/rtp/h264/nal_header.ex index c2796566..e674fb87 100644 --- a/lib/ex_webrtc/rtp/h264/nal_header.ex +++ b/lib/ex_webrtc/rtp/h264/nal_header.ex @@ -1,17 +1,16 @@ defmodule ExWebRTC.RTP.H264.NAL.Header do - @moduledoc """ - Defines a structure representing Network Abstraction Layer Unit Header - - Defined in [RFC 6184](https://tools.ietf.org/html/rfc6184#section-5.3) - - ``` - +---------------+ - |0|1|2|3|4|5|6|7| - +-+-+-+-+-+-+-+-+ - |F|NRI| Type | - +---------------+ - ``` - """ + @moduledoc false + # Defines a structure representing Network Abstraction Layer Unit Header + # + # Defined in [RFC 6184](https://tools.ietf.org/html/rfc6184#section-5.3) + # + # + # +---------------+ + # |0|1|2|3|4|5|6|7| + # +-+-+-+-+-+-+-+-+ + # |F|NRI| Type | + # +---------------+ + # @typedoc """ NRI stands for nal_ref_idc. This value represents importance of