Package com.wowza.wms.amf
Class AMFObj
Object
com.wowza.wms.amf.AMFObj
AMFObj: class that stores the state of channel between the client and the server.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanstatic final boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChunk(byte[] buffer, int offset, int len) Add a chunk to the chunk listvoidClear the byte containerlongGet the absolute time codeintFake container for processinglongGet the chunks that make up this packetintgetId()Get channel idintlongintgetSize()Get packet sizeintgetSrc()Get stream id (0 if not stream data)longGet timecode (milliseconds) sometimes relativeintgetType()Get content type IVHost.CONTENTTYPE_*longincAbsTimecode(long absTimecode) Increment the absolution timecodevoidincByteContainerLevel(int byteContainerLevel) Fake container for processingbooleanFake container for processingbooleanFake container for processingbooleanbooleanGet is a 32 bit timecodebooleanisNew()Is this a new packet.booleanbooleanlongsetAbsTimecodeLong(long absTimecode) Set the absolute timecodelongsetAbsTimecodeShort(long absTimecode) Set the absolute timecodevoidsetByteContainerLevel(int byteContainerLevel) Fake container for processingvoidsetChunkCounter(long chunkCounter) voidsetId(int id) Set channel idvoidsetLastSentAbsTimecode(boolean isLastSentAbsTimecode) voidsetLongTimecode(boolean isLongTimecode) Set is a 32 bit timecodevoidsetNew(boolean isNew) Set is new packetvoidsetObjectEncoding(int objectEncoding) voidsetSentAbsTimecode(long sentAbsTimecode) voidsetSize(int size) Set packet sizevoidsetSrc(int src) Set stream id (0 if not stream data)voidsetTimecode(long timecode) Set timecode (milliseconds) sometimes relativevoidsetType(int type) Set content type IVHost.CONTENTTYPE_*toString()Return object as formatted string
-
Field Details
-
AMFDEBUGHEADERSIZE
public static final boolean AMFDEBUGHEADERSIZE- See Also:
-
WOWZDEBUGHEADERSIZE
public static final boolean WOWZDEBUGHEADERSIZE- See Also:
-
-
Constructor Details
-
AMFObj
public AMFObj(int id) Create new AMFObj for a given channel (id)- Parameters:
id- channel id
-
AMFObj
public AMFObj(int id, int objectEncoding) Create new AMFObj for a given channel (id)- Parameters:
id- channel idobjectEncoding- object encoding level (AMF0 or AMF3)
-
-
Method Details
-
getChunks
Get the chunks that make up this packet- Returns:
- chunks that make up this packet
-
addChunk
public void addChunk(byte[] buffer, int offset, int len) Add a chunk to the chunk list- Parameters:
buffer- bufferoffset- offsetlen- length
-
getId
public int getId()Get channel id- Returns:
- channel id
-
setId
public void setId(int id) Set channel id- Parameters:
id- channel id
-
getSize
public int getSize()Get packet size- Returns:
- packet size
-
setSize
public void setSize(int size) Set packet size- Parameters:
size- packet size
-
getType
public int getType()Get content type IVHost.CONTENTTYPE_*- Returns:
- content type
-
setType
public void setType(int type) Set content type IVHost.CONTENTTYPE_*- Parameters:
type- content type
-
getSrc
public int getSrc()Get stream id (0 if not stream data)- Returns:
- stream id
-
setSrc
public void setSrc(int src) Set stream id (0 if not stream data)- Parameters:
src- stream id
-
toString
Return object as formatted string -
getTimecode
public long getTimecode()Get timecode (milliseconds) sometimes relative- Returns:
- timecode (milliseconds)
-
setTimecode
public void setTimecode(long timecode) Set timecode (milliseconds) sometimes relative- Parameters:
timecode- timecode (milliseconds)
-
isNew
public boolean isNew()Is this a new packet. If new entire packet header needs to be sent- Returns:
- is new packet
-
setNew
public void setNew(boolean isNew) Set is new packet- Parameters:
isNew- is new packet
-
getAbsTimecode
public long getAbsTimecode()Get the absolute time code- Returns:
- absolute timecode
-
setAbsTimecodeLong
public long setAbsTimecodeLong(long absTimecode) Set the absolute timecode- Parameters:
absTimecode- absolute timecode- Returns:
- absolute timecode
-
setAbsTimecodeShort
public long setAbsTimecodeShort(long absTimecode) Set the absolute timecode- Parameters:
absTimecode-- Returns:
- absolute timecode
-
incAbsTimecode
public long incAbsTimecode(long absTimecode) Increment the absolution timecode- Parameters:
absTimecode- absolute timecode- Returns:
- absolute timecode
-
getByteContainerLevel
public int getByteContainerLevel()Fake container for processing- Returns:
- current container level
-
clearByteContainer
public void clearByteContainer()Clear the byte container -
setByteContainerLevel
public void setByteContainerLevel(int byteContainerLevel) Fake container for processing- Parameters:
byteContainerLevel- current container level
-
incByteContainerLevel
public void incByteContainerLevel(int byteContainerLevel) Fake container for processing- Parameters:
byteContainerLevel- current container level
-
isByteContainerEmpty
public boolean isByteContainerEmpty()Fake container for processing- Returns:
- is container full
-
isByteContainerFull
public boolean isByteContainerFull()Fake container for processing- Returns:
- is container full
-
isLongTimecode
public boolean isLongTimecode()Get is a 32 bit timecode- Returns:
- true if 32 bit timecode
-
setLongTimecode
public void setLongTimecode(boolean isLongTimecode) Set is a 32 bit timecode- Parameters:
isLongTimecode- is a 32 bit timecode
-
isLastSentAbsTimecode
public boolean isLastSentAbsTimecode() -
setLastSentAbsTimecode
public void setLastSentAbsTimecode(boolean isLastSentAbsTimecode) -
isObjectEncodingAMF3
public boolean isObjectEncodingAMF3() -
isObjectEncodingAMF0
public boolean isObjectEncodingAMF0() -
setObjectEncoding
public void setObjectEncoding(int objectEncoding) -
getObjectEncoding
public int getObjectEncoding() -
getChunkCounter
public long getChunkCounter() -
setChunkCounter
public void setChunkCounter(long chunkCounter) -
getSentAbsTimecode
public long getSentAbsTimecode() -
setSentAbsTimecode
public void setSentAbsTimecode(long sentAbsTimecode)
-