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 Details

  • 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 id
      objectEncoding - object encoding level (AMF0 or AMF3)
  • Method Details

    • getChunks

      public 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 - buffer
      offset - offset
      len - 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 class Object
    • 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)