#include <nalu_reader.h>
|
enum | Result { kOk,
kInvalidStream,
kEOStream
} |
|
|
static bool | FindStartCode (const uint8_t *data, uint64_t data_size, uint64_t *offset, uint8_t *start_code_size) |
|
Helper class used to read NAL units based on several formats:
- Annex B H.264/h.265
- NAL Unit Stream
Definition at line 145 of file nalu_reader.h.
shaka::media::NaluReader::NaluReader |
( |
Nalu::CodecType |
type, |
|
|
uint8_t |
nal_length_size, |
|
|
const uint8_t * |
stream, |
|
|
uint64_t |
stream_size |
|
) |
| |
- Parameters
-
nalu_length_size | should be set to 0 for AnnexB byte streams; otherwise, it indicates the size of NAL unit length for the NAL unit stream. |
Definition at line 161 of file nalu_reader.cc.
NaluReader::Result shaka::media::NaluReader::Advance |
( |
Nalu * |
nalu | ) |
|
Reads a NALU from the stream into |*nalu|, if one exists, and then advances to the next NALU.
- Parameters
-
nalu | contains the NALU read if it exists. |
- Returns
- kOk if a NALU is read; kEOStream if the stream is at the end-of-stream; kInvalidStream on error.
Definition at line 175 of file nalu_reader.cc.
bool shaka::media::NaluReader::StartsWithStartCode |
( |
| ) |
|
- Returns
- true if the current position points to a start code.
Definition at line 227 of file nalu_reader.cc.
The documentation for this class was generated from the following files: