|
|
|
|
@ -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
|
|
|
|
|
|