Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.neomedia.conference
Class InputStreamDesc

java.lang.Object
  extended by net.java.sip.communicator.impl.neomedia.conference.InputStreamDesc

 class InputStreamDesc
extends Object

Describes additional information about a specific input audio SourceStream of an AudioMixer so that the AudioMixer can, for example, quickly discover the output AudioMixingPushBufferDataSource in the mix of which the contribution of the SourceStream is to not be included.

Private to AudioMixer and AudioMixerPushBufferStream but extracted into its own file for the sake of clarity.

Author:
Lyubomir Marinov

Field Summary
 InputDataSourceDesc inputDataSourceDesc
          The DataSource which created the SourceStream described by this instance and additional information about it.
(package private)  long nonContributingReadCount
          The number of reads of this input stream which did not return any samples.
 
Constructor Summary
InputStreamDesc(javax.media.protocol.SourceStream inputStream, InputDataSourceDesc inputDataSourceDesc)
          Initializes a new InputStreamDesc instance which is to describe additional information about a specific input audio SourceStream of an AudioMixer.
 
Method Summary
 javax.media.Buffer getBuffer(boolean create)
          Gets the Buffer into which media data is to be read from the SourceStream described by this instance.
 javax.media.protocol.SourceStream getInputStream()
          Gets the SourceStream described by this instance.
 AudioMixingPushBufferDataSource getOutputDataSource()
          Gets the AudioMixingPushBufferDataSource in which the mix contribution of the SourceStream described by this instance is to not be included.
 void setBuffer(javax.media.Buffer buffer)
          Sets the Buffer into which media data is to be read from the SourceStream described by this instance.
 void setInputStream(javax.media.protocol.SourceStream inputStream)
          Sets the SourceStream to be described by this instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inputDataSourceDesc

public final InputDataSourceDesc inputDataSourceDesc
The DataSource which created the SourceStream described by this instance and additional information about it.


nonContributingReadCount

long nonContributingReadCount
The number of reads of this input stream which did not return any samples.

Constructor Detail

InputStreamDesc

public InputStreamDesc(javax.media.protocol.SourceStream inputStream,
                       InputDataSourceDesc inputDataSourceDesc)
Initializes a new InputStreamDesc instance which is to describe additional information about a specific input audio SourceStream of an AudioMixer. Associates the specified SourceStream with the DataSource which created it and additional information about it.

Parameters:
inputStream - a SourceStream for which additional information is to be described by the new instance
inputDataSourceDesc - the DataSource which created the SourceStream to be described by the new instance and additional information about it
Method Detail

getBuffer

public javax.media.Buffer getBuffer(boolean create)
Gets the Buffer into which media data is to be read from the SourceStream described by this instance.

Parameters:
create - the indicator which determines whether the Buffer is to be created in case it does not exist
Returns:
the Buffer into which media data is to be read from the SourceStream described by this instance

getInputStream

public javax.media.protocol.SourceStream getInputStream()
Gets the SourceStream described by this instance.

Returns:
the SourceStream described by this instance

getOutputDataSource

public AudioMixingPushBufferDataSource getOutputDataSource()
Gets the AudioMixingPushBufferDataSource in which the mix contribution of the SourceStream described by this instance is to not be included.

Returns:
the AudioMixingPushBufferDataSource in which the mix contribution of the SourceStream described by this instance is to not be included

setBuffer

public void setBuffer(javax.media.Buffer buffer)
Sets the Buffer into which media data is to be read from the SourceStream described by this instance.

Parameters:
buffer - the Buffer into which media data is to be read from the SourceStream described by this instance

setInputStream

public void setInputStream(javax.media.protocol.SourceStream inputStream)
Sets the SourceStream to be described by this instance.

Parameters:
inputStream - the SourceStream to be described by this instance

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.