Class JingleMediaSession

  • Direct Known Subclasses:
    AudioMediaSession, AudioMediaSession, ScreenShareSession, TestMediaSession

    public abstract class JingleMediaSession
    extends Object
    Public Abstract Class provides a clear interface between Media Session and Jingle API.

    When a Jingle Session is fully stablished, we will have a Payload Type and two transport candidates defined for it. Smack Jingle API don't implement Media Transmit and Receive methods. But provides an interface to let the user implements it using another API. For instance: JMF.

    The Class that implements this one, must have the support to transmit and receive the jmf. This interface let the user choose his own jmf API.
    • Constructor Detail

      • JingleMediaSession

        public JingleMediaSession​(PayloadType payloadType,
                                  TransportCandidate remote,
                                  TransportCandidate local,
                                  String mediaLocator,
                                  JingleSession jingleSession)
        Creates a new JingleMediaSession Instance to handle Media methods.
        payloadType - Payload Type of the transmission
        remote - Remote accepted Transport Candidate
        local - Local accepted Transport Candidate
        mediaLocator - Media Locator of the capture device
        jingleSession - the jingle session.
    • Method Detail

      • getPayloadType

        public PayloadType getPayloadType()
        Returns the PayloadType of the Media Session.
        the PayloadType
      • getMediaLocator

        public String getMediaLocator()
        Return the media locator or null if not defined.
        media locator
      • setMediaLocator

        public void setMediaLocator​(String mediaLocator)
        Set the media locator.
        mediaLocator - media locator or null to use default
      • initialize

        public abstract void initialize()
        Initialize the RTP Channel preparing to transmit and receive.
      • startTransmit

        public abstract void startTransmit()
        Starts a RTP / UDP / TCP Transmission to the remote Candidate.
      • startReceive

        public abstract void startReceive()
        Starts a RTP / UDP / TCP Receiver from the remote Candidate to local Candidate.
      • setTransmit

        public abstract void setTransmit​(boolean active)
        Set transmit activity. If the active is true, the instance should trasmit. If it is set to false, the instance should pause transmit.
        active - TODO javadoc me please
      • stopTransmit

        public abstract void stopTransmit()
        Stops a RTP / UDP / TCP Transmission to the remote Candidate.
      • stopReceive

        public abstract void stopReceive()
        Stops a RTP / UDP / TCP Receiver from the remote Candidate to local Candidate.
      • mediaReceived

        public void mediaReceived​(String participant)
        Called when new Media is received.
        participant - the particpant.