org.mobicents.media.server.impl.resource.audio.soundcard
Class PlayerImpl

java.lang.Object
  extended by org.mobicents.media.server.impl.BaseComponent
      extended by org.mobicents.media.server.impl.AbstractSink
          extended by org.mobicents.media.server.impl.resource.audio.soundcard.PlayerImpl
All Implemented Interfaces:
java.io.Serializable, org.mobicents.media.Component, org.mobicents.media.MediaSink, org.mobicents.media.server.spi.resource.Player

public class PlayerImpl
extends AbstractSink
implements org.mobicents.media.server.spi.resource.Player

PlayerImpl is to play audio to hardware

Author:
amit bhayani
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mobicents.media.server.impl.AbstractSink
otherParty
 
Constructor Summary
PlayerImpl(java.lang.String name)
           
 
Method Summary
 org.mobicents.media.Format[] getFormats()
           
 boolean isAcceptable(org.mobicents.media.Format format)
           
 void onMediaTransfer(org.mobicents.media.Buffer buffer)
          This methos is called when new portion of media arrives.
 void start()
          (Non Java-doc).
 void stop()
          (Non Java-doc).
 
Methods inherited from class org.mobicents.media.server.impl.AbstractSink
connect, connect, disconnect, disconnect, failed, getBytesReceived, getPacketsReceived, isConnected, isMultipleConnectionsAllowed, isStarted, receive, resetStats, started, stopped
 
Methods inherited from class org.mobicents.media.server.impl.BaseComponent
addListener, getConnection, getEndpoint, getId, getName, getResourceType, removeListener, sendEvent, setConnection, setEndpoint, setResourceType, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mobicents.media.MediaSink
connect, connect, disconnect, disconnect, getBytesReceived, getPacketsReceived, isConnected, isMultipleConnectionsAllowed, isStarted, receive
 
Methods inherited from interface org.mobicents.media.Component
addListener, getConnection, getEndpoint, getId, getName, removeListener, resetStats, setConnection, setEndpoint
 

Constructor Detail

PlayerImpl

public PlayerImpl(java.lang.String name)
Method Detail

onMediaTransfer

public void onMediaTransfer(org.mobicents.media.Buffer buffer)
                     throws java.io.IOException
Description copied from class: AbstractSink
This methos is called when new portion of media arrives.

Specified by:
onMediaTransfer in class AbstractSink
Parameters:
buffer - the new portion of media data.
Throws:
java.io.IOException

getFormats

public org.mobicents.media.Format[] getFormats()
Specified by:
getFormats in interface org.mobicents.media.MediaSink

isAcceptable

public boolean isAcceptable(org.mobicents.media.Format format)
Specified by:
isAcceptable in interface org.mobicents.media.MediaSink

stop

public void stop()
Description copied from class: AbstractSink
(Non Java-doc).

Specified by:
stop in interface org.mobicents.media.Component
Overrides:
stop in class AbstractSink
See Also:
Component.stop().

start

public void start()
Description copied from class: AbstractSink
(Non Java-doc).

Specified by:
start in interface org.mobicents.media.Component
Overrides:
start in class AbstractSink
See Also:
Component.start().


Copyright © 2009. All Rights Reserved.