public class AudioMediaSession extends JingleMediaSession implements mil.jfcom.cie.media.session.MediaSessionListener
Constructor and Description |
---|
AudioMediaSession(PayloadType payloadType,
TransportCandidate remote,
TransportCandidate local,
String locator,
JingleSession jingleSession)
Creates a org.jivesoftware.jingleaudio.jspeex.AudioMediaSession with defined payload type, remote and local candidates
|
Modifier and Type | Method and Description |
---|---|
static mil.jfcom.cie.media.session.MediaSession |
createSession(String localhost,
int localPort,
String remoteHost,
int remotePort,
mil.jfcom.cie.media.session.MediaSessionListener eventHandler,
int quality,
boolean secure,
boolean micOn)
Create a Session using Speex Codec
|
protected int |
getFreePort()
Obtain a free port we can use.
|
void |
initialize()
Initialize the Audio Channel to make it able to send and receive audio
|
void |
newStreamIdentified(mil.jfcom.cie.media.session.StreamPlayer streamPlayer) |
void |
senderReportReceived(javax.media.rtp.rtcp.SenderReport report) |
void |
setTrasmit(boolean active)
Set transmit activity.
|
void |
startReceive()
For NAT Reasons this method does nothing.
|
void |
startTrasmit()
Starts transmission and for NAT Traversal reasons start receiving also.
|
void |
stopReceive()
For NAT Reasons this method does nothing.
|
void |
stopTrasmit()
Stops transmission and for NAT Traversal reasons stop receiving also.
|
void |
streamClosed(mil.jfcom.cie.media.session.StreamPlayer stream,
boolean timeout) |
addMediaReceivedListener, getJingleSession, getLocal, getMediaLocator, getPayloadType, getRemote, mediaReceived, removeAllMediaReceivedListener, removeMediaReceivedListener, setMediaLocator
public AudioMediaSession(PayloadType payloadType, TransportCandidate remote, TransportCandidate local, String locator, JingleSession jingleSession)
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 locatorpublic static mil.jfcom.cie.media.session.MediaSession createSession(String localhost, int localPort, String remoteHost, int remotePort, mil.jfcom.cie.media.session.MediaSessionListener eventHandler, int quality, boolean secure, boolean micOn) throws javax.media.NoProcessorException, javax.media.format.UnsupportedFormatException, IOException, GeneralSecurityException
localhost
- localHostlocalPort
- localPortremoteHost
- remoteHostremotePort
- remotePorteventHandler
- eventHandlerquality
- qualitysecure
- securemicOn
- micOnjavax.media.NoProcessorException
javax.media.format.UnsupportedFormatException
IOException
GeneralSecurityException
public void initialize()
initialize
in class JingleMediaSession
public void startTrasmit()
startTrasmit
in class JingleMediaSession
public void setTrasmit(boolean active)
setTrasmit
in class JingleMediaSession
active
- active statepublic void startReceive()
startReceive
in class JingleMediaSession
public void stopTrasmit()
stopTrasmit
in class JingleMediaSession
public void stopReceive()
stopReceive
in class JingleMediaSession
public void newStreamIdentified(mil.jfcom.cie.media.session.StreamPlayer streamPlayer)
newStreamIdentified
in interface mil.jfcom.cie.media.session.MediaSessionListener
public void senderReportReceived(javax.media.rtp.rtcp.SenderReport report)
senderReportReceived
in interface mil.jfcom.cie.media.session.MediaSessionListener
public void streamClosed(mil.jfcom.cie.media.session.StreamPlayer stream, boolean timeout)
streamClosed
in interface mil.jfcom.cie.media.session.MediaSessionListener
protected int getFreePort()