|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.impl.neomedia.control.AbstractControls
net.java.sip.communicator.impl.neomedia.control.ControlsAdapter
net.java.sip.communicator.impl.neomedia.jmfext.media.protocol.alsa.AlsaStream
public class AlsaStream
low-latency ALSA access through JNI wrapper
| Field Summary | |
|---|---|
protected javax.media.format.AudioFormat |
audioFormat
|
protected javax.media.protocol.ContentDescriptor |
cd
|
protected int |
maxDataLength
|
(package private) int |
seqNo
|
protected boolean |
started
|
protected Thread |
thread
|
protected javax.media.protocol.BufferTransferHandler |
transferHandler
|
| Fields inherited from class net.java.sip.communicator.impl.neomedia.control.ControlsAdapter |
|---|
EMPTY_CONTROLS |
| Fields inherited from interface javax.media.protocol.SourceStream |
|---|
LENGTH_UNKNOWN |
| Constructor Summary | |
|---|---|
AlsaStream()
We only provide 8 kbps access to the device for now In addition, datablock size is fixed to 160 samples (320 bytes) This turns out to be 20ms worth of samples at 8kbps Very convenient for ilbc 20ms mode... |
|
| Method Summary | |
|---|---|
boolean |
endOfStream()
The stream of happiness never ends, somehow. |
javax.media.protocol.ContentDescriptor |
getContentDescriptor()
We are providing access to raw data |
long |
getContentLength()
Come on, we are streaming. |
javax.media.Format |
getFormat()
Tell whoever has interest how we are going to send the data |
void |
read(javax.media.Buffer buffer)
Reads sample data using native call |
void |
run()
Transfer Buffer information through current thread then sleep until next data slice is ready. |
void |
setTransferHandler(javax.media.protocol.BufferTransferHandler transferHandler)
Dunno about that piece yet... |
(package private) void |
start(boolean started)
Starts a new thread for the stream operation |
| Methods inherited from class net.java.sip.communicator.impl.neomedia.control.ControlsAdapter |
|---|
getControls |
| Methods inherited from class net.java.sip.communicator.impl.neomedia.control.AbstractControls |
|---|
getControl, getControl |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.media.Controls |
|---|
getControl, getControls |
| Field Detail |
|---|
protected javax.media.protocol.ContentDescriptor cd
protected int maxDataLength
protected javax.media.format.AudioFormat audioFormat
protected boolean started
protected Thread thread
protected javax.media.protocol.BufferTransferHandler transferHandler
int seqNo
| Constructor Detail |
|---|
public AlsaStream()
| Method Detail |
|---|
public javax.media.protocol.ContentDescriptor getContentDescriptor()
getContentDescriptor in interface javax.media.protocol.SourceStreampublic long getContentLength()
getContentLength in interface javax.media.protocol.SourceStreampublic boolean endOfStream()
endOfStream in interface javax.media.protocol.SourceStreampublic javax.media.Format getFormat()
getFormat in interface javax.media.protocol.PushBufferStream
public void read(javax.media.Buffer buffer)
throws IOException
read in interface javax.media.protocol.PushBufferStreambuffer - A Buffer with byte array as data, large enough to be
filled with sample data. If this is not the case, we are going
to allocate it ourselves anyway and replace the current data.
IOException - Native method might throw an exception.
Well actually that would surprise me because it is not
implemented, but we love to be future-proof, isn't it ?public void setTransferHandler(javax.media.protocol.BufferTransferHandler transferHandler)
setTransferHandler in interface javax.media.protocol.PushBufferStreamvoid start(boolean started)
public void run()
run in interface Runnable
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||