|
SIP Communicator: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MediaService
The service is meant to be a wrapper of media libraries such as JMF, (J)FFMPEG, JMFPAPI, and others. It takes care of all media play and capture as well as media transport (e.g. over RTP). Before being able to use this service calls would have to make sure that it is initialized (i.e. consult the isInitialized() method).
| Field Summary | |
|---|---|
static int |
BIND_RETRIES_DEFAULT_VALUE
The default number of binds that a Media Service Implementation should execute in case a port is already bound to (each retry would be on a new random port). |
static String |
BIND_RETRIES_PROPERTY_NAME
The name of the property containing the number of binds that a Media Service Implementation should execute in case a port is already bound to (each retry would be on a new random port). |
static String |
DISABLE_VIDEO_SUPPORT_PROPERTY_NAME
With this property video support can be disabled (enabled by default). |
static String |
MAX_PORT_NUMBER_PROPERTY_NAME
The name of the property that contains the maximum port number that we'd like our RTP managers to bind upon. |
static String |
MIN_PORT_NUMBER_PROPERTY_NAME
The name of the property that contains the minimum port number that we'd like our RTP managers to bind upon. |
| Method Summary | |
|---|---|
void |
addMediaListener(MediaListener listener)
Adds a listener that will be listening for incoming media and changes in the state of the media listener. |
CallSession |
createCallSession(Call call)
Creates a call session for call. |
RtpFlow |
createRtpFlow(String localIP,
int localPort,
String remoteIP,
int remotePort,
Map<String,List<String>> mediaEncodings)
Create a RtpFlow which will manage media data transfer on the specified addresses and ports, using the specified codec. |
double |
getDataSourceDurationSeconds(Call call)
Returns the duration (in milliseconds) of the data source being used for the given call. |
String[] |
getSupportedAudioEncodings()
Give an array of Strings containing audio formats in the order of preference. |
String[] |
getSupportedVideoEncodings()
Give an array of Strings containing video formats in the order of preference. |
boolean |
isStarted()
Returns true if the media service implementation is initialized and ready for use by other services, and false otherwise. |
void |
removeMediaListener(MediaListener listener)
Removes a listener that was listening for incoming media and changes in the state of the media listener |
void |
setCallDataSink(Call call,
URL dataSinkURL)
Sets the Data Destination for call to the URL dataSinkURL instead of the default data destination. |
void |
setCallDataSource(Call call,
URL dataSourceURL)
Sets the data source for call to the URL dataSourceURL instead of the default data source. |
void |
unsetCallDataSink(Call call)
Unsets the data sink for call, which will now send data to the default output devices (sound card and/or screen). |
void |
unsetCallDataSource(Call call)
Unsets any custom data sources that have been previously set for call through the setCallDataSource(Call, URL) method and revert it to the default data source. |
| Field Detail |
|---|
static final String BIND_RETRIES_PROPERTY_NAME
static final String MIN_PORT_NUMBER_PROPERTY_NAME
static final String MAX_PORT_NUMBER_PROPERTY_NAME
static final int BIND_RETRIES_DEFAULT_VALUE
static final String DISABLE_VIDEO_SUPPORT_PROPERTY_NAME
| Method Detail |
|---|
String[] getSupportedAudioEncodings()
String[] getSupportedVideoEncodings()
CallSession createCallSession(Call call)
throws MediaException
call - the Call that we'll be encapsulating in the newly created
session.
MediaException - with code IO_ERROR if we fail allocating ports.
RtpFlow createRtpFlow(String localIP,
int localPort,
String remoteIP,
int remotePort,
Map<String,List<String>> mediaEncodings)
throws MediaException
localIP - local IP of this flowlocalPort - local port of for this flowremoteIP - remote IP of this flowremotePort - remote port of for this flowmediaEncodings - encoding used for media on this flow
MediaException - throw a media exception if we fail to create the
flowvoid addMediaListener(MediaListener listener)
listener - the listener to registervoid removeMediaListener(MediaListener listener)
listener - the listener to remove
void setCallDataSource(Call call,
URL dataSourceURL)
throws MediaException
call - the call whose data source will be changeddataSourceURL - the URL of the new data source
MediaException - if we fail to initialize the data sourcevoid unsetCallDataSource(Call call)
call - the call whose data source mapping will be released
void setCallDataSink(Call call,
URL dataSinkURL)
throws MediaException
call - the call whose data destination will be changeddataSinkURL - the URL of the new data sink.
MediaException - if we fail to initialize the data sinkvoid unsetCallDataSink(Call call)
call - the call whose data sink mapping will be releaseddouble getDataSourceDurationSeconds(Call call)
call - the call whose data source duration will be retrieved
boolean isStarted()
|
SIP Communicator: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||