Class AudioMediaSession
- java.lang.Object
-
- org.jivesoftware.smackx.jingleold.media.JingleMediaSession
-
- org.jivesoftware.smackx.jingleold.mediaimpl.jmf.AudioMediaSession
-
public class AudioMediaSession extends JingleMediaSession
This Class implements a complete JingleMediaSession. It should be used to transmit and receive audio captured from the Mic. This Class should be automatically controlled by JingleSession. But you could also use in any VOIP application. For better NAT Traversal support this implementation don't support only receive or only transmit. To receive you MUST transmit. So the only implemented and functionally methods are startTransmit() and stopTransmit()
-
-
Constructor Summary
Constructors Constructor Description AudioMediaSession(PayloadType payloadType, TransportCandidate remote, TransportCandidate local, java.lang.String locator, JingleSession jingleSession)Creates a org.jivesoftware.jingleaudio.jmf.AudioMediaSession with defined payload type, remote and local candidates.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected intgetFreePort()Obtain a free port we can use.voidinitialize()Initialize the Audio Channel to make it able to send and receive audio.voidsetTransmit(boolean active)Set transmit activity.voidsetTrasmit(boolean active)Deprecated.usesetTransmit(boolean)instead.voidstartReceive()For NAT Reasons this method does nothing.voidstartTransmit()Starts transmission and for NAT Traversal reasons start receiving also.voidstartTrasmit()Deprecated.usestartTransmit()instead.voidstopReceive()For NAT Reasons this method does nothing.voidstopTransmit()Stops transmission and for NAT Traversal reasons stop receiving also.voidstopTrasmit()Deprecated.usestopTransmit()instead.-
Methods inherited from class org.jivesoftware.smackx.jingleold.media.JingleMediaSession
addMediaReceivedListener, getJingleSession, getLocal, getMediaLocator, getPayloadType, getRemote, mediaReceived, removeAllMediaReceivedListener, removeMediaReceivedListener, setMediaLocator
-
-
-
-
Constructor Detail
-
AudioMediaSession
public AudioMediaSession(PayloadType payloadType, TransportCandidate remote, TransportCandidate local, java.lang.String locator, JingleSession jingleSession)
Creates a org.jivesoftware.jingleaudio.jmf.AudioMediaSession with defined payload type, remote and local candidates.- Parameters:
payloadType- Payload of the jmfremote- the remote information. The candidate that the jmf will be sent to.local- the local information. The candidate that will receive the jmflocator- media locatorjingleSession- the jingle session.
-
-
Method Detail
-
initialize
public void initialize()
Initialize the Audio Channel to make it able to send and receive audio.- Specified by:
initializein classJingleMediaSession
-
startTrasmit
@Deprecated public void startTrasmit()
Deprecated.usestartTransmit()instead.Starts transmission and for NAT Traversal reasons start receiving also.
-
startTransmit
public void startTransmit()
Starts transmission and for NAT Traversal reasons start receiving also.- Specified by:
startTransmitin classJingleMediaSession
-
setTrasmit
@Deprecated public void setTrasmit(boolean active)
Deprecated.usesetTransmit(boolean)instead.Set transmit activity. If the active is true, the instance should transmit. If it is set to false, the instance should pause transmit.- Parameters:
active- active state
-
setTransmit
public void setTransmit(boolean active)
Set transmit activity. If the active is true, the instance should transmit. If it is set to false, the instance should pause transmit.- Specified by:
setTransmitin classJingleMediaSession- Parameters:
active- active state
-
startReceive
public void startReceive()
For NAT Reasons this method does nothing. Use startTransmit() to start transmit and receive jmf- Specified by:
startReceivein classJingleMediaSession
-
stopTrasmit
@Deprecated public void stopTrasmit()
Deprecated.usestopTransmit()instead.Stops transmission and for NAT Traversal reasons stop receiving also.
-
stopTransmit
public void stopTransmit()
Stops transmission and for NAT Traversal reasons stop receiving also.- Specified by:
stopTransmitin classJingleMediaSession
-
stopReceive
public void stopReceive()
For NAT Reasons this method does nothing. Use startTransmit() to start transmit and receive jmf- Specified by:
stopReceivein classJingleMediaSession
-
getFreePort
protected int getFreePort()
Obtain a free port we can use.- Returns:
- A free port number.
-
-