|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--cnrg.itx.datax.devices.NetworkSource
Class to implement the network source. The network source acts as the network endpoint of a connection. It listens to the network pushes data into the channel.
Inner Class Summary | |
(package private) class |
NetworkSource.ChannelFeeder
Private class to implement a channel feeder. |
Field Summary | |
(package private) BufferQueue |
bq
Buffer to reorder and provide flow control for RTP packets. |
(package private) byte[] |
bSilence
Holds a the silence packet |
private int |
bytesWritten
Attribute for storing the number of bytes written by this source. |
(package private) NetworkSource.ChannelFeeder |
cf
Pulls data from the buffer queue and feeds into the channel. |
private Channel |
channel
Attribute to store the channel for this source. |
private int |
iDevice
Attribute for storing the device ID. |
private static int |
instances
Attribute for storing the device instance number. |
private int |
iNumPackets
Attribute storing number of packets received for this source |
private int |
iSampleSize
Sample size. |
private boolean |
mute
|
(package private) RTPPacketFactory |
rtpFactory
Allows byte arrays to be converted to rtpPackets |
(package private) java.net.DatagramSocket |
socket
Attribute for the netowrk socket which acts as the actual source of data. |
private boolean |
start
Thread start/stop flags |
private java.lang.Thread |
thread
Attribute to store the thread object. |
private boolean |
useFECandRTP
Attribute for sprcifying if the FEC and RTP should be used. |
Constructor Summary | |
NetworkSource(Channel channel,
int iSampleSize)
Constructs a Network object. |
|
NetworkSource(Channel channel,
int iSampleSize,
boolean useFECandRTP)
Constructs a Network object. |
Method Summary | |
void |
close()
Method to close a network source. |
PropertiesCollection |
getProperties()
Returns a collection of properties supported. |
Stats |
getStatistics()
Method to get the statistics from the netowrk source |
boolean |
mute(boolean mute)
Method to mute the network source. |
void |
run()
Method which acts as a thread and pushes data to the channel. |
void |
setPeerProperties(PropertiesCollection pc)
Interface to set the given properties collection into the device. |
void |
setProperties(PropertiesCollection pc)
Sets the given properties collection into the device |
void |
start()
Method to start the network source. |
void |
stop()
Method to stop a netowrk source. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private Channel channel
java.net.DatagramSocket socket
private boolean start
private boolean mute
private static int instances
private int iDevice
private int iSampleSize
private int bytesWritten
private int iNumPackets
private java.lang.Thread thread
BufferQueue bq
NetworkSource.ChannelFeeder cf
RTPPacketFactory rtpFactory
byte[] bSilence
private boolean useFECandRTP
Constructor Detail |
public NetworkSource(Channel channel, int iSampleSize) throws DataException
This is the preferred constructor for this object.
NOTE: Sample size must be EQUAL across remote destination and local source!
channel
- the Channel that this newtwork source is pushing intoiSampleSize
- the sample size of data sent over the networkpublic NetworkSource(Channel channel, int iSampleSize, boolean useFECandRTP) throws DataException
This is the preferred constructor for this object.
NOTE: Sample size must be EQUAL across remote destination and local source!
channel
- the Channel that this newtwork source is pushing intoiSampleSize
- the sample size of data sent over the networkuseFECandRTP
- true if FEC and RTP have to be usedMethod Detail |
public void start()
public void run()
public void stop()
public void close()
public boolean mute(boolean mute)
mute
- true if the device has to be muted and false if it has to be activatedpublic Stats getStatistics()
public PropertiesCollection getProperties() throws DataException
public void setProperties(PropertiesCollection pc) throws DataException
pc
- the set of properties to be set on the devicepublic void setPeerProperties(PropertiesCollection pc) throws DataException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |