Package org.red5.server.net.rtmp.event
Class AudioData
java.lang.Object
org.red5.server.net.rtmp.event.BaseEvent
org.red5.server.net.rtmp.event.AudioData
- All Implemented Interfaces:
Externalizable
,Serializable
,IEvent
,IStreamPacket
,IRTMPEvent
,Constants
,IStreamData<AudioData>
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.red5.server.api.event.IEvent
IEvent.Type
-
Field Summary
Modifier and TypeFieldDescriptionprotected int
The codec idprotected boolean
True if this is configuration data and false otherwiseprotected org.apache.mina.core.buffer.IoBuffer
private byte
Data typeprivate static final long
Fields inherited from class org.red5.server.net.rtmp.event.BaseEvent
header, log, object, refcount, source, timestamp
Fields inherited from interface org.red5.server.net.rtmp.message.Constants
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionDuplicate this message / event.int
org.apache.mina.core.buffer.IoBuffer
getData()
Getter for property 'data'.byte
Getter for data typeboolean
isConfig()
void
protected void
Release eventvoid
setData
(byte[] data) void
setData
(org.apache.mina.core.buffer.IoBuffer data) void
setDataType
(byte dataType) toString()
void
Methods inherited from class org.red5.server.net.rtmp.event.BaseEvent
getHeader, getObject, getSource, getSourceType, getTimestamp, getType, hasSource, release, retain, setHeader, setSource, setSourceType, setTimestamp, setType
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.red5.server.api.stream.IStreamPacket
getTimestamp
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
data
protected org.apache.mina.core.buffer.IoBuffer data -
dataType
private byte dataTypeData type -
codecId
protected int codecIdThe codec id -
config
protected boolean configTrue if this is configuration data and false otherwise
-
-
Constructor Details
-
AudioData
public AudioData()Constructs a new AudioData. -
AudioData
public AudioData(org.apache.mina.core.buffer.IoBuffer data) -
AudioData
public AudioData(org.apache.mina.core.buffer.IoBuffer data, boolean copy) Create audio data event with given data buffer- Parameters:
data
- Audio datacopy
- true to use a copy of the data or false to use reference
-
-
Method Details
-
getDataType
public byte getDataType()Getter for data type- Specified by:
getDataType
in interfaceIRTMPEvent
- Specified by:
getDataType
in interfaceIStreamPacket
- Specified by:
getDataType
in classBaseEvent
- Returns:
- Data type
-
setDataType
public void setDataType(byte dataType) -
getData
public org.apache.mina.core.buffer.IoBuffer getData()Getter for property 'data'.- Specified by:
getData
in interfaceIStreamData<AudioData>
- Specified by:
getData
in interfaceIStreamPacket
- Returns:
- Value for property 'data'
-
setData
public void setData(org.apache.mina.core.buffer.IoBuffer data) -
setData
public void setData(byte[] data) -
getCodecId
public int getCodecId() -
isConfig
public boolean isConfig() -
releaseInternal
protected void releaseInternal()Release event- Specified by:
releaseInternal
in classBaseEvent
-
readExternal
- Specified by:
readExternal
in interfaceExternalizable
- Overrides:
readExternal
in classBaseEvent
- Throws:
IOException
ClassNotFoundException
-
writeExternal
- Specified by:
writeExternal
in interfaceExternalizable
- Overrides:
writeExternal
in classBaseEvent
- Throws:
IOException
-
duplicate
Duplicate this message / event.- Specified by:
duplicate
in interfaceIStreamData<AudioData>
- Returns:
- duplicated event
- Throws:
IOException
- on errorClassNotFoundException
- on class not found
-
toString
-