|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mobicents.media.server.impl.BaseComponent
org.mobicents.media.server.impl.AbstractSink
public abstract class AbstractSink
The base implementation of the media sink.
AbstractSource and AbstractSink are implement
general wiring construct.
All media components have to extend one of these classes.
| Constructor Summary | |
|---|---|
AbstractSink(String name,
Scheduler scheduler)
Creates new instance of sink with specified name. |
|
| Method Summary | ||
|---|---|---|
void |
connect(Pipe pipe)
(Non Java-doc.) |
|
void |
disconnect(Pipe pipe)
(Non Java-doc.) |
|
protected void |
failed(Exception e)
Sends failure notification. |
|
long |
getBytesReceived()
(Non Java-doc). |
|
Processor |
getDsp()
Gets the digital signaling processor associated with this media source |
|
Formats |
getFormats()
(Non Java-doc.) |
|
|
getInterface(Class<T> interfaceType)
|
|
abstract Formats |
getNativeFormats()
Gets the list of formats supported by this component without possible transcoding. |
|
long |
getPacketsReceived()
(Non Java-doc). |
|
boolean |
isConnected()
(Non Java-doc). |
|
boolean |
isStarted()
(Non Java-doc). |
|
abstract void |
onMediaTransfer(Frame frame)
This methos is called when new portion of media arrives. |
|
protected void |
rebuildFormats()
Rebuilds list of supported formats |
|
String |
report()
|
|
void |
reset()
(Non Java-doc.) |
|
void |
setDsp(Processor dsp)
Assigns the digital signaling processor of this component. |
|
void |
setFormats(Formats formats)
(Non Java-doc.) |
|
void |
start()
(Non Java-doc). |
|
protected void |
started()
Sends notification that media processing has been started. |
|
void |
stop()
(Non Java-doc). |
|
protected void |
stopped()
Sends notification that detection is terminated. |
|
protected void |
wakeup()
Restores synchronization |
|
| Methods inherited from class org.mobicents.media.server.impl.BaseComponent |
|---|
getId, getName, inc |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.mobicents.media.Component |
|---|
getId, getName |
| Constructor Detail |
|---|
public AbstractSink(String name,
Scheduler scheduler)
name - the name of the sink to be created.| Method Detail |
|---|
public void setDsp(Processor dsp)
setDsp in interface MediaSinkdsp - the dsp instanceprotected void rebuildFormats()
public Processor getDsp()
public void setFormats(Formats formats)
throws FormatNotSupportedException
setFormats in interface MediaSinkFormatNotSupportedExceptionMediaSink.setFormats(org.mobicents.media.server.spi.format.Formats)public Formats getFormats()
getFormats in interface MediaSinkMediaSource.getFormats()public void connect(Pipe pipe)
connect in interface MediaSinkMediaSink.connect(org.mobicents.media.server.spi.io.Pipe)public void disconnect(Pipe pipe)
disconnect in interface MediaSinkMediaSink.disconnect(org.mobicents.media.server.spi.io.Pipe)public boolean isConnected()
isConnected in interface MediaSinkMediaSink.isConnected().public boolean isStarted()
isStarted in interface MediaSinkMediaSink.isStarted().
public abstract void onMediaTransfer(Frame frame)
throws IOException
buffer - the new portion of media data.
IOExceptionpublic abstract Formats getNativeFormats()
public void start()
start in interface MediaSinkMediaSink.start().protected void wakeup()
public void stop()
stop in interface MediaSinkMediaSink.stop().protected void failed(Exception e)
eventID - failure event identifier.e - the exception caused failure.public long getPacketsReceived()
getPacketsReceived in interface MediaSinkMediaSink.getPacketsReceived().public long getBytesReceived()
getBytesReceived in interface MediaSinkMediaSink.getBytesReceived()public void reset()
BaseComponent
reset in interface Componentreset in class BaseComponentorg.mobicents.media.Component#reserStats();protected void started()
protected void stopped()
public <T> T getInterface(Class<T> interfaceType)
getInterface in interface ComponentgetInterface in class BaseComponentpublic String report()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||