diff options
author | Emil Ivov <emcho@jitsi.org> | 2007-08-27 17:28:46 +0000 |
---|---|---|
committer | Emil Ivov <emcho@jitsi.org> | 2007-08-27 17:28:46 +0000 |
commit | 4809ba5d41cba22e291343d493f05cf00d958d8f (patch) | |
tree | c9d9c2020cce91664809a757edd3fa173fdd84e6 /src/net/java/sip/communicator/service/media/MediaService.java | |
parent | 241c038fe69e7617369fd16173a4fab9f362af1e (diff) | |
download | jitsi-4809ba5d41cba22e291343d493f05cf00d958d8f.zip jitsi-4809ba5d41cba22e291343d493f05cf00d958d8f.tar.gz jitsi-4809ba5d41cba22e291343d493f05cf00d958d8f.tar.bz2 |
Committing support for Jingle. (By Symphorien Wanko)
Diffstat (limited to 'src/net/java/sip/communicator/service/media/MediaService.java')
-rw-r--r-- | src/net/java/sip/communicator/service/media/MediaService.java | 59 |
1 files changed, 50 insertions, 9 deletions
diff --git a/src/net/java/sip/communicator/service/media/MediaService.java b/src/net/java/sip/communicator/service/media/MediaService.java index 2183951..0be0478 100644 --- a/src/net/java/sip/communicator/service/media/MediaService.java +++ b/src/net/java/sip/communicator/service/media/MediaService.java @@ -6,6 +6,7 @@ */ package net.java.sip.communicator.service.media; +import java.util.*; import net.java.sip.communicator.service.media.event.*; import net.java.sip.communicator.service.protocol.*; import java.net.*; @@ -15,12 +16,13 @@ import java.net.*; * (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 calles would have to make sure that + * Before being able to use this service calls would have to make sure that * it is initialized (i.e. consult the isInitialized() method). * * @author Emil Ivov * @author Martin Andre * @author Ryan Ricard + * @author Symphorien Wanko */ public interface MediaService { @@ -34,14 +36,14 @@ public interface MediaService /** * The name of the property that contains the minimum port number that we'd - * like our rtp managers to bind upon. + * like our RTP managers to bind upon. */ public static final String MIN_PORT_NUMBER_PROPERTY_NAME = "net.java.sip.communicator.service.media.MIN_PORT_NUMBER"; /** * The name of the property that contains the maximum port number that we'd - * like our rtp managers to bind upon. + * like our RTP managers to bind upon. */ public static final String MAX_PORT_NUMBER_PROPERTY_NAME = "net.java.sip.communicator.service.media.MAX_PORT_NUMBER"; @@ -54,13 +56,31 @@ public interface MediaService public static final int BIND_RETRIES_DEFAULT_VALUE = 50; /** + * Give an array of Strings containing audio formats in the order of + * preference. + * + * @return an array of Strings containing audio formats in the order of + * preference. + */ + public String[] getSupportedAudioEncodings(); + + /** + * Give an array of Strings containing video formats in the order of + * preference. + * + * @return an array of Strings containing video formats in the order of + * preference. + */ + public String[] getSupportedVideoEncodings(); + + /** * Creates a call session for <tt>call</tt>. The method allocates audio * and video ports which won't be released until the corresponding call * gets into a DISCONNECTED state. If a session already exists for call, * it is returned and no new session is created. Once created a session * follows the state changes of the call it encapsulates and automatically * adapts to them by starting or stopping transmission and/or reception of - * data. A CallSession would autodestroy when the <tt>Call</tt> it + * data. A CallSession would auto destroy when the <tt>Call</tt> it * encapsulates enters the CALL_ENDED <tt>CallState</tt>. * <p> * @@ -74,8 +94,29 @@ public interface MediaService throws MediaException; /** + * Create a RtpFlow which will manage media data transfer on the specified + * addresses and ports, using the specified codec. + * + * @param localIP local IP of this flow + * @param localPort local port of for this flow + * @param remoteIP remote IP of this flow + * @param remotePort remote port of for this flow + * @param mediaEncodings encoding used for media on this flow + * @return a <tt>RtpFlow</tt> with the corresponding parameters + * @throws MediaException throw a media exception if we fail to create the + * flow + */ + public RtpFlow createRtpFlow(String localIP, + int localPort, + String remoteIP, + int remotePort, + Map mediaEncodings) + throws MediaException; + + /** * Adds a listener that will be listening for incoming media and changes - * in the state of the media listener + * in the state of the media listener. + * * @param listener the listener to register */ public void addMediaListener(MediaListener listener); @@ -116,7 +157,7 @@ public interface MediaService * it on the speakers/screen * * @param call the call whose data destination will be changed - * @param dataSinkURL the URL of the new data Desintation + * @param dataSinkURL the URL of the new data sink. * * @throws MediaException if we fail to initialize the data sink */ @@ -136,7 +177,7 @@ public interface MediaService * the given call. If the data source is not time-based, i.e. a microphone, * the method returns -1. * - * @param call the call whose data source duration will be retreived + * @param call the call whose data source duration will be retrieved * @return the duration of the data currently available in the <tt>call</tt> * specific data source or -1 if we are using a microphone/webcam. **/ @@ -144,8 +185,8 @@ public interface MediaService /** - * Returns true if the media service implementation is initialized and ready - * for use by other services, and false otherwise. + * Returns true if the media service implementation is initialized and + * ready for use by other services, and false otherwise. * * @return true if the service implementation is initialized and ready for * use and false otherwise. |