mirror of
https://github.com/samsonjs/media.git
synced 2026-03-25 09:25:53 +00:00
Make NalUnitTargetBuffer public
This class is a useful utility for custom TS parsers that operate on NAL units. PiperOrigin-RevId: 664795988
This commit is contained in:
parent
cd0a7e1143
commit
ba00798451
1 changed files with 9 additions and 1 deletions
|
|
@ -16,13 +16,15 @@
|
|||
package androidx.media3.extractor.ts;
|
||||
|
||||
import androidx.media3.common.util.Assertions;
|
||||
import androidx.media3.common.util.UnstableApi;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* A buffer that fills itself with data corresponding to a specific NAL unit, as it is encountered
|
||||
* in the stream.
|
||||
*/
|
||||
/* package */ final class NalUnitTargetBuffer {
|
||||
@UnstableApi
|
||||
public final class NalUnitTargetBuffer {
|
||||
|
||||
private final int targetType;
|
||||
|
||||
|
|
@ -32,6 +34,12 @@ import java.util.Arrays;
|
|||
public byte[] nalData;
|
||||
public int nalLength;
|
||||
|
||||
/**
|
||||
* Creates the buffer.
|
||||
*
|
||||
* @param targetType The type of the NAL unit.
|
||||
* @param initialCapacity The initial capacity of the buffer in bytes.
|
||||
*/
|
||||
public NalUnitTargetBuffer(int targetType, int initialCapacity) {
|
||||
this.targetType = targetType;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue