org.red5.server.net.rtmp
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(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(IoBuffer in) |
static int |
readMediumIntOld(IoBuffer in) |
static int |
readReverseInt(IoBuffer in)
Read integer in reversed order.
|
static int |
readUnsignedMediumInt(IoBuffer in) |
static int |
readUnsignedMediumIntOld(IoBuffer in) |
static void |
writeMediumInt(IoBuffer out,
int value) |
static void |
writeReverseInt(IoBuffer out,
int value)
Writes reversed integer to buffer.
|
static void |
writeReverseIntOld(IoBuffer out,
int value)
Writes reversed integer to buffer.
|
public static void writeReverseIntOld(IoBuffer out, int value)
out
- Buffervalue
- Integer to writepublic static void writeReverseInt(IoBuffer out, int value)
out
- Buffervalue
- Integer to writepublic static void writeMediumInt(IoBuffer out, int value)
out
- output buffervalue
- value to writepublic static int readUnsignedMediumInt(IoBuffer in)
in
- inputpublic static int readUnsignedMediumIntOld(IoBuffer in)
in
- inputpublic static int readMediumIntOld(IoBuffer in)
in
- inputpublic static int readMediumInt(IoBuffer in)
in
- inputpublic static int readReverseInt(IoBuffer in)
in
- Input bufferpublic static void encodeHeaderByte(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 © 2006-2012 The Red5 Project