MediaCodecs.H264 (MediCodecs v0.2.0)
View SourceUtilities for working with H.264 (AVC) video codec.
Summary
Functions
Convert an Annex B formatted access unit to an elementary stream.
Gets NALu type.
Convert an access unit to a list of NALUs.
Parses a NALU bitstring and returns a NALU struct.
Pops parameter sets from access unit.
Types
@type nalu_type() ::
:non_idr
| :part_a
| :part_b
| :part_c
| :idr
| :sei
| :sps
| :pps
| :aud
| :end_of_seq
| :end_of_stream
| :filler_data
| :sps_extension
| :prefix_nal_unit
| :subset_sps
| :auxiliary_non_part
| :extension
| :reserved
| :unspecified
@type profile() ::
:high_cavlc_4_4_4_intra
| :constrained_baseline
| :baseline
| :main
| :extended
| :constrained_high
| :progressive_high
| :high
| :high_10_intra
| :high_10
| :high_4_2_2_intra
| :high_4_2_2
| :high_4_4_4_intra
| :high_4_4_4_predictive
Functions
@spec annexb_to_elementary_stream( access_unit :: binary() | [binary()], nalu_prefix_size :: integer() ) :: binary()
Convert an Annex B formatted access unit to an elementary stream.
The NALU prefix size can be specified, defaulting to 4 bytes.
Gets NALu type.
Convert an access unit to a list of NALUs.
@spec parse_nalu(bitstring()) :: MediaCodecs.H264.NALU.t()
Parses a NALU bitstring and returns a NALU struct.
@spec pop_parameter_sets(binary()) :: {{sps :: [binary()], pps :: [binary()]}, access_unit :: [binary()]}
Pops parameter sets from access unit.