public class OpusPacketInfo extends Object
OpusPacketInfo class.
| Modifier and Type | Field and Description |
|---|---|
List<Byte[]> |
Frames
The list of subframes in this packet
|
int |
PayloadOffset
The index of the start of the payload within the packet
|
byte |
TOCByte
The Table of Contents byte for this packet.
|
| Modifier and Type | Method and Description |
|---|---|
static OpusBandwidth |
getBandwidth(byte[] packet,
int packet_offset)
getBandwidth.
|
static OpusMode |
getEncoderMode(byte[] packet,
int packet_offset)
getEncoderMode.
|
static int |
getNumEncodedChannels(byte[] packet,
int packet_offset)
getNumEncodedChannels.
|
static int |
getNumFrames(byte[] packet,
int packet_offset,
int len)
getNumFrames.
|
static int |
getNumSamples(byte[] packet,
int packet_offset,
int len,
int Fs)
getNumSamples.
|
static int |
getNumSamples(OpusDecoder dec,
byte[] packet,
int packet_offset,
int len)
getNumSamples.
|
static int |
getNumSamplesPerFrame(byte[] packet,
int packet_offset,
int Fs)
getNumSamplesPerFrame.
|
static OpusPacketInfo |
parseOpusPacket(byte[] packet,
int packet_offset,
int len)
Parse an opus packet into a packetinfo object containing one or more frames.
|
public byte TOCByte
public int PayloadOffset
public static OpusPacketInfo parseOpusPacket(byte[] packet, int packet_offset, int len) throws OpusException
packet - The packet data to be parsedpacket_offset - The index of the beginning of the packet in the data array (usually 0)len - The packet's lengthOpusExceptionpublic static int getNumSamplesPerFrame(byte[] packet,
int packet_offset,
int Fs)
getNumSamplesPerFrame.
packet - an array of byte objectspacket_offset - a intFs - a intpublic static OpusBandwidth getBandwidth(byte[] packet, int packet_offset)
getBandwidth.
packet - an array of byte objectspacket_offset - a intOpusBandwidth objectpublic static int getNumEncodedChannels(byte[] packet,
int packet_offset)
getNumEncodedChannels.
packet - an array of byte objectspacket_offset - a intpublic static int getNumFrames(byte[] packet,
int packet_offset,
int len)
getNumFrames.
packet - an array of byte objectspacket_offset - a intlen - a intpublic static int getNumSamples(byte[] packet,
int packet_offset,
int len,
int Fs)
getNumSamples.
packet - an array of byte objectspacket_offset - a intlen - a intFs - a intpublic static int getNumSamples(OpusDecoder dec, byte[] packet, int packet_offset, int len)
getNumSamples.
dec - a OpusDecoder objectpacket - an array of byte objectspacket_offset - a intlen - a intCopyright © 2024. All rights reserved.