|
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<CallPeerJabberImpl>
net.java.sip.communicator.impl.protocol.jabber.CallPeerMediaHandlerJabberImpl
public class CallPeerMediaHandlerJabberImpl
An XMPP specific extension of the generic media handler.
| Field Summary |
|---|
| 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 | |
|---|---|
CallPeerMediaHandlerJabberImpl(CallPeerJabberImpl peer)
Creates a new handler that will be managing media streams for peer. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the CallPeerMediaHandler. |
ContentPacketExtension |
createContentForMedia(MediaType mediaType)
Creates a ContentPacketExtension for a particular stream. |
List<ContentPacketExtension> |
createContentList()
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. |
List<ContentPacketExtension> |
createContentList(MediaType mediaType)
Creates a List containing the ContentPacketExtensions of
the streams of a specific MediaType 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. |
Iterable<ContentPacketExtension> |
generateSessionAccept()
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 session-accept. |
ContentPacketExtension |
getLocalContent(String contentType)
Get the local content of a specific content type (like audio or video). |
QualityControl |
getQualityControl()
Returns the quality control for video calls if any. |
ContentPacketExtension |
getRemoteContent(String contentType)
Get the remote content of a specific content type (like audio or video). |
protected TransportManagerJabberImpl |
getTransportManager()
Gets the TransportManager implementation handling our address management. |
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(List<ContentPacketExtension> answer)
Handles the specified answer by creating and initializing the corresponding MediaStreams. |
void |
processOffer(List<ContentPacketExtension> offer)
Parses and handles the specified offer and returns a content extension representing the current state of this media handler. |
void |
processTransportInfo(Iterable<ContentPacketExtension> contents)
Processes the transport-related information provided by the remote peer in a specific set of ContentPacketExtensions. |
void |
reinitAllContents()
Reinitialize all media contents. |
void |
reinitContent(String name,
ContentPacketExtension content,
boolean modify)
Reinitialize a media content such as video. |
void |
removeContent(String name)
Removes a media content with a specific name from the session represented by this CallPeerMediaHandlerJabberImpl and closes its associated media stream. |
void |
setLocalInputEvtAware(boolean enable)
Enable or disable inputevt support (remote-control). |
void |
setRemotelyOnHold(boolean onHold)
Acts upon a notification received from the remote party indicating that they've put us on/off hold. |
void |
setSupportQualityControls(boolean value)
Sometimes as initing a call with custom preset can set and we force that quality controls is supported. |
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 |
| Constructor Detail |
|---|
public CallPeerMediaHandlerJabberImpl(CallPeerJabberImpl peer)
peer - that CallPeerJabberImpl 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<CallPeerJabberImpl>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 setLocalInputEvtAware(boolean enable)
enable - new state of inputevt supportpublic ContentPacketExtension getRemoteContent(String contentType)
contentType - content type name
public ContentPacketExtension getLocalContent(String contentType)
contentType - content type name
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).
public void processOffer(List<ContentPacketExtension> 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 Iterable<ContentPacketExtension> generateSessionAccept()
throws OperationFailedException
ContentPacketExtensions that
the call peer could use to send a session-accept.
OperationFailedException - if we fail to configure the media stream
public ContentPacketExtension createContentForMedia(MediaType mediaType)
throws OperationFailedException
ContentPacketExtension for a particular stream.
mediaType - MediaType of the content
ContentPacketExtension
OperationFailedException - if we fail to create the descriptions
for reasons like - problems with device interaction, allocating ports,
etc.
public List<ContentPacketExtension> createContentList(MediaType mediaType)
throws OperationFailedException
ContentPacketExtensions of
the streams of a specific MediaType that this handler is
prepared to initiate depending on available MediaDevices and
local on-hold and video transmission preferences.
mediaType - MediaType of the content
List containing the ContentPacketExtensions of
streams that this handler is prepared to initiate.
OperationFailedException - if we fail to create the descriptions
for reasons like - problems with device interaction, allocating ports,
etc.
public List<ContentPacketExtension> createContentList()
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.
List containing the ContentPacketExtensions of
streams that this handler is prepared to initiate.
OperationFailedException - if we fail to create the descriptions
for reasons like problems with device interaction, allocating ports, etc.
public void reinitAllContents()
throws OperationFailedException,
IllegalArgumentException
OperationFailedException - if we fail to handle content
for reasons like failing to initialize media devices or streams.
IllegalArgumentException - if there's a problem with the syntax or
the semantics of content. 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).
public void reinitContent(String name,
ContentPacketExtension content,
boolean modify)
throws OperationFailedException,
IllegalArgumentException
name - name of the Jingle contentcontent - media contentmodify - if it correspond to a content-modify for resolution change
OperationFailedException - if we fail to handle content
for reasons like failing to initialize media devices or streams.
IllegalArgumentException - if there's a problem with the syntax or
the semantics of content. 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).public void removeContent(String name)
name - the name of the media content to be removed from this session
public void processAnswer(List<ContentPacketExtension> answer)
throws OperationFailedException,
IllegalArgumentException
answer - the Jingle 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 TransportManagerJabberImpl getTransportManager()
getTransportManager in class CallPeerMediaHandler<CallPeerJabberImpl>CallPeerMediaHandler.getTransportManager()public void setRemotelyOnHold(boolean onHold)
onHold - true if the remote party has put us on hold
and false if they've just put us off hold.
public void processTransportInfo(Iterable<ContentPacketExtension> contents)
throws OperationFailedException
contents - the ContentPacketExtenions provided by the
remote peer and containing the transport-related information to
be processed
OperationFailedException - if anything goes wrong while processing
the transport-related information provided by the remote peer in
the specified set of ContentPacketExtensions
public void start()
throws IllegalStateException
start in class CallPeerMediaHandler<CallPeerJabberImpl>IllegalStateException - if no offer or answer has been provided or
generated earlierpublic QualityControl getQualityControl()
public void setSupportQualityControls(boolean value)
value - whether quality controls is supported..public void close()
close in class CallPeerMediaHandler<CallPeerJabberImpl>
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 | |||||||||