Class ScreenShareSession
java.lang.Object
org.jivesoftware.smackx.jingleold.media.JingleMediaSession
org.jivesoftware.smackx.jingleold.mediaimpl.sshare.ScreenShareSession
This Class implements a complete JingleMediaSession.
It should be used to transmit and receive captured images from the Display.
This Class should be automatically controlled by JingleSession.
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
ConstructorsConstructorDescriptionScreenShareSession(PayloadType payloadType, TransportCandidate remote, TransportCandidate local, String locator, JingleSession jingleSession) Creates a org.jivesoftware.jingleaudio.jmf.AudioMediaSession with defined payload type, remote and local candidates. -
Method Summary
Modifier and TypeMethodDescriptionprotected intObtain a free port we can use.voidInitialize the screen share channels.voidsetDecoder(ImageDecoder decoder) voidsetEncoder(ImageEncoder encoder) voidsetTransmit(boolean active) Set transmit activity.voidsetTrasmit(boolean active) Deprecated.voidFor NAT Reasons this method does nothing.voidStarts transmission and for NAT Traversal reasons start receiving also.voidDeprecated.usestartTransmit()instead.voidFor NAT Reasons this method does nothing.voidStops transmission and for NAT Traversal reasons stop receiving also.voidDeprecated.usestopTransmit()instead.Methods inherited from class org.jivesoftware.smackx.jingleold.media.JingleMediaSession
addMediaReceivedListener, getJingleSession, getLocal, getMediaLocator, getPayloadType, getRemote, mediaReceived, removeAllMediaReceivedListener, removeMediaReceivedListener, setMediaLocator
-
Constructor Details
-
ScreenShareSession
public ScreenShareSession(PayloadType payloadType, TransportCandidate remote, TransportCandidate local, 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 Details
-
initialize
Initialize the screen share channels.- Specified by:
initializein classJingleMediaSession
-
startTrasmit
Deprecated.usestartTransmit()instead.Starts transmission and for NAT Traversal reasons start receiving also. -
startTransmit
Starts transmission and for NAT Traversal reasons start receiving also.- Specified by:
startTransmitin classJingleMediaSession
-
setTrasmit
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
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
For NAT Reasons this method does nothing. Use startTransmit() to start transmit and receive jmf- Specified by:
startReceivein classJingleMediaSession
-
stopTrasmit
Deprecated.usestopTransmit()instead.Stops transmission and for NAT Traversal reasons stop receiving also. -
stopTransmit
Stops transmission and for NAT Traversal reasons stop receiving also.- Specified by:
stopTransmitin classJingleMediaSession
-
stopReceive
For NAT Reasons this method does nothing. Use startTransmit() to start transmit and receive jmf- Specified by:
stopReceivein classJingleMediaSession
-
getFreePort
Obtain a free port we can use.- Returns:
- A free port number.
-
setTransmit(boolean)instead.