HANDSHAKE_SIZE, HEADER_CONTINUE, HEADER_NEW, HEADER_SAME_SOURCE, HEADER_TIMER_CHANGE, MEDIUM_INT_MAX, SO_CLIENT_CLEAR_DATA, SO_CLIENT_DELETE_DATA, SO_CLIENT_INITIAL_DATA, SO_CLIENT_SEND_MESSAGE, SO_CLIENT_STATUS, SO_CLIENT_UPDATE_ATTRIBUTE, SO_CLIENT_UPDATE_DATA, SO_CONNECT, SO_DELETE_ATTRIBUTE, SO_DISCONNECT, SO_SEND_MESSAGE, SO_SET_ATTRIBUTE, SOURCE_TYPE_LIVE, SOURCE_TYPE_VOD, TYPE_ABORT, TYPE_AGGREGATE, TYPE_AUDIO_DATA, TYPE_BYTES_READ, TYPE_CHUNK_SIZE, TYPE_CLIENT_BANDWIDTH, TYPE_EDGE_ORIGIN, TYPE_FLEX_MESSAGE, TYPE_FLEX_SHARED_OBJECT, TYPE_FLEX_STREAM_SEND, TYPE_INVOKE, TYPE_NOTIFY, TYPE_PING, TYPE_SERVER_BANDWIDTH, TYPE_SHARED_OBJECT, TYPE_STREAM_METADATA, TYPE_VIDEO_DATA| Constructor and Description |
|---|
RTMPUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
compareTimestamps(int a,
int b)
Compares two RTMP time stamps, accounting for time stamp wrapping.
|
static int |
decodeChannelId(int header,
int byteCount)
Decode channel id.
|
static byte |
decodeHeaderSize(int header,
int byteCount)
Decode header size.
|
static long |
diffTimestamps(int a,
int b)
Calculates the delta between two time stamps, adjusting for time stamp wrapping.
|
static void |
encodeHeaderByte(org.apache.mina.core.buffer.IoBuffer out,
byte headerSize,
int channelId)
Encodes header size marker and channel id into header marker.
|
static int |
getHeaderLength(byte headerSize)
Return header length from marker value.
|
static int |
readMediumInt(org.apache.mina.core.buffer.IoBuffer in)
Read 24 bit integer.
|
static int |
readReverseInt(org.apache.mina.core.buffer.IoBuffer in)
Read integer in reversed order.
|
static int |
readUnsignedMediumInt(org.apache.mina.core.buffer.IoBuffer in)
Read unsigned 24 bit integer.
|
static void |
writeMediumInt(org.apache.mina.core.buffer.IoBuffer out,
int value) |
static void |
writeReverseInt(org.apache.mina.core.buffer.IoBuffer out,
int value)
Writes reversed integer to buffer.
|
public static void writeReverseInt(org.apache.mina.core.buffer.IoBuffer out,
int value)
out - Buffervalue - Integer to writepublic static void writeMediumInt(org.apache.mina.core.buffer.IoBuffer out,
int value)
out - output buffervalue - value to writepublic static int readUnsignedMediumInt(org.apache.mina.core.buffer.IoBuffer in)
in - inputpublic static int readMediumInt(org.apache.mina.core.buffer.IoBuffer in)
in - inputpublic static int readReverseInt(org.apache.mina.core.buffer.IoBuffer in)
in - Input bufferpublic static void encodeHeaderByte(org.apache.mina.core.buffer.IoBuffer out,
byte headerSize,
int channelId)
out - output bufferheaderSize - Header size markerchannelId - Channel usedpublic static int decodeChannelId(int header,
int byteCount)
header - HeaderbyteCount - byte countpublic static byte decodeHeaderSize(int header,
int byteCount)
header - Header bytebyteCount - byte countpublic static int getHeaderLength(byte headerSize)
headerSize - Header size marker valuepublic static int compareTimestamps(int a,
int b)
a - First time stampb - Second time stamppublic static long diffTimestamps(int a,
int b)
a - First time stampb - Second time stampCopyright © 2005–2017 Red5. All rights reserved.