|
||||||||||
| 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.AbstractSource
public abstract class AbstractSource
The base implementation of the Media source.
AbstractSource and AbstractSink are implement general wirring contruct. All media
components have to extend one of these classes.
| Field Summary | |
|---|---|
protected long |
duration
|
protected PipeImpl |
pipe
|
| Constructor Summary | |
|---|---|
AbstractSource(String name,
Scheduler scheduler)
Creates new instance of source with specified name. |
|
| Method Summary | ||
|---|---|---|
protected void |
completed()
Sends notification that signal is completed. |
|
void |
connect(Pipe pipe)
(Non Java-doc). |
|
void |
disconnect(Pipe pipe)
(Non Java-doc). |
|
abstract Frame |
evolve(long timestamp)
This method must be overriden by concrete media source. |
|
protected void |
failed(Exception e)
Sends failure notification. |
|
long |
getBytesTransmitted()
(Non Java-doc). |
|
Processor |
getDsp()
Gets the digital signalling processor associated with this media source |
|
long |
getDuration()
(Non Java-doc). |
|
Formats |
getFormats()
(Non Java-doc.) |
|
|
getInterface(Class<T> interfaceType)
|
|
long |
getMediaTime()
(Non Java-doc). |
|
abstract Formats |
getNativeFormats()
Gets the list of formats supported by this component without possible transcoding. |
|
long |
getPacketsTransmitted()
(Non Java-doc). |
|
boolean |
isConnected()
(Non Java-doc). |
|
boolean |
isStarted()
(Non Java-doc). |
|
protected void |
rebuildFormats()
Rebuilds the list of supported formats. |
|
String |
report()
|
|
void |
reset()
(Non Java-doc.) |
|
void |
setDsp(Processor dsp)
Assigns the digital signaling processor of this component. |
|
void |
setDuration(long duration)
(Non Java-doc). |
|
void |
setFormats(Formats formats)
(Non Java-doc.) |
|
void |
setInitialDelay(long initialDelay)
(Non Java-doc.) |
|
void |
setMediaTime(long timestamp)
(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()
Called when source is stopped by request |
|
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 |
| Field Detail |
|---|
protected long duration
protected PipeImpl pipe
| Constructor Detail |
|---|
public AbstractSource(String name,
Scheduler scheduler)
name - the name of the source to be created.| Method Detail |
|---|
public void setInitialDelay(long initialDelay)
setInitialDelay in interface MediaSourcesetInitialDelay(long)public long getMediaTime()
getMediaTime in interface MediaSourceMediaSource.getMediaTime();public void setMediaTime(long timestamp)
setMediaTime in interface MediaSourceMediaSource.setMediaTime(long timestamp);public long getDuration()
getDuration in interface MediaSourceorg.mobicents.media.MediaSource#getDuration(long duration);public void setDuration(long duration)
setDuration in interface MediaSourceMediaSource.setDuration(long duration);public void setDsp(Processor dsp)
setDsp in interface MediaSourcedsp - the dsp instanceprotected void rebuildFormats()
public Processor getDsp()
public void setFormats(Formats formats)
throws FormatNotSupportedException
setFormats in interface MediaSourceFormatNotSupportedExceptionMediaSource.setFormats(org.mobicents.media.server.spi.format.Formats)public Formats getFormats()
getFormats in interface MediaSourceMediaSource.getFormats()public void start()
start in interface MediaSourceMediaSource.start().public void wakeup()
public void stop()
stop in interface MediaSourceMediaSource.stop().public void connect(Pipe pipe)
connect in interface MediaSourceMediaSource.connect(org.mobicents.media.server.spi.io.Pipe)public void disconnect(Pipe pipe)
disconnect in interface MediaSourceMediaSource.disconnect(org.mobicents.media.server.spi.io.Pipe)public boolean isConnected()
isConnected in interface MediaSourceMediaSink.isConnected().public boolean isStarted()
isStarted in interface MediaSourceMediaSource.isStarted().public abstract Frame evolve(long timestamp)
buffer - the buffer object for media.sequenceNumber - the number of timer ticks from the begining.public abstract Formats getNativeFormats()
protected void started()
protected void failed(Exception e)
e - the exception caused failure.protected void completed()
protected void stopped()
public long getPacketsTransmitted()
getPacketsTransmitted in interface MediaSourceorg.mobicents.media.MediaSource#getPacketsReceived()public long getBytesTransmitted()
getBytesTransmitted in interface MediaSourceMediaSource.getBytesTransmitted()public void reset()
BaseComponent
reset in interface Componentreset in class BaseComponentorg.mobicents.media.Component#reserStats();public String report()
public <T> T getInterface(Class<T> interfaceType)
getInterface in interface ComponentgetInterface in class BaseComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||