org.red5.io.flv.impl
Class Tag

java.lang.Object
  extended by org.red5.io.flv.impl.Tag
All Implemented Interfaces:
IoConstants, ITag

public class Tag
extends Object
implements ITag

A Tag represents the contents or payload of a FLV file.

Author:
The Red5 Project ([email protected]), Dominick Accattato ([email protected]), Luke Hubbard, Codegent Ltd ([email protected])
See Also:
OSFlash (external)

Field Summary
 
Fields 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
Tag()
          Constructs a new Tag.
Tag(byte dataType, int timestamp, int bodySize, IoBuffer body, int previousTagSize)
          TagImpl Constructor
 
Method Summary
 byte getBitflags()
          Getter for bit flags
 IoBuffer getBody()
          Return the body IoBuffer
 int getBodySize()
          Return the size of the body
 IoBuffer getData()
          Returns the data as a ByteBuffer
 byte getDataType()
          Get the data type
 int getPreviousTagSize()
          Return previous tag size
 int getPreviuosTagSize()
          Getter for previous tag size
 int getTimestamp()
          Return the timestamp
 byte getType()
          Getter for tag type
 void setBitflags(byte bitflags)
          Setter for bit flags
 void setBody(IoBuffer body)
          Set the body ByteBuffer.
 void setBodySize(int bodySize)
          Set the size of the body.
 void setData()
          Setter for tag data.
 void setDataType(byte dataType)
          Set the data type.
 void setPreviousTagSize(int size)
          Set the size of the previous tag.
 void setPreviuosTagSize(int previuosTagSize)
          Setter for previous tag size
 void setTimestamp(int timestamp)
          Set the timestamp.
 void setType(byte type)
          Setter for tag type
 String toString()
          Prints out the contents of the tag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Tag

public Tag(byte dataType,
           int timestamp,
           int bodySize,
           IoBuffer body,
           int previousTagSize)
TagImpl Constructor

Parameters:
dataType - Tag data type
timestamp - Timestamp
bodySize - Tag body size
body - Tag body
previousTagSize - Previous tag size information

Tag

public Tag()
Constructs a new Tag.

Method Detail

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

getPreviuosTagSize

public int getPreviuosTagSize()
Getter for previous tag size

Returns:
Value for previous tag size

setPreviuosTagSize

public void setPreviuosTagSize(int previuosTagSize)
Setter for previous tag size

Parameters:
previuosTagSize - Value to set for previous tag size

getData

public IoBuffer getData()
Returns the data as a ByteBuffer

Specified by:
getData in interface ITag
Returns:
ByteBuffer Data as byte buffer

getBody

public IoBuffer getBody()
Return the body IoBuffer

Specified by:
getBody in interface ITag
Returns:
Tag body

getBodySize

public int getBodySize()
Return the size of the body

Specified by:
getBodySize in interface ITag
Returns:
Tag body size

getDataType

public byte getDataType()
Get the data type

Specified by:
getDataType in interface ITag
Returns:
Tag data type

getTimestamp

public int getTimestamp()
Return the timestamp

Specified by:
getTimestamp in interface ITag
Returns:
Tag timestamp

getPreviousTagSize

public int getPreviousTagSize()
Return previous tag size

Specified by:
getPreviousTagSize in interface ITag
Returns:
Previous tag size

toString

public String toString()
Prints out the contents of the tag

Overrides:
toString in class Object
Returns:
Tag contents

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(IoBuffer body)
Set the body ByteBuffer.

Specified by:
setBody in interface ITag
Parameters:
body - Body as ByteBuffer

setBodySize

public void setBodySize(int bodySize)
Set the size of the body.

Specified by:
setBodySize in interface ITag
Parameters:
bodySize - Body size

setDataType

public void setDataType(byte dataType)
Set the data type.

Specified by:
setDataType in interface ITag
Parameters:
dataType - Data type

setTimestamp

public void setTimestamp(int timestamp)
Set the timestamp.

Specified by:
setTimestamp in interface ITag
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:
setPreviousTagSize in interface ITag
Parameters:
size - Previous tag size


Copyright © 2006-2012 The Red5 Project