Package com.wowza.wms.amf
Class AMFObj
- Object
-
- com.wowza.wms.amf.AMFObj
-
public class AMFObj extends Object
AMFObj: class that stores the state of channel between the client and the server.
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
AMFDEBUGHEADERSIZE
static boolean
WOWZDEBUGHEADERSIZE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChunk(byte[] buffer, int offset, int len)
Add a chunk to the chunk listvoid
clearByteContainer()
Clear the byte containerlong
getAbsTimecode()
Get the absolute time codeint
getByteContainerLevel()
Fake container for processinglong
getChunkCounter()
java.util.List<AMFObjChunk>
getChunks()
Get the chunks that make up this packetint
getId()
Get channel idint
getObjectEncoding()
long
getSentAbsTimecode()
int
getSize()
Get packet sizeint
getSrc()
Get stream id (0 if not stream data)long
getTimecode()
Get timecode (milliseconds) sometimes relativeint
getType()
Get content type IVHost.CONTENTTYPE_*long
incAbsTimecode(long absTimecode)
Increment the absolution timecodevoid
incByteContainerLevel(int byteContainerLevel)
Fake container for processingboolean
isByteContainerEmpty()
Fake container for processingboolean
isByteContainerFull()
Fake container for processingboolean
isLastSentAbsTimecode()
boolean
isLongTimecode()
Get is a 32 bit timecodeboolean
isNew()
Is this a new packet.boolean
isObjectEncodingAMF0()
boolean
isObjectEncodingAMF3()
long
setAbsTimecodeLong(long absTimecode)
Set the absolute timecodelong
setAbsTimecodeShort(long absTimecode)
Set the absolute timecodevoid
setByteContainerLevel(int byteContainerLevel)
Fake container for processingvoid
setChunkCounter(long chunkCounter)
void
setId(int id)
Set channel idvoid
setLastSentAbsTimecode(boolean isLastSentAbsTimecode)
void
setLongTimecode(boolean isLongTimecode)
Set is a 32 bit timecodevoid
setNew(boolean isNew)
Set is new packetvoid
setObjectEncoding(int objectEncoding)
void
setSentAbsTimecode(long sentAbsTimecode)
void
setSize(int size)
Set packet sizevoid
setSrc(int src)
Set stream id (0 if not stream data)void
setTimecode(long timecode)
Set timecode (milliseconds) sometimes relativevoid
setType(int type)
Set content type IVHost.CONTENTTYPE_*String
toString()
Return object as formatted string
-
-
-
Field Detail
-
AMFDEBUGHEADERSIZE
public static final boolean AMFDEBUGHEADERSIZE
- See Also:
- Constant Field Values
-
WOWZDEBUGHEADERSIZE
public static final boolean WOWZDEBUGHEADERSIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getChunks
public java.util.List<AMFObjChunk> 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
public String toString()
Return object as formatted string- Overrides:
toString
in classObject
-
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)
-
-