org.mobicents.media
Interface MediaSink

All Superinterfaces:
Component, Serializable
All Known Subinterfaces:
DtmfDetector, DtmfDetector, Recorder

public interface MediaSink
extends Component

Implements the media consumer.

Author:
Oleg Kulikov, baranowb

Method Summary
 void connect(Pipe pipe)
          Joins this media sink with media source.
 void disconnect(Pipe pipe)
          Breaks connection with media source.
 long getBytesReceived()
          Shows the number of bytes received by this sink since last start;
 Formats getFormats()
          Get possible formats which this consumer can handle.
 long getPacketsReceived()
          Shows the number of packets received by this medis sink since last start.
 boolean isConnected()
          Gets the state of the component.
 boolean isStarted()
          Gets true if component is able to receive media.
 void setDsp(Processor dsp)
          Assigns digital signaling processor.
 void setFormats(Formats formats)
          Set formats for streaming.
 void start()
          Starts media processing.
 void stop()
          Terminates media processing.
 
Methods inherited from interface org.mobicents.media.Component
getId, getInterface, getName, reset
 

Method Detail

start

void start()
Starts media processing.


stop

void stop()
Terminates media processing.


getFormats

Formats getFormats()
Get possible formats which this consumer can handle.

Returns:
an array of Format objects.

setDsp

void setDsp(Processor dsp)
Assigns digital signaling processor.

Parameters:
dsp - processor instance.

setFormats

void setFormats(Formats formats)
                throws FormatNotSupportedException
Set formats for streaming.

Parameters:
formats - the collection of formats.
Throws:
FormatNotSupportedException

connect

void connect(Pipe pipe)
Joins this media sink with media source. The concrete media sink can allow to join with multiple sources

Parameters:
source - the media source to join with.

disconnect

void disconnect(Pipe pipe)
Breaks connection with media source. The concrete media sink can allow to join with multiple sources so this method requires the explicit source for disconnection.

Parameters:
source - the source to disconnect from.

isConnected

boolean isConnected()
Gets the state of the component.

Returns:
true if component is connected to other component.

isStarted

boolean isStarted()
Gets true if component is able to receive media.

Returns:
true if component is able to receive media.

getPacketsReceived

long getPacketsReceived()
Shows the number of packets received by this medis sink since last start.

Returns:
the number of packets.

getBytesReceived

long getBytesReceived()
Shows the number of bytes received by this sink since last start;

Returns:
the number of bytes.


Copyright © 2011. All Rights Reserved.