public class AudioPacket
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
RTP_HEADER_BYTE_LENGTH |
static int |
RTP_PAYLOAD_INDEX |
static byte |
RTP_PAYLOAD_TYPE
This is Discord's RTP Profile Payload type.
I've yet to find actual documentation on what the bits inside this value represent. As far as I can tell, this byte will always be the same, no matter the library implementation. |
static byte |
RTP_VERSION_PAD_EXTEND
Bit index 0 and 1 represent the RTP Protocol version used.
|
static int |
RTP_VERSION_PAD_EXTEND_INDEX |
static int |
SEQ_INDEX |
static int |
SSRC_INDEX |
static int |
TIMESTAMP_INDEX |
Constructor and Description |
---|
AudioPacket(byte[] rawPacket) |
AudioPacket(char seq,
int timestamp,
int ssrc,
byte[] encodedAudio) |
AudioPacket(java.net.DatagramPacket packet) |
Modifier and Type | Method and Description |
---|---|
java.net.DatagramPacket |
asUdpPacket(java.net.InetSocketAddress address) |
static AudioPacket |
createEchoPacket(java.net.DatagramPacket packet,
int ssrc) |
byte[] |
getEncodedAudio() |
byte[] |
getRawPacket() |
char |
getSequence() |
int |
getSSRC() |
int |
getTimestamp() |
public static final int RTP_HEADER_BYTE_LENGTH
public static final byte RTP_VERSION_PAD_EXTEND
public static final byte RTP_PAYLOAD_TYPE
public static final int RTP_VERSION_PAD_EXTEND_INDEX
public static final int RTP_PAYLOAD_INDEX
public static final int SEQ_INDEX
public static final int TIMESTAMP_INDEX
public static final int SSRC_INDEX
public AudioPacket(java.net.DatagramPacket packet)
public AudioPacket(byte[] rawPacket)
public AudioPacket(char seq, int timestamp, int ssrc, byte[] encodedAudio)
public byte[] getRawPacket()
public byte[] getEncodedAudio()
public char getSequence()
public int getSSRC()
public int getTimestamp()
public java.net.DatagramPacket asUdpPacket(java.net.InetSocketAddress address)
public static AudioPacket createEchoPacket(java.net.DatagramPacket packet, int ssrc)