Skip to content

Commit

Permalink
Improve types and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-jodlos committed Jun 24, 2022
1 parent 0c3104b commit 71cdb28
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/membrane_h264_ffmpeg/parser.ex
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ defmodule Membrane.H264.FFmpeg.Parser do
end
end

# analize resolution changes and generate appropriate caps before corresponding buffers
# analyze resolution changes and generate appropriate caps before corresponding buffers
defp parse_resolution_changes(state, bufs, resolution_changes, acc \\ [], index_offset \\ 0)

defp parse_resolution_changes(state, [], [], [], _index_offset) do
Expand Down
10 changes: 9 additions & 1 deletion lib/membrane_h264_ffmpeg/parser/nalu.ex
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,15 @@ defmodule Membrane.H264.FFmpeg.Parser.NALu do
end)
|> Map.new()

@spec parse(binary, keyword()) :: {list, %{h264: any}, binary}
@typedoc """
Type representing a single option that can be passed to `parse/2` function call
- `complete_nalu?` - determines if the last NALu in the binary will be considered complete despite lacking the delimiter marking the end of it.
"""
@type parse_option_t() :: {:complete_nalu?, boolean()}
@type parse_options_t() :: [parse_option_t()]

@spec parse(binary, parse_options_t()) :: {list, %{h264: any}, binary}
def parse(access_unit, options \\ []) do
{nalus, au_info} =
access_unit
Expand Down

0 comments on commit 71cdb28

Please sign in to comment.