Class AudioChannel
java.lang.Object
org.jivesoftware.smackx.jingleold.mediaimpl.jmf.AudioChannel
An Easy to use Audio Channel implemented using JMF.
It sends and receives jmf for and from desired IPs and ports.
Also has a rport Symetric behavior for better NAT Traversal.
It send data from a defined port and receive data in the same port, making NAT binds easier.
Send from portA to portB and receive from portB in portA.
Sending portA ---> portB
Receiving portB ---> portA
Transmit and Receive are interdependence. To receive you MUST transmit.-
Constructor Summary
ConstructorDescriptionAudioChannel
(javax.media.MediaLocator locator, String localIpAddress, String remoteIpAddress, int localPort, int remotePort, javax.media.Format format, JingleMediaSession jingleMediaSession) Creates an Audio Channel for a desired jmf locator. -
Method Summary
-
Constructor Details
-
AudioChannel
public AudioChannel(javax.media.MediaLocator locator, String localIpAddress, String remoteIpAddress, int localPort, int remotePort, javax.media.Format format, JingleMediaSession jingleMediaSession) Creates an Audio Channel for a desired jmf locator. For instance: new MediaLocator("dsound://")- Parameters:
locator
- media locatorlocalIpAddress
- local IP addressremoteIpAddress
- remote IP addresslocalPort
- local port numberremotePort
- remote port numberformat
- audio formatjingleMediaSession
- the jingle media session.
-
-
Method Details
-
start
Starts the transmission. Returns null if transmission started ok. Otherwise it returns a string with the reason why the setup failed. Starts receive also.- Returns:
- result description
-
stop
Stops the transmission if already started. Stops the receiver also. -
setTrasmit
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
-
main
-