public final class TsUtil
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static int |
findSyncBytePosition(byte[] data,
int startPosition,
int limitPosition)
Returns the position of the first TS_SYNC_BYTE within the range [startPosition, limitPosition)
from the provided data array, or returns limitPosition if sync byte could not be found.
|
static long |
readPcrFromPacket(ParsableByteArray packetBuffer,
int startOfPacket,
int pcrPid)
Returns the PCR value read from a given TS packet.
|
public static int findSyncBytePosition(byte[] data,
int startPosition,
int limitPosition)
public static long readPcrFromPacket(ParsableByteArray packetBuffer, int startOfPacket, int pcrPid)
packetBuffer - The buffer that holds the packet.startOfPacket - The starting position of the packet in the buffer.pcrPid - The PID for valid packets that contain PCR values.pcrPid and it
contains a valid PCR value. Returns C.TIME_UNSET otherwise.