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 boolean
static final boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChunk
(byte[] buffer, int offset, int len) Add a chunk to the chunk listvoid
Clear the byte containerlong
Get the absolute time codeint
Fake container for processinglong
Get the chunks that make up this packetint
getId()
Get channel idint
long
int
getSize()
Get packet sizeint
getSrc()
Get stream id (0 if not stream data)long
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
Fake container for processingboolean
Fake container for processingboolean
boolean
Get is a 32 bit timecodeboolean
isNew()
Is this a new packet.boolean
boolean
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_*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)
-