-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hide VP8 and Opus Payloader/Depayloader modules
- Loading branch information
Showing
13 changed files
with
128 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
defmodule ExWebRTC.RTP.Depayloader.Behaviour do | ||
@moduledoc false | ||
|
||
@type depayloader :: struct() | ||
|
||
@doc """ | ||
Creates a new depayloader struct. | ||
""" | ||
@callback new() :: depayloader() | ||
|
||
@doc """ | ||
Processes binary data from a single RTP packet, and outputs a frame if assembled. | ||
Returns the frame (or `nil` if a frame could not be depayloaded yet) | ||
together with the updated depayloader struct. | ||
""" | ||
@callback depayload(depayloader(), packet :: ExRTP.Packet.t()) :: | ||
{binary() | nil, depayloader()} | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
defmodule ExWebRTC.RTP.Payloader.Behaviour do | ||
@moduledoc false | ||
|
||
@type payloader :: struct() | ||
|
||
@doc """ | ||
Creates a new payloader struct. | ||
""" | ||
@callback new(max_payload_size :: integer()) :: payloader() | ||
|
||
@doc """ | ||
Packs a frame into one or more RTP packets. | ||
Returns the packets together with the updated payloader struct. | ||
""" | ||
@callback payload(payloader(), frame :: binary()) :: {[ExRTP.Packet.t()], payloader()} | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.