NalUnitTargetBuffer
@UnstableApi
class NalUnitTargetBuffer
A buffer that fills itself with data corresponding to a specific NAL unit, as it is encountered in the stream.
Summary
Public constructors |
|---|
NalUnitTargetBuffer(targetType: Int, initialCapacity: Int)Creates the buffer. |
Public functions |
|
|---|---|
Unit |
appendToNalUnit(data: ByteArray!, offset: Int, limit: Int)Called to pass stream data. |
Boolean |
endNalUnit(discardPadding: Int)Called to indicate that a NAL unit has ended. |
Unit |
reset()Resets the buffer, clearing any data that it holds. |
Unit |
startNalUnit(type: Int)Called to indicate that a NAL unit has started. |
Public constructors
Public functions
appendToNalUnit
fun appendToNalUnit(data: ByteArray!, offset: Int, limit: Int): Unit
Called to pass stream data. The data passed should not include the 3 byte start code.
endNalUnit
fun endNalUnit(discardPadding: Int): Boolean
Called to indicate that a NAL unit has ended.
| Parameters | |
|---|---|
discardPadding: Int |
The number of excess bytes that were passed to |
| Returns | |
|---|---|
Boolean |
Whether the ended NAL unit is of the target type. |
startNalUnit
fun startNalUnit(type: Int): Unit
Called to indicate that a NAL unit has started.
| Parameters | |
|---|---|
type: Int |
The type of the NAL unit. |