|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.util.event.PropertyChangeNotifier
net.java.sip.communicator.service.protocol.media.CallPeerMediaHandler<CallPeerGTalkImpl>
net.java.sip.communicator.impl.protocol.jabber.CallPeerMediaHandlerGTalkImpl
public class CallPeerMediaHandlerGTalkImpl
A Google Talk-specific extension of the generic media handler.
| Field Summary | |
|---|---|
static String |
AUDIO_RTP
Google Talk name for the audio part. |
static String |
VIDEO_RTP
Google Talk name for the video part. |
| Fields inherited from class net.java.sip.communicator.service.protocol.media.CallPeerMediaHandler |
|---|
AUDIO_LOCAL_SSRC, AUDIO_REMOTE_SSRC, SSRC_UNKNOWN, VIDEO_LOCAL_SSRC, VIDEO_REMOTE_SSRC |
| Constructor Summary | |
|---|---|
CallPeerMediaHandlerGTalkImpl(CallPeerGTalkImpl peer)
Creates a new handler that will be managing media streams for peer. |
|
| Method Summary | |
|---|---|
RtpDescriptionPacketExtension |
createDescription()
Creates a List containing the ContentPacketExtensions of
the streams that this handler is prepared to initiate depending on
available MediaDevices and local on-hold and video transmission
preferences. |
protected void |
firePropertyChange(String property,
Object oldValue,
Object newValue)
Overrides to give access to the transport manager to send events about ICE state changes. |
RtpDescriptionPacketExtension |
generateSessionAccept(boolean initStream)
Wraps up any ongoing candidate harvests and returns our response to the last offer we've received, so that the peer could use it to send a accept. |
protected DynamicPayloadTypeRegistry |
getDynamicPayloadTypes()
Returns the DynamicPayloadTypeRegistry instance we are currently
using. |
protected TransportManagerGTalkImpl |
getTransportManager()
Gets the TransportManager implementation handling our address management. |
protected void |
harvestCandidates(List<PayloadTypePacketExtension> local,
CandidatesSender candidatesSender)
Gathers local candidate addresses. |
protected MediaStream |
initStream(String streamName,
StreamConnector connector,
MediaDevice device,
MediaFormat format,
MediaStreamTarget target,
MediaDirection direction,
List<RTPExtension> rtpExtensions,
boolean masterStream)
Creates if necessary, and configures the stream that this MediaHandler is using for the MediaType matching the one of the MediaDevice. |
void |
processAnswer(RtpDescriptionPacketExtension answer)
Handles the specified answer by creating and initializing the corresponding MediaStreams. |
void |
processCandidates(Iterable<GTalkCandidatePacketExtension> candidates)
Processes the transport-related information provided by the remote peer in a specific set of CandidatePacketExtensions. |
void |
processOffer(RtpDescriptionPacketExtension offer)
Parses and handles the specified offer and returns a content extension representing the current state of this media handler. |
void |
start()
Waits for the associated TransportManagerJabberImpl to conclude any started connectivity establishment and then starts this CallPeerMediaHandler. |
protected void |
throwOperationFailedException(String message,
int errorCode,
Throwable cause)
Lets the underlying implementation take note of this error and only then throws it to the using bundles. |
| Methods inherited from class net.java.sip.communicator.util.event.PropertyChangeNotifier |
|---|
addPropertyChangeListener, getPropertyChangeSource, removePropertyChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String AUDIO_RTP
public static final String VIDEO_RTP
| Constructor Detail |
|---|
public CallPeerMediaHandlerGTalkImpl(CallPeerGTalkImpl peer)
peer - that CallPeerGTalkImpl instance that we will be
managing media for.| Method Detail |
|---|
protected void throwOperationFailedException(String message,
int errorCode,
Throwable cause)
throws OperationFailedException
throwOperationFailedException in class CallPeerMediaHandler<CallPeerGTalkImpl>message - the message to be logged and then wrapped in a new
OperationFailedExceptionerrorCode - the error code to be assigned to the new
OperationFailedExceptioncause - the Throwable that has caused the necessity to log
an error and have a new OperationFailedException thrown
OperationFailedException - the exception that we wanted this method
to throw.
public void processOffer(RtpDescriptionPacketExtension offer)
throws OperationFailedException,
IllegalArgumentException
offer - the offer that we'd like to parse, handle and get an answer
for.
OperationFailedException - if we have a problem satisfying the
description received in offer (e.g. failed to open a device or
initialize a stream ...).
IllegalArgumentException - if there's a problem with
offer's format or semantics.
public RtpDescriptionPacketExtension generateSessionAccept(boolean initStream)
throws OperationFailedException
initStream - true to initialize stream, false to do nothing else
RtpDescriptionPacketExtensions that the call peer could use to
send a accept.
OperationFailedException - if we fail to configure the media stream
public void processAnswer(RtpDescriptionPacketExtension answer)
throws OperationFailedException,
IllegalArgumentException
answer - the Google Talk answer
OperationFailedException - if we fail to handle answer for
reasons like failing to initialize media devices or streams.
IllegalArgumentException - if there's a problem with the syntax or
the semantics of answer. Method is synchronized in order to
avoid closing mediaHandler when we are currently in process of
initializing, configuring and starting streams and anybody interested
in this operation can synchronize to the mediaHandler instance to wait
processing to stop (method setState in CallPeer).protected TransportManagerGTalkImpl getTransportManager()
getTransportManager in class CallPeerMediaHandler<CallPeerGTalkImpl>CallPeerMediaHandler.getTransportManager()
public void processCandidates(Iterable<GTalkCandidatePacketExtension> candidates)
throws OperationFailedException
candidates - the CandidatePacketExtenions provided by the
remote peer and containing the candidate-related information to
be processed
OperationFailedException - if anything goes wrong while processing
the candidate-related information provided by the remote peer in
the specified set of CandidatePacketExtensions
public RtpDescriptionPacketExtension createDescription()
throws OperationFailedException
ContentPacketExtensions of
the streams that this handler is prepared to initiate depending on
available MediaDevices and local on-hold and video transmission
preferences.
OperationFailedException - if we fail to create the descriptions
for reasons like problems with device interaction, allocating ports, etc.
protected void harvestCandidates(List<PayloadTypePacketExtension> local,
CandidatesSender candidatesSender)
throws OperationFailedException
local - the media descriptions sent or to be sent from the local
peer to the remote peer.candidatesSender - the CandidatesSender to be used by
this TransportManagerGTalkImpl to send candidates
SessionIQs from the local peer to the remote peer if this
TransportManagerGTalkImpl wishes to utilize candidates
OperationFailedException - if anything goes wrong while starting or
wrapping up the gathering of local candidate addresses
public void start()
throws IllegalStateException
start in class CallPeerMediaHandler<CallPeerGTalkImpl>IllegalStateException - if no offer or answer has been provided or
generated earlier
protected MediaStream initStream(String streamName,
StreamConnector connector,
MediaDevice device,
MediaFormat format,
MediaStreamTarget target,
MediaDirection direction,
List<RTPExtension> rtpExtensions,
boolean masterStream)
throws OperationFailedException
streamName - the name of the stream as indicated in the XMPP
content element.connector - the MediaConnector that we'd like to bind the
newly created stream to.device - the MediaDevice that we'd like to attach the newly
created MediaStream to.format - the MediaFormat that we'd like the new
MediaStream to be set to transmit in.target - the MediaStreamTarget containing the RTP and RTCP
address:port couples that the new stream would be sending packets to.direction - the MediaDirection that we'd like the new
stream to use (i.e. sendonly, sendrecv, recvonly, or inactive).rtpExtensions - the list of RTPExtensions that should be
enabled for this stream.masterStream - whether the stream to be used as master if secured
OperationFailedException - if creating the stream fails for any
reason (like for example accessing the device or setting the format).protected DynamicPayloadTypeRegistry getDynamicPayloadTypes()
DynamicPayloadTypeRegistry instance we are currently
using.
getDynamicPayloadTypes in class CallPeerMediaHandler<CallPeerGTalkImpl>DynamicPayloadTypeRegistry instance we are currently
using.
protected void firePropertyChange(String property,
Object oldValue,
Object newValue)
firePropertyChange in class PropertyChangeNotifierproperty - the name of the property of this
PropertyChangeNotifier which had its value changedoldValue - the value of the property with the specified name before
the changenewValue - the value of the property with the specified name after
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||