public class RTMPProtocolDecoder extends Object implements Constants, IEventDecoder
| Modifier and Type | Field and Description |
|---|---|
protected Deserializer |
deserializer
Deserializer
|
protected static org.slf4j.Logger |
log
Logger
|
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 |
|---|
RTMPProtocolDecoder()
Constructs a new RTMPProtocolDecoder.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
decode(ProtocolState state,
IoBuffer in)
Decodes the buffer data
|
IRTMPEvent |
decodeAbort(IoBuffer in) |
Aggregate |
decodeAggregate(IoBuffer in)
Decodes the aggregated data.
|
AudioData |
decodeAudioData(IoBuffer in)
Decodes audio data event.
|
List<Object> |
decodeBuffer(ProtocolState state,
IoBuffer buffer)
Decode all available objects in buffer.
|
BytesRead |
decodeBytesRead(IoBuffer in)
Decodes BytesRead event.
|
ChunkSize |
decodeChunkSize(IoBuffer in)
Decodes chunk size event.
|
FlexMessage |
decodeFlexMessage(IoBuffer in,
RTMP rtmp)
Decodes FlexMessage event.
|
ISharedObjectMessage |
decodeFlexSharedObject(IoBuffer in,
RTMP rtmp)
Decodes shared object message event from AMF3 encoding.
|
FlexStreamSend |
decodeFlexStreamSend(IoBuffer in) |
IoBuffer |
decodeHandshake(RTMP rtmp,
IoBuffer in)
Decodes handshake message.
|
Header |
decodeHeader(IoBuffer in,
Header lastHeader)
Decodes packet header.
|
Invoke |
decodeInvoke(IoBuffer in,
RTMP rtmp)
Decodes invocation event.
|
IRTMPEvent |
decodeMessage(RTMP rtmp,
Header header,
IoBuffer in)
Decodes RTMP message event.
|
Notify |
decodeNotify(IoBuffer in,
Header header,
RTMP rtmp) |
Notify |
decodeNotify(IoBuffer in,
RTMP rtmp)
Decodes notification event.
|
protected Notify |
decodeNotifyOrInvoke(Notify notify,
IoBuffer in,
Header header,
RTMP rtmp)
Decodes notification event.
|
Packet |
decodePacket(RTMP rtmp,
IoBuffer in)
Decodes packet.
|
Ping |
decodePing(IoBuffer in)
Decodes ping event.
|
ISharedObjectMessage |
decodeSharedObject(IoBuffer in,
RTMP rtmp)
Decodes shared object message event.
|
Notify |
decodeStreamMetadata(IoBuffer in,
RTMP rtmp)
Decodes stream meta data, to include onMetaData, onCuePoint, and onFI.
|
Unknown |
decodeUnknown(byte dataType,
IoBuffer in)
Decodes event of Unknown type.
|
VideoData |
decodeVideoData(IoBuffer in)
Decodes video data event.
|
protected void |
doDecodeSharedObject(SharedObjectMessage so,
IoBuffer in,
Input input)
Perform the actual decoding of the shared object contents.
|
void |
setDeserializer(Deserializer deserializer)
Setter for deserializer.
|
protected static org.slf4j.Logger log
protected Deserializer deserializer
public RTMPProtocolDecoder()
public void setDeserializer(Deserializer deserializer)
deserializer - Deserializerpublic List<Object> decodeBuffer(ProtocolState state, IoBuffer buffer)
state - Stores state for the protocolbuffer - IoBuffer of data to be decodedpublic Object decode(ProtocolState state, IoBuffer in) throws ProtocolException
state - Stores state for the protocol, ProtocolState is just a marker
interfacein - IoBuffer of data to be decodedException - on errorProtocolExceptionpublic IoBuffer decodeHandshake(RTMP rtmp, IoBuffer in)
rtmp - RTMP protocol statein - IoBufferpublic Packet decodePacket(RTMP rtmp, IoBuffer in)
rtmp - RTMP protocol statein - IoBufferpublic Header decodeHeader(IoBuffer in, Header lastHeader)
in - Input IoBufferlastHeader - Previous headerpublic IRTMPEvent decodeMessage(RTMP rtmp, Header header, IoBuffer in)
rtmp - RTMP protocol stateheader - RTMP headerin - Input IoBufferpublic IRTMPEvent decodeAbort(IoBuffer in)
public Unknown decodeUnknown(byte dataType, IoBuffer in)
decodeUnknown in interface IEventDecoderdataType - Data typein - Byte buffer to decodepublic Aggregate decodeAggregate(IoBuffer in)
decodeAggregate in interface IEventDecoderin - Byte buffer to decodepublic ChunkSize decodeChunkSize(IoBuffer in)
decodeChunkSize in interface IEventDecoderin - Byte buffer to decodepublic ISharedObjectMessage decodeFlexSharedObject(IoBuffer in, RTMP rtmp)
decodeFlexSharedObject in interface IEventDecoderin - Byte buffer to decodertmp - RTMP protocol statepublic ISharedObjectMessage decodeSharedObject(IoBuffer in, RTMP rtmp)
decodeSharedObject in interface IEventDecoderin - Byte buffer to decodertmp - RTMP protocol stateprotected void doDecodeSharedObject(SharedObjectMessage so, IoBuffer in, Input input)
so - in - input - public Notify decodeNotify(IoBuffer in, RTMP rtmp)
decodeNotify in interface IEventDecoderin - Byte buffer to decodertmp - RTMP protocol statepublic Invoke decodeInvoke(IoBuffer in, RTMP rtmp)
decodeInvoke in interface IEventDecoderin - Byte buffer to decodertmp - RTMP protocol stateprotected Notify decodeNotifyOrInvoke(Notify notify, IoBuffer in, Header header, RTMP rtmp)
notify - Notify eventin - Byte bufferheader - Headerrtmp - RTMP protocol statepublic Ping decodePing(IoBuffer in)
decodePing in interface IEventDecoderin - IoBufferpublic BytesRead decodeBytesRead(IoBuffer in)
decodeBytesRead in interface IEventDecoderin - Byte buffer to decodepublic AudioData decodeAudioData(IoBuffer in)
decodeAudioData in interface IEventDecoderin - Byte buffer to decodepublic VideoData decodeVideoData(IoBuffer in)
decodeVideoData in interface IEventDecoderin - Byte buffer to decodepublic Notify decodeStreamMetadata(IoBuffer in, RTMP rtmp)
in - rtmp - public FlexMessage decodeFlexMessage(IoBuffer in, RTMP rtmp)
decodeFlexMessage in interface IEventDecoderin - IoBufferrtmp - RTMP protocol statepublic FlexStreamSend decodeFlexStreamSend(IoBuffer in)
Copyright © 2006-2012 The Red5 Project