public class MacCoreaudioStream extends AbstractPullBufferStream<DataSource>
dataSource, formatControl
Constructor and Description |
---|
MacCoreaudioStream(DataSource dataSource,
javax.media.control.FormatControl formatControl,
boolean audioQualityImprovement)
Initializes a new MacCoreaudioStream instance which is to have
its Format-related information abstracted by a specific
FormatControl.
|
Modifier and Type | Method and Description |
---|---|
protected javax.media.Format |
doGetFormat()
Gets the Format of this PullBufferStream as directly
known by it.
|
void |
read(javax.media.Buffer buffer)
Reads media data from this PullBufferStream into a specific
Buffer with blocking.
|
void |
readInput(byte[] buffer,
int bufferLength)
Callback which receives the data from the coreaudio library.
|
(package private) void |
setDeviceUID(java.lang.String deviceUID)
Sets the device index of the MacCoreaudio device to be read through this
PullBufferStream.
|
void |
start()
Starts the transfer of media data from this PullBufferStream.
|
void |
stop()
Stops the transfer of media data from this PullBufferStream.
|
willReadBlock
close, doSetFormat, endOfStream, getContentDescriptor, getContentLength, getControls, getFormat
getControl, getControl, queryInterface, queryInterface
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public MacCoreaudioStream(DataSource dataSource, javax.media.control.FormatControl formatControl, boolean audioQualityImprovement)
dataSource
- the DataSource which is creating the new
instance so that it becomes one of its streamsformatControl
- the FormatControl which is to abstract the
Format-related information of the new instanceaudioQualityImprovement
- true to enable audio quality
improvement for the new instance in accord with the preferences of the
user or false to completely disable audio quality improvementprotected javax.media.Format doGetFormat()
doGetFormat
in class AbstractBufferStream<DataSource>
AbstractBufferStream.doGetFormat()
public void read(javax.media.Buffer buffer) throws java.io.IOException
buffer
- the Buffer in which media data is to be read from
this PullBufferStreamjava.io.IOException
- if anything goes wrong while reading media data from
this PullBufferStream into the specified bufferpublic void readInput(byte[] buffer, int bufferLength)
buffer
- The data captured from the input.bufferLength
- The length of the data captured.void setDeviceUID(java.lang.String deviceUID)
deviceID
- The ID of the device used to be read trough this
MacCoreaudioStream. This String contains the deviceUID, or if not
available, the device name. If set to null, then there was no device
used before the update.public void start() throws java.io.IOException
start
in class AbstractBufferStream<DataSource>
java.io.IOException
- if anything goes wrong while starting the transfer of
media data from this AbstractBufferStreampublic void stop() throws java.io.IOException
stop
in class AbstractBufferStream<DataSource>
java.io.IOException
- if anything goes wrong while stopping the transfer of
media data from this AbstractBufferStream
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.