com.arunta.base.audio.streaming
Class StreamPacket

java.lang.Object
  extended by com.arunta.base.audio.streaming.StreamPacket
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
StreamControlPacket, StreamMediaPacket

public class StreamPacket
extends java.lang.Object
implements java.io.Serializable

Base class for audio stream packets sent to remote clients.

Each packet which is part of an audio stream has a sequence number which identifies the position of the packet in the stream of packet that are sent to the remote client.

In addition, if the remote client is receiving multiple streams, each packet carries a stream identifier.

See Also:
Serialized Form

Field Summary
protected  int channelNumber
           
protected  int packetType
           
protected  int recorderId
           
protected  int seqNo
           
static int STREAM_CONTROL
          Identifier for stream control packet.
static int STREAM_MEDIA
          Identifier for media packets.
protected  int streamId
           
 
Constructor Summary
StreamPacket(int packetType)
          Creates a packet which is of the specified type.
 
Method Summary
 int getChannelNumber()
           
 int getPacketType()
           
 int getRecorderId()
           
 int getSeqNo()
           
 int getStreamId()
           
 void setChannelNumber(int channelNumber)
           
 void setPacketType(int packetType)
           
 void setRecorderId(int recorderId)
           
 void setSeqNo(int seqNo)
           
 void setStreamId(int streamId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STREAM_CONTROL

public static final int STREAM_CONTROL
Identifier for stream control packet.

See Also:
Constant Field Values

STREAM_MEDIA

public static final int STREAM_MEDIA
Identifier for media packets.

See Also:
Constant Field Values

packetType

protected int packetType

seqNo

protected int seqNo

recorderId

protected int recorderId

channelNumber

protected int channelNumber

streamId

protected int streamId
Constructor Detail

StreamPacket

public StreamPacket(int packetType)
Creates a packet which is of the specified type.

Parameters:
packetType - One of STREAM_CONTROL or STREAM_MEDIA.
Method Detail

getPacketType

public int getPacketType()
Returns:
One of STREAM_CONTROL or STREAM_MEDIA

setPacketType

public void setPacketType(int packetType)
Parameters:
packetType - One of STREAM_CONTROL or STREAM_MEDIA.

getSeqNo

public int getSeqNo()

setSeqNo

public void setSeqNo(int seqNo)

getRecorderId

public int getRecorderId()

setRecorderId

public void setRecorderId(int recorderId)

getChannelNumber

public int getChannelNumber()

setChannelNumber

public void setChannelNumber(int channelNumber)

setStreamId

public void setStreamId(int streamId)

getStreamId

public int getStreamId()


Copyright ©, 2005-2012 Prolancer Pty Ltd, Sydney Australia.