MediaCodecs.MPEG4 (MediCodecs v0.7.0)
View SourceMPEG4 utilities.
Summary
Functions
Parses an ADTS stream into a list of ADTS packets.
Same as parse_adts_stream/1
, but raises an error if an invalid packet is encountered.
Parses the binary into a list of descriptors.
Functions
@spec parse_adts_stream(binary()) :: {:ok, [MediaCodecs.MPEG4.ADTS.t()], binary()} | {:error, :invalid_packet}
Parses an ADTS stream into a list of ADTS packets.
This function returns:
{:ok, packets, unprocessed}
wherepackets
is a list of parsed ADTS packets andunprocessed
is the remaining unprocessed binary.{:error, :invalid_packet}
if an invalid packet is encountered.
@spec parse_adts_stream!(binary()) :: {[MediaCodecs.MPEG4.ADTS.t()], binary()}
Same as parse_adts_stream/1
, but raises an error if an invalid packet is encountered.
Parses the binary into a list of descriptors.
Unknown descritpors are ignored.