public class AudioMixingPushBufferStream extends ControlsAdapter implements javax.media.protocol.PushBufferStream
EMPTY_CONTROLS
Constructor and Description |
---|
AudioMixingPushBufferStream(AudioMixerPushBufferStream audioMixerStream,
AudioMixingPushBufferDataSource dataSource)
Initializes a new AudioMixingPushBufferStream mixing the
input data of a specific AudioMixerPushBufferStream and
excluding from the mix the audio contributions of a specific
AudioMixingPushBufferDataSource.
|
Modifier and Type | Method and Description |
---|---|
boolean |
endOfStream()
Implements
SourceStream.endOfStream() . |
javax.media.protocol.ContentDescriptor |
getContentDescriptor()
Implements
SourceStream.getContentDescriptor() . |
long |
getContentLength()
Implements
SourceStream.getContentLength() . |
AudioMixingPushBufferDataSource |
getDataSource()
Gets the AudioMixingPushBufferDataSource which created and owns
this instance and defines the input data which is to not be mixed in the
output of this PushBufferStream.
|
javax.media.format.AudioFormat |
getFormat()
Implements
PushBufferStream.getFormat() . |
void |
read(javax.media.Buffer buffer)
Implements
PushBufferStream.read(Buffer) . |
(package private) void |
setInSamples(short[][] inSamples,
int maxInSampleCount,
long timeStamp)
Sets the collection of audio sample sets to be mixed in the sense of
audio mixing by this stream when data is read from it.
|
void |
setTransferHandler(javax.media.protocol.BufferTransferHandler transferHandler)
Implements
PushBufferStream.setTransferHandler(BufferTransferHandler) . |
(package private) void |
start()
Starts the pushing of data out of this stream.
|
(package private) void |
stop()
Stops the pushing of data out of this stream.
|
getControls
getControl, getControl, queryInterface, queryInterface
AudioMixingPushBufferStream(AudioMixerPushBufferStream audioMixerStream, AudioMixingPushBufferDataSource dataSource)
audioMixerStream
- the AudioMixerPushBufferStream reading
data from input DataSources and to push it to the new
AudioMixingPushBufferStreamdataSource
- the AudioMixingPushBufferDataSource which has
requested the initialization of the new instance and which defines the
input data to not be mixed in the output of the new instancepublic boolean endOfStream()
SourceStream.endOfStream()
. Delegates to the wrapped
AudioMixerPushBufferStream because this instance is just a facet
to it.endOfStream
in interface javax.media.protocol.SourceStream
public javax.media.protocol.ContentDescriptor getContentDescriptor()
SourceStream.getContentDescriptor()
. Delegates to the
wrapped AudioMixerPushBufferStream because this instance is just
a facet to it.getContentDescriptor
in interface javax.media.protocol.SourceStream
public long getContentLength()
SourceStream.getContentLength()
. Delegates to the
wrapped AudioMixerPushBufferStream because this instance is just
a facet to it.getContentLength
in interface javax.media.protocol.SourceStream
public AudioMixingPushBufferDataSource getDataSource()
public javax.media.format.AudioFormat getFormat()
PushBufferStream.getFormat()
. Delegates to the wrapped
AudioMixerPushBufferStream because this instance is just a facet
to it.getFormat
in interface javax.media.protocol.PushBufferStream
public void read(javax.media.Buffer buffer) throws java.io.IOException
PushBufferStream.read(Buffer)
. If
inSamples are available, mixes them and writes the mix to the
specified Buffer performing the necessary data type conversions.read
in interface javax.media.protocol.PushBufferStream
buffer
- the Buffer to receive the data read from this
instancejava.io.IOException
- if anything wrong happens while reading from this
instancevoid setInSamples(short[][] inSamples, int maxInSampleCount, long timeStamp)
inSamples
- the collection of audio sample sets to be mixed by
this stream when data is read from itmaxInSampleCount
- the maximum number of per-stream audio samples
available through inSamplestimeStamp
- the time stamp of inSamples to be reported
in the specified Buffer when data is read from this instancepublic void setTransferHandler(javax.media.protocol.BufferTransferHandler transferHandler)
PushBufferStream.setTransferHandler(BufferTransferHandler)
. Sets
the BufferTransferHandler which is to be notified by this
instance when it has media available for reading.setTransferHandler
in interface javax.media.protocol.PushBufferStream
transferHandler
- the BufferTransferHandler to be notified
by this instance when it has media available for readingvoid start() throws java.io.IOException
java.io.IOException
- if starting the pushing of data out of this stream
failsvoid stop() throws java.io.IOException
java.io.IOException
- if stopping the pushing of data out of this stream
fails
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.