Cosmetics only (unfortunately since we still have the 2nd SIP call issue).

cusax-fix
Emil Ivov 17 years ago
parent 0602eb0cc9
commit c0dad4cf88

@ -238,7 +238,7 @@ public class CallSessionImpl
8,
1,
-1,
AudioFormat.SIGNED)
AudioFormat.SIGNED)
};
/**
@ -256,10 +256,10 @@ public static enum ZRTPCustomInfoCodes
/**
* Holds the "Master" ZRTP session.
*
*
* This session must be started first and must have negotiated the key material
* before any other media session to the same client can be started. See the
* ZRTP specification, topic multi-streaming mode.
* ZRTP specification, topic multi-streaming mode.
*/
private TransformConnector zrtpDHSession = null;
/**
@ -1601,7 +1601,7 @@ private Vector<MediaDescription> createMediaDescriptions(
{
am.setAttribute("rtpmap", "4 G723/8000");
am.setAttribute("fmtp", "4 annexa=no;bitrate=6.3");
}
}
}
byte onHold = this.onHold;
@ -1626,19 +1626,19 @@ private Vector<MediaDescription> createMediaDescriptions(
, 1
, "RTP/AVP"
, supportedVideoEncodings);
String h264Str = String.valueOf(Constants.H264_RTP_SDP);
for (int i = 0; i < supportedVideoEncodings.length; i++)
for (int i = 0; i < supportedVideoEncodings.length; i++)
{
if(supportedVideoEncodings[i].equals(h264Str))
{
vm.setAttribute("rtpmap",
vm.setAttribute("rtpmap",
Constants.H264_RTP_SDP + " H264/90000");
vm.setAttribute("fmtp",
vm.setAttribute("fmtp",
Constants.H264_RTP_SDP + " packetization-mode=1");
}
}
}
byte onHold = this.onHold;
if (!mediaServCallback.getDeviceConfiguration()
@ -2061,8 +2061,8 @@ private void initializeRtpManager(RTPManager rtpManager,
SCCallback callback = new SCCallback(this);
boolean zrtpAutoStart = false;
// Decide if this will become the ZRTP Master session:
// Decide if this will become the ZRTP Master session:
// - Statement: audio media session will be started before video media session
// - if no other audio session was started before then this will become
// ZRTP Master session
@ -2091,9 +2091,9 @@ else if (rtpManager.equals(videoRtpManager)) {
engine.setUserCallback(callback);
// Case 1: user toggled secure communication prior to the call
// call is encrypted by default due to the option set in
// call is encrypted by default due to the option set in
// the account registration wizard
if (this.getCall().isDefaultEncrypted())
if (this.getCall().isDefaultEncrypted())
{
if (engine.initialize("GNUZRTP4J.zid", zrtpAutoStart))
{
@ -2107,7 +2107,7 @@ else if (rtpManager.equals(videoRtpManager)) {
{
engine.sendInfo(ZrtpCodes.MessageSeverity.Info,
EnumSet.of(ZRTPCustomInfoCodes.ZRTPEngineInitFailure));
}
}
}
// Case 2: user will toggle secure communication during the call
// (it's not set on at this point)
@ -2263,7 +2263,7 @@ static void registerCustomCodecFormats(RTPManager rtpManager)
formatsRegisteredOnce = true;
}
static void registerCustomVideoCodecFormats(RTPManager rtpManager)
{
// if we have already registered custom formats and we are running JMF
@ -2290,7 +2290,7 @@ static void registerCustomVideoCodecFormats(RTPManager rtpManager)
/**
* Indicates that a change has occurred in the state of the source call.
*
*
* @param evt the <tt>CallChangeEvent</tt> instance containing the source
* calls and its old and new state.
*/
@ -2577,7 +2577,7 @@ else if (evt instanceof ByeEvent)
/**
* This method is called when an event is generated by a
* <code>Controller</code> that this listener is registered with.
*
*
* @param ce The event generated.
*/
public synchronized void controllerUpdate(ControllerEvent ce)
@ -2872,14 +2872,14 @@ private void zrtpChangeStatus(RTPManager manager, SecureEvent event)
/**
* Start multi-stream ZRTP sessions.
*
*
* After the ZRTP Master (DH) session reached secure state the SCCallback calls
* this method to start the multi-stream ZRTP sessions.
*
*
* First get the multi-stream data from the ZRTP DH session. Then iterate over
* all known connectors, set multi-stream mode data, and enable auto-start
* mode (auto-sensing).
*
*
* @return Number of started ZRTP multi-stream mode sessions
*/
public int startZrtpMultiStreams() {
@ -2888,10 +2888,10 @@ public int startZrtpMultiStreams() {
int counter = 0;
byte[] multiStreamData = engine.getMultiStrParams();
Enumeration<TransformConnector> tcs = transConnectors.elements();
while (tcs.hasMoreElements()) {
while (tcs.hasMoreElements()) {
TransformConnector tc = tcs.nextElement();
if (tc.equals(zrtpDHSession)) {
continue;
@ -3109,7 +3109,7 @@ public Component[] getVisualComponents()
* Gets the visual <code>Component</code> of a specific <code>Player</code>
* if it has one and ignores the failure to access it if the specified
* <code>Player</code> is unrealized.
*
*
* @param player the <code>Player</code> to get the visual
* <code>Component</code> of if it has one
* @return the visual <code>Component</code> of the specified
@ -3147,7 +3147,7 @@ public void removeVideoListener(VideoListener listener)
* Notifies the <code>VideoListener</code>s registered with this
* <code>CallSession</code> about a specific type of change in the
* availability of a specific visual <code>Component</code> depicting video.
*
*
* @param type the type of change as defined by <code>VideoEvent</code> in
* the availability of the specified visual
* <code>Component</code> depciting video

@ -126,7 +126,7 @@ public javax.media.Time getOutputDuration()
*
* @throws MediaException if initialization fails.
*/
public void initialize( DeviceConfiguration deviceConfig,
public void initialize( DeviceConfiguration deviceConfig,
EncodingConfiguration encodingConfig)
throws MediaException
{
@ -470,7 +470,7 @@ else if (format instanceof VideoFormat)
transmittableAudioEncodings.size();
if (transmittableAudioEncodingCount > 0)
{
supportedAudioEncodings =
supportedAudioEncodings =
encodingConfiguration.updateEncodings(transmittableAudioEncodings);
}
else
@ -478,7 +478,7 @@ else if (format instanceof VideoFormat)
//just leave supportedAudioEncodings as it was in the beginning
//as it will be only receiving so it could say it supports
//everything.
supportedAudioEncodings =
supportedAudioEncodings =
encodingConfiguration.getSupportedAudioEncodings();
}
@ -486,7 +486,7 @@ else if (format instanceof VideoFormat)
transmittableVideoEncodings.size();
if (transmittableVideoEncodingCount > 0)
{
supportedVideoEncodings =
supportedVideoEncodings =
encodingConfiguration.updateEncodings(transmittableVideoEncodings);
}
else
@ -494,7 +494,7 @@ else if (format instanceof VideoFormat)
//just leave supportedVideoEncodings as it was in the beginning
//as it will be only receiving so it could say it supports
//everything.
supportedVideoEncodings =
supportedVideoEncodings =
encodingConfiguration.getSupportedVideoEncodings();
}
}
@ -576,14 +576,14 @@ private DataSource createDataSource(MediaLocator locator)
/**
* Creates a processing data source using the <tt>encodingSets</tt> map to
* determine the formats/encodings allowed for the various media types.
*
*
* @param encodingSets a hashtable mapping media types such as "audio" or
* "video" to <tt>List</tt>a of encodings (ordered by preference)
* accepted for the corresponding type.
*
*
* @return a processing data source set to generate flows in the encodings
* specified by the encodingSets map.
*
*
* @throws MediaException if creating the data source fails for some reason.
*/
public DataSource createDataSourceForEncodings(
@ -851,13 +851,13 @@ else if (sourceFormat.matches(h263Fmt))
* Looks for the first encoding (among the requested encodings elements)
* that is also present in the <tt>availableFormats</tt> array and returns
* the index of the corresponding <tt>Format</tt>.
*
*
* @param availableFormats an array of JMF <tt>Format</tt>s that we're
* currently able to transmit.
* @param requestedEncodings a table mapping media types (e.g. audio or
* video) to a list of encodings that our interlocutor has sent
* in order of preference.
*
*
* @return the index of the format corresponding to the first encoding that
* had a marching format in the <tt>availableFormats</tt> array.
*/
@ -990,7 +990,7 @@ public void setMute(boolean mute)
/**
* Selects the nearest size supported by the capture device, to make drivers
* scale the images.
*
*
* @param videoDS the video <code>DataSource</code>
*/
private void selectVideoSize(DataSource videoDS)

@ -97,8 +97,9 @@ public void controllerUpdate(ControllerEvent ce) {
* @param state one of the Processor.XXXed sate vars
* @return boolean true if the state has been reached and false otherwise
*/
public synchronized boolean waitForState(Processor processor, int state)
public synchronized boolean waitForState(Processor processor, int state)
{
System.out.println("d1");
processor.addControllerListener(this);
setFailed(false);

@ -16,7 +16,7 @@
/**
* A SIP implementation of the Call abstract class encapsulating SIP dialogs.
*
*
* @author Emil Ivov
*/
public class CallSipImpl
@ -45,7 +45,7 @@ public class CallSipImpl
/**
* Crates a CallSipImpl instance belonging to <tt>sourceProvider</tt> and
* initiated by <tt>CallCreator</tt>.
*
*
* @param sourceProvider the ProtocolProviderServiceSipImpl instance in the
* context of which this call has been created.
*/
@ -58,7 +58,7 @@ protected CallSipImpl(ProtocolProviderServiceSipImpl sourceProvider)
* Adds <tt>callParticipant</tt> to the list of participants in this call.
* If the call participant is already included in the call, the method has
* no effect.
*
*
* @param callParticipant the new <tt>CallParticipant</tt>
*/
public void addCallParticipant(CallParticipantSipImpl callParticipant)
@ -77,7 +77,7 @@ public void addCallParticipant(CallParticipantSipImpl callParticipant)
* Removes <tt>callParticipant</tt> from the list of participants in this
* call. The method has no effect if there was no such participant in the
* call.
*
*
* @param callParticipant the <tt>CallParticipant</tt> leaving the call;
*/
public void removeCallParticipant(CallParticipantSipImpl callParticipant)
@ -110,7 +110,7 @@ public void removeCallParticipant(CallParticipantSipImpl callParticipant)
/**
* Sets the state of this call and fires a call change event notifying
* registered listeners for the change.
*
*
* @param newState a reference to the <tt>CallState</tt> instance that the
* call is to enter.
*/
@ -129,7 +129,7 @@ public void setCallState(CallState newState)
/**
* Returns the state that this call is currently in.
*
*
* @return a reference to the <tt>CallState</tt> instance that the call is
* currently in.
*/
@ -140,7 +140,7 @@ public CallState getCallState()
/**
* Returns an iterator over all call participants.
*
*
* @return an Iterator over all participants currently involved in the call.
*/
public Iterator<CallParticipant> getCallParticipants()
@ -150,7 +150,7 @@ public Iterator<CallParticipant> getCallParticipants()
/**
* Returns the number of participants currently associated with this call.
*
*
* @return an <tt>int</tt> indicating the number of participants currently
* associated with this call.
*/
@ -162,7 +162,7 @@ public int getCallParticipantsCount()
/**
* Dummy implementation of a method (inherited from CallParticipantListener)
* that we don't need.
*
*
* @param evt unused.
*/
public void participantImageChanged(CallParticipantChangeEvent evt)
@ -172,7 +172,7 @@ public void participantImageChanged(CallParticipantChangeEvent evt)
/**
* Dummy implementation of a method (inherited from CallParticipantListener)
* that we don't need.
*
*
* @param evt unused.
*/
public void participantAddressChanged(CallParticipantChangeEvent evt)
@ -182,7 +182,7 @@ public void participantAddressChanged(CallParticipantChangeEvent evt)
/**
* Dummy implementation of a method (inherited from CallParticipantListener)
* that we don't need.
*
*
* @param evt unused.
*/
public void participantTransportAddressChanged(
@ -193,7 +193,7 @@ public void participantTransportAddressChanged(
/**
* Dummy implementation of a method (inherited from CallParticipantListener)
* that we don't need.
*
*
* @param evt unused.
*/
public void participantDisplayNameChanged(CallParticipantChangeEvent evt)
@ -202,7 +202,7 @@ public void participantDisplayNameChanged(CallParticipantChangeEvent evt)
/**
* Verifies whether the call participant has entered a state.
*
*
* @param evt The <tt>CallParticipantChangeEvent</tt> instance containing
* the source event as well as its previous and its new status.
*/
@ -216,7 +216,8 @@ public void participantStateChanged(CallParticipantChangeEvent evt)
removeCallParticipant((CallParticipantSipImpl) evt
.getSourceCallParticipant());
}
else if ((newState == CallParticipantState.CONNECTED || newState == CallParticipantState.CONNECTING_WITH_EARLY_MEDIA))
else if ((newState == CallParticipantState.CONNECTED
|| newState == CallParticipantState.CONNECTING_WITH_EARLY_MEDIA))
{
setCallState(CallState.CALL_IN_PROGRESS);
}
@ -225,7 +226,7 @@ else if ((newState == CallParticipantState.CONNECTED || newState == CallParticip
/**
* Returns <tt>true</tt> if <tt>dialog</tt> matches the jain sip dialog
* established with one of the participants in this call.
*
*
* @param dialog the dialog whose corresponding participant we're looking
* for.
* @return true if this call contains a call participant whose jain sip
@ -239,7 +240,7 @@ public boolean contains(Dialog dialog)
/**
* Returns the call participant whose associated jain sip dialog matches
* <tt>dialog</tt>.
*
*
* @param dialog the jain sip dialog whose corresponding participant we're
* looking for.
* @return the call participant whose jain sip dialog is the same as the
@ -278,7 +279,7 @@ public CallParticipantSipImpl findCallParticipant(Dialog dialog)
/**
* Sets the <tt>CallSession</tt> that the media service has created for this
* call.
*
*
* @param callSession the <tt>CallSession</tt> that the media service has
* created for this call.
*/
@ -290,7 +291,7 @@ public void setMediaCallSession(CallSession callSession)
/**
* Sets the <tt>CallSession</tt> that the media service has created for this
* call.
*
*
* @return the <tt>CallSession</tt> that the media service has created for
* this call or null if no call session has been created so far.
*/

@ -2934,7 +2934,7 @@ public synchronized void answerCallParticipant(CallParticipant participant)
/**
* Creates a new {@link Response#OK} response to a specific {@link Request}
* which is to be sent as part of a specific {@link Dialog}.
*
*
* @param request the <code>Request</code> to create the OK response for
* @param containingDialog the <code>Dialog</code> to send the response in
* @return a new <code>Response.OK</code> response to the specified
@ -2998,7 +2998,7 @@ private CallParticipantSipImpl createCallParticipantFor(
* Returns a string representation of this OperationSetBasicTelephony
* instance including information that would permit to distinguish it among
* other instances when reading a log file.
*
*
* @return a string representation of this operation set.
*/
public String toString()
@ -3132,7 +3132,7 @@ private void transfer(CallParticipant participant, Address target)
/*
* (non-Javadoc)
*
*
* @see
* net.java.sip.communicator.service.protocol.OperationSetAdvancedTelephony
* #transfer(net.java.sip.communicator.service.protocol.CallParticipant,
@ -3184,7 +3184,7 @@ public void transfer(CallParticipant participant, CallParticipant target)
/*
* (non-Javadoc)
*
*
* @see
* net.java.sip.communicator.service.protocol.OperationSetAdvancedTelephony
* #transfer(net.java.sip.communicator.service.protocol.CallParticipant,

@ -16,7 +16,7 @@
* Provides a default implementation for most of the
* <code>CallParticipant</code> methods with the purpose of only leaving custom
* protocol development to clients using the PhoneUI service.
*
*
* @author Emil Ivov
*/
public abstract class AbstractCallParticipant
@ -226,7 +226,7 @@ public void setState(CallParticipantState newState)
* Gets the time at which this <code>CallParticipant</code> transitioned
* into a state (likely {@link CallParticipantState#CONNECTED}) marking the
* start of the duration of the participation in a <code>Call</code>.
*
*
* @return the time at which this <code>CallParticipant</code> transitioned
* into a state marking the start of the duration of the
* participation in a <code>Call</code> or

@ -48,13 +48,13 @@ public abstract class Call
* securing algorithm used
*/
private Hashtable<Object, SecurityGUIListener> securityGUIListeners;
/**
* If this flag is set to true according to the account properties
* If this flag is set to true according to the account properties
* related with the sourceProvider the associated CallSession will start
* encrypted by default (where applicable)
* encrypted by default (where applicable)
*/
private final boolean defaultEncryption;
private final boolean defaultEncryption;
/**
* Creates a new Call instance.
@ -297,14 +297,14 @@ public SecurityGUIListener getSecurityGUIListener(Object key)
else
return securityGUIListeners.get(key);
}
/**
* Returns the default call encryption flag
*
*
* @return the default call encryption flag
*/
public boolean isDefaultEncrypted()
{
return defaultEncryption;
}
return defaultEncryption;
}
}

Loading…
Cancel
Save