Java 类org.jivesoftware.smackx.jingle.media.JingleMediaSession 实例源码

项目:java-bells    文件:JingleSession.java   
/**
 * Full featured JingleSession constructor
 * 
 * @param conn
 *            the Connection which is used
 * @param initiator
 *            the initiator JID
 * @param responder
 *            the responder JID
 * @param sessionid
 *            the session ID
 * @param jingleMediaManager
 *            the jingleMediaManager
 */
public JingleSession(Connection conn, String initiator, String responder, String sessionid,
        List<JingleMediaManager> jingleMediaManagers) {
    super();

    this.initiator = initiator;
    this.responder = responder;
    this.sid = sessionid;
    this.jingleMediaManagers = jingleMediaManagers;
    this.setSession(this);
    this.connection = conn;

    // Initially, we don't known the session state.
    setSessionState(JingleSessionStateUnknown.getInstance());

    contentNegotiators = new ArrayList<ContentNegotiator>();
    mediaSessionMap = new HashMap<String, JingleMediaSession>();

    // Add the session to the list and register the listeneres
    registerInstance();
    installConnectionListeners(conn);
}
项目:java-bells    文件:AudioChannel.java   
/**
 * Creates an Audio Channel for a desired jmf locator. For instance: new MediaLocator("dsound://")
 *
 * @param locator         media locator
 * @param localIpAddress  local IP address
 * @param remoteIpAddress remote IP address
 * @param localPort       local port number
 * @param remotePort      remote port number
 * @param format          audio format
 */
public AudioChannel(MediaLocator locator,
        String localIpAddress,
        String remoteIpAddress,
        int localPort,
        int remotePort,
        Format format, JingleMediaSession jingleMediaSession) {

    this.locator = locator;
    this.localIpAddress = localIpAddress;
    this.remoteIpAddress = remoteIpAddress;
    this.localPort = localPort;
    this.portBase = remotePort;
    this.format = format;
    this.jingleMediaSession = jingleMediaSession;
}
项目:java-bells    文件:ScreenShareMediaManager.java   
/**
 * Returns a new JingleMediaSession
 *
 * @param payloadType payloadType
 * @param remote      remote Candidate
 * @param local       local Candidate
 * @return JingleMediaSession JingleMediaSession
 */
public JingleMediaSession createMediaSession(PayloadType payloadType, final TransportCandidate remote, final TransportCandidate local, final JingleSession jingleSession) {
    ScreenShareSession session = null;
    session = new ScreenShareSession(payloadType, remote, local, "Screen", jingleSession);
    if (encoder != null) {
        session.setEncoder(encoder);
    }
    if (decoder != null) {
        session.setDecoder(decoder);
    }
    return session;
}
项目:java-bells    文件:TestMediaManager.java   
/**
 * Returns a new JingleMediaSession
 *
 * @param payloadType payloadType
 * @param remote      remote Candidate
 * @param local       local Candidate
 * @return JingleMediaSession JingleMediaSession
 */
public JingleMediaSession createMediaSession(PayloadType payloadType, final TransportCandidate remote,
        final TransportCandidate local, final JingleSession jingleSession) {
    TestMediaSession session = null;

    session = new TestMediaSession(payloadType, remote, local, "", jingleSession);

    return session;
}
项目:java-bells    文件:MultiMediaManager.java   
/**
 * Returns a new JingleMediaSession
 *
 * @param payloadType payloadType
 * @param remote      remote Candidate
 * @param local       local Candidate
 * @return JingleMediaSession JingleMediaSession
 */
public JingleMediaSession createMediaSession(PayloadType payloadType, final TransportCandidate remote, final TransportCandidate local, final JingleSession jingleSession) {
    for (JingleMediaManager manager : managers) {
        if (manager.getPayloads().contains(payloadType)) {
            return manager.createMediaSession(payloadType, remote, local, jingleSession);
        }
    }
    return null;
}
项目:java-bells    文件:AudioReceiver.java   
public AudioReceiver(final Object dataSync, final JingleMediaSession jingleMediaSession) {
    this.dataSync = dataSync;
    this.jingleMediaSession = jingleMediaSession;
}
项目:java-bells    文件:JingleSession.java   
/**
 * The jingle session may have one or more media managers that are trying to establish media sessions.
 * When the media manager succeeds in creating a media session is registers it with the session by the
 * media manager's static name.  This routine is where the media manager does the registering.
 */
public void addJingleMediaSession(String mediaManagerName, JingleMediaSession mediaSession) {
    mediaSessionMap.put(mediaManagerName, mediaSession);
}
项目:java-bells    文件:JingleSession.java   
/**
 * The jingle session may have one or more media managers that are trying to establish media sessions.
 * When the media manager succeeds in creating a media session is registers it with the session by the
 * media manager's static name. This routine is where other objects can access the registered media sessions.
 * NB: If the media manager has not succeeded in establishing a media session then this could return null.
 */
public JingleMediaSession getMediaSession(String mediaManagerName) {
    return mediaSessionMap.get(mediaManagerName);
}
项目:java-bells    文件:JmfMediaManager.java   
/**
 * Returns a new jingleMediaSession
 *
 * @param payloadType payloadType
 * @param remote      remote Candidate
 * @param local       local Candidate
 * @return JingleMediaSession
 */
public JingleMediaSession createMediaSession(final PayloadType payloadType, final TransportCandidate remote, final TransportCandidate local, final JingleSession jingleSession) {
    return new AudioMediaSession(payloadType, remote, local, mediaLocator, jingleSession);
}
项目:java-bells    文件:SpeexMediaManager.java   
/**
 * Returns a new jingleMediaSession
 *
 * @param payloadType payloadType
 * @param remote      remote Candidate
 * @param local       local Candidate
 * @return JingleMediaSession
 */
public JingleMediaSession createMediaSession(PayloadType payloadType, final TransportCandidate remote, final TransportCandidate local, final JingleSession jingleSession) {
    return new AudioMediaSession(payloadType, remote, local, null,null);
}
项目:java-bells    文件:ContentNegotiator.java   
/**
 * Get the JingleMediaSession of this Jingle Session
 * 
 * @return the JingleMediaSession
 */
public JingleMediaSession getJingleMediaSession() {
    return jingleMediaSession;
}