com.cloudgarden.audio
Class CGPullBufferDataSource

java.lang.Object
  |
  +--javax.media.protocol.DataSource
        |
        +--javax.media.protocol.PullBufferDataSource
              |
              +--com.cloudgarden.audio.CGPullBufferDataSource
All Implemented Interfaces:
javax.media.Controls, javax.media.protocol.Controls, javax.media.Duration

public class CGPullBufferDataSource
extends javax.media.protocol.PullBufferDataSource

This class should only be created by the JSAPI implementation - a new instance is created and returned by a call to CGAudioManager.getDataSource


Field Summary
protected static boolean DEBUG
           
protected  AudioSource src
           
protected  javax.media.protocol.PullBufferStream[] streams
           
 
Fields inherited from interface javax.media.Duration
DURATION_UNBOUNDED, DURATION_UNKNOWN
 
Constructor Summary
CGPullBufferDataSource(AudioSource src)
          Creates new CGDataSource
 
Method Summary
 void connect()
           
 void disconnect()
           
 java.lang.String getContentType()
           
 java.lang.Object getControl(java.lang.String str)
           
 java.lang.Object[] getControls()
           
 javax.media.Time getDuration()
           
 boolean getKeepOpen()
           
 javax.media.MediaLocator getLocator()
           
 boolean getRealTime()
           
 javax.media.protocol.PullBufferStream[] getStreams()
           
static void main(java.lang.String[] args)
           
 void setKeepOpen(boolean keepOpen)
          If keepOpen is true, the DataSource will fill the data buffers with blank data when there is no data available, instead of returning zero data.
 void setLocator(javax.media.MediaLocator loc)
           
 void setRealTime(boolean realTime)
          If realTime is true, causes this DataSource to delay inside of calls to read(Buffer) so that the data is released no faster than real-time (otherwise it may be released much faster than real time which may cause a problem if sending the data to an RTP client).
 void start()
           
 void stop()
           
 
Methods inherited from class javax.media.protocol.DataSource
initCheck
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

src

protected AudioSource src

DEBUG

protected static final boolean DEBUG

streams

protected javax.media.protocol.PullBufferStream[] streams
Constructor Detail

CGPullBufferDataSource

public CGPullBufferDataSource(AudioSource src)
Creates new CGDataSource
Method Detail

setRealTime

public void setRealTime(boolean realTime)
If realTime is true, causes this DataSource to delay inside of calls to read(Buffer) so that the data is released no faster than real-time (otherwise it may be released much faster than real time which may cause a problem if sending the data to an RTP client).

setKeepOpen

public void setKeepOpen(boolean keepOpen)
If keepOpen is true, the DataSource will fill the data buffers with blank data when there is no data available, instead of returning zero data.

getKeepOpen

public boolean getKeepOpen()
See Also:
setKeepOpen(boolean)

getRealTime

public boolean getRealTime()
See Also:
setRealTime(boolean)

getStreams

public javax.media.protocol.PullBufferStream[] getStreams()
Overrides:
getStreams in class javax.media.protocol.PullBufferDataSource

getControls

public java.lang.Object[] getControls()
Overrides:
getControls in class javax.media.protocol.DataSource

disconnect

public void disconnect()
Overrides:
disconnect in class javax.media.protocol.DataSource

start

public void start()
           throws java.io.IOException
Overrides:
start in class javax.media.protocol.DataSource

getDuration

public javax.media.Time getDuration()
Overrides:
getDuration in class javax.media.protocol.DataSource

stop

public void stop()
          throws java.io.IOException
Overrides:
stop in class javax.media.protocol.DataSource

getControl

public java.lang.Object getControl(java.lang.String str)
Overrides:
getControl in class javax.media.protocol.DataSource

getContentType

public java.lang.String getContentType()
Overrides:
getContentType in class javax.media.protocol.DataSource

connect

public void connect()
             throws java.io.IOException
Overrides:
connect in class javax.media.protocol.DataSource

getLocator

public javax.media.MediaLocator getLocator()
Overrides:
getLocator in class javax.media.protocol.DataSource

setLocator

public void setLocator(javax.media.MediaLocator loc)
Overrides:
setLocator in class javax.media.protocol.DataSource

main

public static void main(java.lang.String[] args)