Package org.red5.io.flv.impl
Class Tag
java.lang.Object
org.red5.io.flv.impl.Tag
- All Implemented Interfaces:
IoConstants,ITag
A Tag represents the contents or payload of a FLV file.
- Author:
- The Red5 Project, Dominick Accattato ([email protected]), Luke Hubbard, Codegent Ltd ([email protected])
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate byteBit flagsprivate org.apache.mina.core.buffer.IoBufferTag body as byte bufferprivate intTag body sizeprivate byteTag data typeprivate intPrevious tag sizeprivate intTimestampprivate byteTag typeFields 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 TypeMethodDescriptionbyteGetter for bit flagsorg.apache.mina.core.buffer.IoBuffergetBody()Return the body IoBufferintReturn the size of the bodyorg.apache.mina.core.buffer.IoBuffergetData()Returns the data as a ByteBufferbyteGet the data typeintReturn previous tag sizeintReturn the timestampbytegetType()Getter for tag typevoidsetBitflags(byte bitflags) Setter for bit flagsvoidsetBody(org.apache.mina.core.buffer.IoBuffer body) Set the body ByteBuffer.voidsetBodySize(int bodySize) Set the size of the body.voidsetData()Setter for tag data.voidsetDataType(byte dataType) Set the data type.voidsetPreviousTagSize(int size) Set the size of the previous tag.voidsetTimestamp(int timestamp) Set the timestamp.voidsetType(byte type) Setter for tag typetoString()Prints out the contents of the tag
-
Field Details
-
type
private byte typeTag type -
dataType
private byte dataTypeTag data type -
timestamp
private int timestampTimestamp -
bodySize
private int bodySizeTag body size -
body
private org.apache.mina.core.buffer.IoBuffer bodyTag body as byte buffer -
previousTagSize
private int previousTagSizePrevious tag size -
bitflags
private byte bitflagsBit flags
-
-
Constructor Details
-
Tag
public Tag(byte dataType, int timestamp, int bodySize, org.apache.mina.core.buffer.IoBuffer body, int previousTagSize) TagImpl Constructor- Parameters:
dataType- Tag data typetimestamp- TimestampbodySize- Tag body sizebody- Tag bodypreviousTagSize- Previous tag size information
-
Tag
public Tag()Constructs a new Tag.
-
-
Method Details
-
getBitflags
public byte getBitflags()Getter for bit flags- Returns:
- Value for bit flags
-
setBitflags
public void setBitflags(byte bitflags) Setter for bit flags- Parameters:
bitflags- Bit flags
-
getData
public org.apache.mina.core.buffer.IoBuffer getData()Returns the data as a ByteBuffer -
getBody
public org.apache.mina.core.buffer.IoBuffer getBody()Return the body IoBuffer -
getBodySize
public int getBodySize()Return the size of the body- Specified by:
getBodySizein interfaceITag- Returns:
- Tag body size
-
getDataType
public byte getDataType()Get the data type- Specified by:
getDataTypein interfaceITag- Returns:
- Tag data type
-
getTimestamp
public int getTimestamp()Return the timestamp- Specified by:
getTimestampin interfaceITag- Returns:
- Tag timestamp
-
getPreviousTagSize
public int getPreviousTagSize()Return previous tag size- Specified by:
getPreviousTagSizein interfaceITag- Returns:
- Previous tag size
-
toString
Prints out the contents of the tag -
getType
public byte getType()Getter for tag type- Returns:
- Tag type
-
setType
public void setType(byte type) Setter for tag type- Parameters:
type- Tag type
-
setBody
public void setBody(org.apache.mina.core.buffer.IoBuffer body) Set the body ByteBuffer. -
setBodySize
public void setBodySize(int bodySize) Set the size of the body.- Specified by:
setBodySizein interfaceITag- Parameters:
bodySize- Body size
-
setDataType
public void setDataType(byte dataType) Set the data type.- Specified by:
setDataTypein interfaceITag- Parameters:
dataType- Data type
-
setTimestamp
public void setTimestamp(int timestamp) Set the timestamp.- Specified by:
setTimestampin interfaceITag- Parameters:
timestamp- Timestamp
-
setData
public void setData()Setter for tag data. Empty method. -
setPreviousTagSize
public void setPreviousTagSize(int size) Set the size of the previous tag.- Specified by:
setPreviousTagSizein interfaceITag- Parameters:
size- Previous tag size
-