Package org.red5.server.net.rtmp.event
Class VideoData
java.lang.Object
org.red5.server.net.rtmp.event.BaseEvent
org.red5.server.net.rtmp.event.VideoData
- All Implemented Interfaces:
Externalizable,Serializable,IoConstants,IEvent,IStreamPacket,IRTMPEvent,Constants,IStreamData<VideoData>
public class VideoData
extends BaseEvent
implements IoConstants, IStreamData<VideoData>, IStreamPacket
Video data event
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.red5.server.net.rtmp.message.Constants
Constants.DataTypeNested classes/interfaces inherited from interface org.red5.server.api.event.IEvent
IEvent.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected VideoCodecVideo codecprotected booleanTrue if this is configuration data and false otherwiseprotected org.apache.mina.core.buffer.IoBufferVideo dataprotected booleanTrue if this indicates an end-of-sequence and false otherwiseprotected VideoData.FrameTypeFrame type, unknown by defaultFields inherited from class org.red5.server.net.rtmp.event.BaseEvent
header, log, object, refcount, source, sourceType, timestampFields 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_DATAFields inherited from interface org.red5.io.IoConstants
AVC_PACKET_TYPE_END_OF_SEQUENCE, AVC_PACKET_TYPE_NALU, AVC_PACKET_TYPE_SEQUENCE_HEADER, FLAG_CODEC_H263, FLAG_CODEC_SCREEN, FLAG_CODEC_VP6, FLAG_FORMAT_ADPCM, FLAG_FORMAT_MP3, FLAG_FORMAT_NELLYMOSER, FLAG_FORMAT_NELLYMOSER_8_KHZ, FLAG_FORMAT_RAW, FLAG_FRAMETYPE_DISPOSABLE, FLAG_FRAMETYPE_GENERATED_KEYFRAME, FLAG_FRAMETYPE_INFO, FLAG_FRAMETYPE_INTERFRAME, FLAG_FRAMETYPE_KEYFRAME, FLAG_RATE_11_KHZ, FLAG_RATE_22_KHZ, FLAG_RATE_44_KHZ, FLAG_RATE_48_KHZ, FLAG_RATE_5_5_KHZ, FLAG_SIZE_16_BIT, FLAG_SIZE_8_BIT, FLAG_TYPE_MONO, FLAG_TYPE_STEREO, INFO_PACKET_SEEK_END, INFO_PACKET_SEEK_START, MASK_SOUND_FORMAT, MASK_SOUND_RATE, MASK_SOUND_SIZE, MASK_SOUND_TYPE, MASK_VIDEO_CODEC, MASK_VIDEO_FRAMETYPE, TYPE_AUDIO, TYPE_ENCRYPTED, TYPE_ENCRYPTED_AUDIO, TYPE_ENCRYPTED_METADATA, TYPE_ENCRYPTED_VIDEO, TYPE_METADATA, TYPE_VIDEO -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDuplicate this message / event.intorg.apache.mina.core.buffer.IoBuffergetData()Getter for property 'data'.byteGetter for data typeGetter for frame typebooleanisConfig()booleanvoidprotected voidRelease eventvoidsetData(byte[] data) voidsetData(org.apache.mina.core.buffer.IoBuffer data) voidsetDataType(byte dataType) toString()voidMethods inherited from class org.red5.server.net.rtmp.event.BaseEvent
equals, getHeader, getObject, getSource, getSourceType, getTimestamp, getType, hashCode, hasSource, release, retain, setHeader, setSource, setSourceType, setTimestamp, setTypeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.red5.server.api.stream.IStreamPacket
getTimestamp
-
Field Details
-
data
protected org.apache.mina.core.buffer.IoBuffer dataVideo data -
frameType
Frame type, unknown by default -
codec
Video codec -
config
protected boolean configTrue if this is configuration data and false otherwise -
endOfSequence
protected boolean endOfSequenceTrue if this indicates an end-of-sequence and false otherwise
-
-
Constructor Details
-
VideoData
public VideoData()Constructs a new VideoData. -
VideoData
public VideoData(org.apache.mina.core.buffer.IoBuffer data) Create video data event with given data buffer- Parameters:
data- Video data
-
VideoData
public VideoData(org.apache.mina.core.buffer.IoBuffer data, boolean copy) Create video data event with given data buffer- Parameters:
data- Video 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:
getDataTypein interfaceIRTMPEvent- Specified by:
getDataTypein interfaceIStreamPacket- Specified by:
getDataTypein 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:
getDatain interfaceIStreamData<VideoData>- Specified by:
getDatain interfaceIStreamPacket- Returns:
- Value for property 'data'
-
setData
public void setData(org.apache.mina.core.buffer.IoBuffer data) -
setData
public void setData(byte[] data) -
getFrameType
Getter for frame type- Returns:
- Type of video frame
-
getCodecId
public int getCodecId() -
isConfig
public boolean isConfig() -
isEndOfSequence
public boolean isEndOfSequence() -
releaseInternal
protected void releaseInternal()Release event- Specified by:
releaseInternalin classBaseEvent
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Overrides:
readExternalin classBaseEvent- Throws:
IOExceptionClassNotFoundException
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Overrides:
writeExternalin classBaseEvent- Throws:
IOException
-
duplicate
Duplicate this message / event.- Specified by:
duplicatein interfaceIStreamData<VideoData>- Returns:
- duplicated event
- Throws:
IOException- on errorClassNotFoundException- on class not found
-
toString
-