Revision: 60ddd5a5be5b
Author: unknown <yulian@Venera.(none)>
Date: Sat Jan 5 09:44:27 2013
Log: Updated mgcp client
http://code.google.com/p/mediaserver/source/detail?r=60ddd5a5be5b
Deleted:
/core/src/test/java/org/mobicents/media/core/endpoints/BridgeEndpointTest.java
Modified:
/client/jsr-309/tck/media/decreasingvolume-recorded.wav
/client/jsr-309/tck/server.log
/client/mgcp/driver/src/main/java/org/mobicents/protocols/mgcp/handlers/MessageHandler.java
/client/mgcp/driver/src/main/java/org/mobicents/protocols/mgcp/stack/JainMgcpStackImpl.java
/controls/mgcp/src/main/java/org/mobicents/media/server/mgcp/tx/TransactionManager.java
/controls/mgcp/src/test/java/org/mobicents/media/server/mgcp/tx/TransactionManagerTest.java
/core/src/test/java/org/mobicents/media/core/MyTestEndpoint.java
/io/rtp/src/main/java/org/mobicents/media/server/impl/rtp/JitterBuffer.java
=======================================
---
/core/src/test/java/org/mobicents/media/core/endpoints/BridgeEndpointTest.java
Fri Jan 4 13:30:11 2013
+++ /dev/null
@@ -1,543 +0,0 @@
-/*
- * Copyright 2012, Telestax, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.mobicents.media.core.endpoints;
-
-import static org.junit.Assert.assertEquals;
-
-import java.io.IOException;
-import java.util.Queue;
-import java.util.concurrent.ConcurrentLinkedQueue;
-
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.mobicents.media.Component;
-import org.mobicents.media.ComponentType;
-import org.mobicents.media.core.MyTestEndpoint;
-import org.mobicents.media.core.ResourcesPool;
-import org.mobicents.media.core.connections.RTPEnvironment;
-import org.mobicents.media.core.endpoints.impl.BridgeEndpoint;
-import org.mobicents.media.server.component.audio.SpectraAnalyzer;
-import org.mobicents.media.server.spi.Connection;
-import org.mobicents.media.server.spi.ConnectionMode;
-import org.mobicents.media.server.spi.ConnectionType;
-import org.mobicents.media.server.spi.MediaType;
-import org.mobicents.media.server.spi.ResourceUnavailableException;
-import org.mobicents.media.server.spi.TooManyConnectionsException;
-import org.mobicents.media.server.spi.dtmf.DtmfDetector;
-import org.mobicents.media.server.spi.dtmf.DtmfDetectorListener;
-import org.mobicents.media.server.spi.dtmf.DtmfEvent;
-import org.mobicents.media.server.spi.listener.TooManyListenersException;
-import org.mobicents.media.server.spi.resource.DtmfGenerator;
-import org.mobicents.media.server.utils.Text;
-
-/**
- * Bridge endpoint tests
- *
- * A bridge end point allows two kinds of connections:
- * - RTP (for remote RTP media resources) and
- * - Local (between the bridge end point and other MMS end points).
- *
- * The bridge end point mixes and forwards media between remote and local
connections.
- * Media and events arriving to the bridge end point from remote
connections are mixed
- * and forwarded to local connections. Respectively, media and events
arriving
- * to the bridge end point from local connections are mixed and forwarded
to remote connections.
- *
- *
- * @author yulian oifa
- * @author Ivelin Ivanov
- */
-public class BridgeEndpointTest extends RTPEnvironment {
-
- // one end point representing a remote RTP resource
- private MyTestEndpoint endpointRTP1;
-
- // two end points representing resources withing the media server such as
IVR, ANN or DS0
- private MyTestEndpoint endpointLocal1, endpointLocal2;
-
- // the bridge end point being tested
- private BridgeEndpoint bridgeEndpoint;
-
- Component sineRTP1, sineLocal1, sineLocal2;
- Component analyzerRTP1, analyzerLocal1, analyzerLocal2;
- DtmfGenerator dtmfGeneratorRTP1, dtmfGeneratorLocal1,
dtmfGeneratorLocal2;
- DtmfDetector dtmfDetectorRTP1, dtmfDetectorLocal1, dtmfDetectorLocal2;
- ConcurrentLinkedQueue<String> tonesReceivedAtRTP1, tonesReceivedAtLocal1,
tonesReceivedAtLocal2;
-
- private ResourcesPool resourcesPool;
-
- class ADtmfDetectorListener implements DtmfDetectorListener {
-
- Queue<String> tones;
-
- ADtmfDetectorListener(Queue<String> tonesQueue) {
- this.tones = tonesQueue;
- }
-
- public void process(DtmfEvent event) {
- tones.add(event.getTone());
- }
-
- }
-
- public BridgeEndpointTest() {
- }
-
- @BeforeClass
- public static void setUpClass() throws Exception {
- }
-
- @AfterClass
- public static void tearDownClass() throws Exception {
- }
-
- @Before
- public void setUp() throws ResourceUnavailableException,
- TooManyConnectionsException, IOException,
TooManyListenersException {
- super.setup();
-
- resourcesPool = new ResourcesPool(scheduler, channelsManager,
- dspFactory);
-
- // assign scheduler to the end points
-
- endpointRTP1 = new MyTestEndpoint("test-ep-RTP1");
- endpointRTP1.setScheduler(scheduler);
- endpointRTP1.setResourcesPool(resourcesPool);
- endpointRTP1.setFreq(80);
- endpointRTP1.start();
-
- endpointLocal1 = new MyTestEndpoint("test-ep-Local1");
- endpointLocal1.setScheduler(scheduler);
- endpointLocal1.setResourcesPool(resourcesPool);
- endpointLocal1.setFreq(150);
- endpointLocal1.start();
-
- endpointLocal2 = new MyTestEndpoint("test-ep-Local2");
- endpointLocal2.setScheduler(scheduler);
- endpointLocal2.setResourcesPool(resourcesPool);
- endpointLocal2.setFreq(250);
- endpointLocal2.start();
-
- bridgeEndpoint = new BridgeEndpoint("test-ep-bridge");
- bridgeEndpoint.setResourcesPool(resourcesPool);
- bridgeEndpoint.setScheduler(scheduler);
- bridgeEndpoint.start();
-
- sineRTP1 = endpointRTP1.getResource(MediaType.AUDIO,
ComponentType.SINE);
- sineLocal1 = endpointLocal1.getResource(MediaType.AUDIO,
ComponentType.SINE);
- sineLocal2 = endpointLocal2.getResource(MediaType.AUDIO,
ComponentType.SINE);
-
- analyzerRTP1 = endpointRTP1.getResource(MediaType.AUDIO,
- ComponentType.SPECTRA_ANALYZER);
- analyzerLocal1 = endpointLocal1.getResource(MediaType.AUDIO,
- ComponentType.SPECTRA_ANALYZER);
- analyzerLocal2 = endpointLocal2.getResource(MediaType.AUDIO,
- ComponentType.SPECTRA_ANALYZER);
-
- dtmfGeneratorRTP1 = (DtmfGenerator)
endpointRTP1.getResource(MediaType.AUDIO,
- ComponentType.DTMF_GENERATOR);
- dtmfGeneratorLocal1 = (DtmfGenerator)
endpointLocal1.getResource(MediaType.AUDIO,
- ComponentType.DTMF_GENERATOR);
- dtmfGeneratorLocal2 = (DtmfGenerator)
endpointLocal2.getResource(MediaType.AUDIO,
- ComponentType.DTMF_GENERATOR);
-
- dtmfDetectorRTP1 = (DtmfDetector)
endpointRTP1.getResource(MediaType.AUDIO,
- ComponentType.DTMF_DETECTOR);
- dtmfDetectorLocal1 = (DtmfDetector)
endpointLocal1.getResource(MediaType.AUDIO,
- ComponentType.DTMF_DETECTOR);
- dtmfDetectorLocal2 = (DtmfDetector)
endpointLocal2.getResource(MediaType.AUDIO,
- ComponentType.DTMF_DETECTOR);
-
- tonesReceivedAtRTP1 = new ConcurrentLinkedQueue<String>();
- tonesReceivedAtLocal1 = new ConcurrentLinkedQueue<String>();
- tonesReceivedAtLocal2 = new ConcurrentLinkedQueue<String>();
-
- dtmfDetectorRTP1.addListener(new
ADtmfDetectorListener(tonesReceivedAtRTP1));
- dtmfDetectorLocal1.addListener(new
ADtmfDetectorListener(tonesReceivedAtLocal1));
- dtmfDetectorLocal2.addListener(new
ADtmfDetectorListener(tonesReceivedAtLocal2));
-
- }
-
- @After
- @Override
- public void tearDown() {
- if (endpointRTP1 != null) {
- endpointRTP1.stop();
- }
-
- if (endpointLocal1 != null) {
- endpointLocal1.stop();
- }
-
- if (endpointLocal2 != null) {
- endpointLocal2.stop();
- }
-
- if (bridgeEndpoint != null) {
- bridgeEndpoint.stop();
- }
-
- super.tearDown();
- }
-
- @Test
- public void testBridgeBetweenOneRTPAndOneLocalMixOfAudioAndEvents()
throws Exception {
- long s = System.nanoTime();
-
- Connection connectionRTP1 =
endpointRTP1.createConnection(ConnectionType.RTP,
- false);
- Connection connectionBepRTP1 =
bridgeEndpoint.createConnection(ConnectionType.RTP,
- false);
-
- Text sd1 = new Text(connectionRTP1.getDescriptor());
- Text sdBep1 = new Text(connectionBepRTP1.getDescriptor());
-
- connectionRTP1.setOtherParty(sdBep1);
- connectionBepRTP1.setOtherParty(sd1);
-
- connectionRTP1.setMode(ConnectionMode.SEND_RECV);
- connectionBepRTP1.setMode(ConnectionMode.SEND_RECV);
-
- Connection connectionEPLocal1 =
endpointLocal1.createConnection(ConnectionType.LOCAL,
- false);
- Connection connectionBepLocal1 =
bridgeEndpoint.createConnection(ConnectionType.LOCAL,
- false);
-
- connectionEPLocal1.setOtherParty(connectionBepLocal1);
-
- connectionEPLocal1.setMode(ConnectionMode.SEND_RECV);
- connectionBepLocal1.setMode(ConnectionMode.SEND_RECV);
-
- sineRTP1.activate();
- sineLocal1.activate();
-
- analyzerRTP1.activate();
- analyzerLocal1.activate();
-
- dtmfDetectorRTP1.activate();
- dtmfDetectorLocal1.activate();
-
- dtmfGeneratorRTP1.setDigit("A");
- dtmfGeneratorLocal1.setDigit("1");
-
- dtmfGeneratorRTP1.activate();
- dtmfGeneratorLocal1.activate();
-
- System.out.println("Duration= " + (System.nanoTime() - s));
-
- Thread.sleep(3000);
-
- sineRTP1.deactivate();
- sineLocal1.deactivate();
-
- analyzerRTP1.deactivate();
- analyzerLocal1.deactivate();
-
- SpectraAnalyzer a1 = (SpectraAnalyzer) analyzerRTP1;
- SpectraAnalyzer a2 = (SpectraAnalyzer) analyzerLocal1;
-
- int[] s1 = a1.getSpectra();
- int[] s2 = a2.getSpectra();
-
- endpointRTP1.deleteConnection(connectionRTP1);
- endpointLocal1.deleteConnection(connectionEPLocal1);
- bridgeEndpoint.deleteAllConnections();
-
- //assertEquals(1, s1.length);
- //assertEquals(1, s2.length);
-
- //assertEquals(150, s1[0], 5);
- //assertEquals(80, s2[0], 5);
-
- assertEquals(1, tonesReceivedAtRTP1.size());
- assertEquals(true, tonesReceivedAtRTP1.remove("1"));
-
- assertEquals(1, tonesReceivedAtLocal1.size());
- assertEquals(true, tonesReceivedAtLocal1.remove("A"));
- }
-
- @Test
- public void
testBridgeBetweenOneRTPAndTwoLocalConnectionsMixOfAudioAndEvents() throws
Exception {
- long s = System.nanoTime();
-
- // test audio flow
- sineRTP1.activate();
- sineLocal1.activate();
- sineLocal2.activate();
-
- analyzerRTP1.activate();
- analyzerLocal1.activate();
- analyzerLocal2.activate();
-
- Connection connectionRTP1 =
endpointRTP1.createConnection(ConnectionType.RTP,
- false);
- Connection connectionBepRTP1 =
bridgeEndpoint.createConnection(ConnectionType.RTP,
- false);
-
- Text sd1 = new Text(connectionRTP1.getDescriptor());
- Text sdBep1 = new Text(connectionBepRTP1.getDescriptor());
-
- connectionRTP1.setOtherParty(sdBep1);
- connectionBepRTP1.setOtherParty(sd1);
-
- connectionRTP1.setMode(ConnectionMode.SEND_RECV);
- connectionBepRTP1.setMode(ConnectionMode.SEND_RECV);
-
- Connection connectionEPLocal1 =
endpointLocal1.createConnection(ConnectionType.LOCAL,
- false);
- Connection connectionBepLocal1 =
bridgeEndpoint.createConnection(ConnectionType.LOCAL,
- false);
-
- connectionEPLocal1.setOtherParty(connectionBepLocal1);
-
- connectionEPLocal1.setMode(ConnectionMode.SEND_RECV);
- connectionBepLocal1.setMode(ConnectionMode.SEND_RECV);
-
- Connection connectionEPLocal2 =
endpointLocal2.createConnection(ConnectionType.LOCAL,
- false);
- Connection connectionBepLocal2 =
bridgeEndpoint.createConnection(ConnectionType.LOCAL,
- false);
-
- connectionEPLocal2.setOtherParty(connectionBepLocal2);
-
- connectionEPLocal2.setMode(ConnectionMode.SEND_RECV);
- connectionBepLocal2.setMode(ConnectionMode.SEND_RECV);
-
- dtmfDetectorRTP1.activate();
- dtmfDetectorLocal1.activate();
- dtmfDetectorLocal2.activate();
-
- dtmfGeneratorRTP1.setDigit("A");
- dtmfGeneratorLocal1.setDigit("1");
- dtmfGeneratorLocal2.setDigit("2");
-
- dtmfGeneratorRTP1.activate();
- dtmfGeneratorLocal1.activate();
- dtmfGeneratorLocal2.activate();
-
- System.out.println("Duration= " + (System.nanoTime() - s));
-
- Thread.sleep(3000);
-
- sineRTP1.deactivate();
- sineLocal1.deactivate();
- sineLocal2.deactivate();
-
- analyzerRTP1.deactivate();
- analyzerLocal1.deactivate();
- analyzerLocal2.deactivate();
-
- SpectraAnalyzer aRTP1 = (SpectraAnalyzer) analyzerRTP1;
- SpectraAnalyzer aLocal1 = (SpectraAnalyzer) analyzerLocal1;
- SpectraAnalyzer aLocal2 = (SpectraAnalyzer) analyzerLocal2;
-
- int[] sRTP1 = aRTP1.getSpectra();
- int[] sLocal1 = aLocal1.getSpectra();
- int[] sLocal2 = aLocal2.getSpectra();
-
- endpointRTP1.deleteConnection(connectionRTP1);
- endpointLocal1.deleteConnection(connectionEPLocal1);
- endpointLocal2.deleteConnection(connectionEPLocal1);
- bridgeEndpoint.deleteAllConnections();
-
- // test that the RTP connection received mixed audio from both Local
connections
- assertEquals(2, sRTP1.length);
- assertEquals(150, sRTP1[0], 5);
- assertEquals(250, sRTP1[1], 5);
-
- // test that each Local connection received the audio from the RTP
connection
- assertEquals(1, sLocal1.length);
- assertEquals(1, sLocal2.length);
- assertEquals(80, sLocal1[0], 5);
- assertEquals(80, sLocal2[0], 5);
-
- assertEquals(2, tonesReceivedAtRTP1.size());
- assertEquals(true, tonesReceivedAtRTP1.remove("1"));
- assertEquals(true, tonesReceivedAtRTP1.remove("2"));
-
- assertEquals(1, tonesReceivedAtLocal1.size());
- assertEquals(true, tonesReceivedAtLocal1.remove("A"));
-
- assertEquals(1, tonesReceivedAtLocal2.size());
- assertEquals(true, tonesReceivedAtLocal2.remove("A"));
- }
-
- @Test
- public void testBridgeBetweenOneRTPAndTwoLocalConnectionsAudioOnly()
throws Exception {
- long s = System.nanoTime();
-
- // test audio flow
- sineRTP1.activate();
- sineLocal1.activate();
- sineLocal2.activate();
-
- analyzerRTP1.activate();
- analyzerLocal1.activate();
- analyzerLocal2.activate();
-
- Connection connectionRTP1 =
endpointRTP1.createConnection(ConnectionType.RTP,
- false);
- Connection connectionBepRTP1 =
bridgeEndpoint.createConnection(ConnectionType.RTP,
- false);
-
- Text sd1 = new Text(connectionRTP1.getDescriptor());
- Text sdBep1 = new Text(connectionBepRTP1.getDescriptor());
-
- connectionRTP1.setOtherParty(sdBep1);
- connectionBepRTP1.setOtherParty(sd1);
-
- connectionRTP1.setMode(ConnectionMode.SEND_RECV);
- connectionBepRTP1.setMode(ConnectionMode.SEND_RECV);
-
- Connection connectionEPLocal1 =
endpointLocal1.createConnection(ConnectionType.LOCAL,
- false);
- Connection connectionBepLocal1 =
bridgeEndpoint.createConnection(ConnectionType.LOCAL,
- false);
-
- connectionEPLocal1.setOtherParty(connectionBepLocal1);
-
- connectionEPLocal1.setMode(ConnectionMode.SEND_RECV);
- connectionBepLocal1.setMode(ConnectionMode.SEND_RECV);
-
- Connection connectionEPLocal2 =
endpointLocal2.createConnection(ConnectionType.LOCAL,
- false);
- Connection connectionBepLocal2 =
bridgeEndpoint.createConnection(ConnectionType.LOCAL,
- false);
-
- connectionEPLocal2.setOtherParty(connectionBepLocal2);
-
- connectionEPLocal2.setMode(ConnectionMode.SEND_RECV);
- connectionBepLocal2.setMode(ConnectionMode.SEND_RECV);
-
-
- System.out.println("Duration= " + (System.nanoTime() - s));
-
- Thread.sleep(3000);
-
- sineRTP1.deactivate();
- sineLocal1.deactivate();
- sineLocal2.deactivate();
-
- analyzerRTP1.deactivate();
- analyzerLocal1.deactivate();
- analyzerLocal2.deactivate();
-
- SpectraAnalyzer aRTP1 = (SpectraAnalyzer) analyzerRTP1;
- SpectraAnalyzer aLocal1 = (SpectraAnalyzer) analyzerLocal1;
- SpectraAnalyzer aLocal2 = (SpectraAnalyzer) analyzerLocal2;
-
- int[] sRTP1 = aRTP1.getSpectra();
- int[] sLocal1 = aLocal1.getSpectra();
- int[] sLocal2 = aLocal2.getSpectra();
-
- endpointRTP1.deleteConnection(connectionRTP1);
- endpointLocal1.deleteConnection(connectionEPLocal1);
- endpointLocal2.deleteConnection(connectionEPLocal1);
- bridgeEndpoint.deleteAllConnections();
-
- // test that the RTP connection received mixed audio from both Local
connections
- assertEquals(2, sRTP1.length);
- assertEquals(150, sRTP1[0], 5);
- assertEquals(250, sRTP1[1], 5);
-
- // test that each Local connection received the audio from the RTP
connection
- assertEquals(1, sLocal1.length);
- assertEquals(1, sLocal2.length);
- assertEquals(80, sLocal1[0], 5);
- assertEquals(80, sLocal2[0], 5);
- }
-
-
- @Test
- public void testBridgeBetweenOneRTPAndTwoLocalConnectionsEventsOnly()
throws Exception {
- long s = System.nanoTime();
-
- Connection connectionRTP1 =
endpointRTP1.createConnection(ConnectionType.RTP,
- false);
- Connection connectionBepRTP1 =
bridgeEndpoint.createConnection(ConnectionType.RTP,
- false);
-
- Text sd1 = new Text(connectionRTP1.getDescriptor());
- Text sdBep1 = new Text(connectionBepRTP1.getDescriptor());
-
- connectionRTP1.setOtherParty(sdBep1);
- connectionBepRTP1.setOtherParty(sd1);
-
- connectionRTP1.setMode(ConnectionMode.SEND_RECV);
- connectionBepRTP1.setMode(ConnectionMode.SEND_RECV);
-
- Connection connectionEPLocal1 =
endpointLocal1.createConnection(ConnectionType.LOCAL,
- false);
- Connection connectionBepLocal1 =
bridgeEndpoint.createConnection(ConnectionType.LOCAL,
- false);
-
- connectionEPLocal1.setOtherParty(connectionBepLocal1);
-
- connectionEPLocal1.setMode(ConnectionMode.SEND_RECV);
- connectionBepLocal1.setMode(ConnectionMode.SEND_RECV);
-
- Connection connectionEPLocal2 =
endpointLocal2.createConnection(ConnectionType.LOCAL,
- false);
- Connection connectionBepLocal2 =
bridgeEndpoint.createConnection(ConnectionType.LOCAL,
- false);
-
- connectionEPLocal2.setOtherParty(connectionBepLocal2);
-
- connectionEPLocal2.setMode(ConnectionMode.SEND_RECV);
- connectionBepLocal2.setMode(ConnectionMode.SEND_RECV);
-
- dtmfDetectorRTP1.activate();
- dtmfDetectorLocal1.activate();
- dtmfDetectorLocal2.activate();
-
- dtmfGeneratorRTP1.setDigit("A");
- dtmfGeneratorLocal1.setDigit("1");
- dtmfGeneratorLocal2.setDigit("2");
-
- dtmfGeneratorRTP1.activate();
- dtmfGeneratorLocal2.activate();
- dtmfGeneratorLocal1.activate();
-
- System.out.println("Duration= " + (System.nanoTime() - s));
-
- Thread.sleep(3000);
-
- endpointRTP1.deleteConnection(connectionRTP1);
- endpointLocal1.deleteConnection(connectionEPLocal1);
- endpointLocal2.deleteConnection(connectionEPLocal1);
- bridgeEndpoint.deleteAllConnections();
-
- assertEquals(2, tonesReceivedAtRTP1.size());
- assertEquals(true, tonesReceivedAtRTP1.remove("1"));
- assertEquals(true, tonesReceivedAtRTP1.remove("2"));
-
- assertEquals(1, tonesReceivedAtLocal1.size());
- assertEquals(true, tonesReceivedAtLocal1.remove("A"));
-
- assertEquals(1, tonesReceivedAtLocal2.size());
- assertEquals(true, tonesReceivedAtLocal2.remove("A"));
- }
-
-}
=======================================
--- /client/jsr-309/tck/media/decreasingvolume-recorded.wav Fri Jan 4
08:34:35 2013
+++ /client/jsr-309/tck/media/decreasingvolume-recorded.wav Sat Jan 5
09:44:27 2013
Binary file, no diff available.
=======================================
--- /client/jsr-309/tck/server.log Fri Jan 4 14:06:44 2013
+++ /client/jsr-309/tck/server.log Sat Jan 5 09:44:27 2013
@@ -1,6 +1,6 @@
-2013-01-04 22:11:36,321 DEBUG [TestBase] (main) Loading
file:/opt/mobsource/medianew/client/jsr-309/tck/exclude-list.properties
-2013-01-04 22:11:36,322 INFO [Runner] (main) Start
mandatory.functional.mediagroup.PlayerTest.test_2_1_1_1_Play
javadoc::Joinable::1 javadoc::MediaGroup::1 javadoc::MediaGroup::6
javadoc::Player::1 javadoc::PlayerEvent::15
-2013-01-04 22:11:36,323 DEBUG [TestBase] (main) Getting a MsControlFactory
instance
-2013-01-04 22:11:36,344 INFO [DriverImpl] (main) Initializing MGCP on
/127.0.0.1:2729
-2013-01-04 22:11:36,358 WARN [JainMgcpStackImpl] (main) Failed to locate
properties file, using default values
-2013-01-04 22:11:36,367 INFO [JainMgcpStackImpl] (main) Jain Mgcp stack
bound to IP /127.0.0.1 and UDP port 2729
+2013-01-05 18:58:05,329 DEBUG [TestBase] (main) Loading
file:/opt/mobsource/medianew/client/jsr-309/tck/exclude-list.properties
+2013-01-05 18:58:05,335 INFO [Runner] (main) Start
mandatory.functional.mediagroup.PlayerTest.test_2_1_1_1_Play
javadoc::Joinable::1 javadoc::MediaGroup::1 javadoc::MediaGroup::6
javadoc::Player::1 javadoc::PlayerEvent::15
+2013-01-05 18:58:05,335 DEBUG [TestBase] (main) Getting a MsControlFactory
instance
+2013-01-05 18:58:05,357 INFO [DriverImpl] (main) Initializing MGCP on
/127.0.0.1:2729
+2013-01-05 18:58:05,370 WARN [JainMgcpStackImpl] (main) Failed to locate
properties file, using default values
+2013-01-05 18:58:05,380 INFO [JainMgcpStackImpl] (main) Jain Mgcp stack
bound to IP /127.0.0.1 and UDP port 2729
=======================================
---
/client/mgcp/driver/src/main/java/org/mobicents/protocols/mgcp/handlers/MessageHandler.java
Tue Jan 1 16:15:51 2013
+++
/client/mgcp/driver/src/main/java/org/mobicents/protocols/mgcp/handlers/MessageHandler.java
Sat Jan 5 09:44:27 2013
@@ -283,7 +283,7 @@
else
{
if (logger.isDebugEnabled())
- logger.debug("Processing response
message");
+ logger.debug("Processing response message " + new
String(data,message[0].getOffset(),message[0].getLength()));
TransactionHandler handler = (TransactionHandler)
stack.getLocalTransactions().get(remoteTxIdIntegere);
if (handler == null)
=======================================
---
/client/mgcp/driver/src/main/java/org/mobicents/protocols/mgcp/stack/JainMgcpStackImpl.java
Tue Jan 1 16:15:51 2013
+++
/client/mgcp/driver/src/main/java/org/mobicents/protocols/mgcp/stack/JainMgcpStackImpl.java
Sat Jan 5 09:44:27 2013
@@ -200,7 +200,7 @@
try {
Properties props = new Properties();
- InputStream is =
this.getClass().getResourceAsStream(this.propertiesFileName);
+ InputStream is =
this.getClass().getClassLoader().getResourceAsStream(this.propertiesFileName);
if (is == null) {
logger.warn("Failed to locate properties file, using
default values");
return;
@@ -339,10 +339,9 @@
if(this.provider!=null)
this.provider.start();
-
+
+ start = System.currentTimeMillis();
while (!stopped) {
-
- start = System.currentTimeMillis();
try {
PacketRepresentation pr;
do {
@@ -384,10 +383,11 @@
}
finish = System.currentTimeMillis();
-
drift = finish - start;
-
latency = delay - drift;
+ //lets check by cycle since if we sleep more
due to
+ //other threads we will be working not too fast
here
+ start = finish;
if (drift <= threshold) {
try {
@@ -396,7 +396,6 @@
return;
}
}
-
} catch (IOException e) {
if (stopped) {
break;
=======================================
---
/controls/mgcp/src/main/java/org/mobicents/media/server/mgcp/tx/TransactionManager.java
Tue Oct 23 05:48:15 2012
+++
/controls/mgcp/src/main/java/org/mobicents/media/server/mgcp/tx/TransactionManager.java
Sat Jan 5 09:44:27 2013
@@ -143,9 +143,8 @@
private Transaction begin(int id) {
Transaction t = pool.poll();
- if (t == null) {
- return t;
- }
+ if (t == null)
+ t=new Transaction(this);
t.uniqueId = id;
active.put(t.uniqueId,t);
=======================================
---
/controls/mgcp/src/test/java/org/mobicents/media/server/mgcp/tx/TransactionManagerTest.java
Tue Oct 23 05:48:15 2012
+++
/controls/mgcp/src/test/java/org/mobicents/media/server/mgcp/tx/TransactionManagerTest.java
Sat Jan 5 09:44:27 2013
@@ -95,7 +95,7 @@
assertTrue("Transaction not found", tx != null);
tx = txManager.allocateNew(4);
- assertTrue("Transaction still in pool", tx == null);
+ assertTrue("Transaction still in pool", tx != null);
}
@Test
=======================================
--- /core/src/test/java/org/mobicents/media/core/MyTestEndpoint.java Fri
Jan 4 16:20:43 2013
+++ /core/src/test/java/org/mobicents/media/core/MyTestEndpoint.java Sat
Jan 5 09:44:27 2013
@@ -84,9 +84,9 @@
case SINE:
return sine;
case SPECTRA_ANALYZER:
- return analyzer;
- default:
- return super.getResource(mediaType,
componentType);
+ return analyzer;
+ default:
+ return super.getResource(mediaType,
componentType);
}
}
=======================================
---
/io/rtp/src/main/java/org/mobicents/media/server/impl/rtp/JitterBuffer.java
Fri Jan 4 23:07:02 2013
+++
/io/rtp/src/main/java/org/mobicents/media/server/impl/rtp/JitterBuffer.java
Sat Jan 5 09:44:27 2013
@@ -1,5 +1,6 @@
/*
- * Copyright 2012, Telestax, Inc. and individual contributors
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -52,17 +53,9 @@
* introduced can lead to conversational difficulty.
*
* @author oifa yulian
- * @author Ivelin Ivanov
- *
*/
public class JitterBuffer implements Serializable {
-
- /**
- * serialVersionID is required for serializable classes
- */
- private static final long serialVersionUID = -179700214594330050L;
-
- //The underlying buffer size
+ //The underlying buffer size
private static final int QUEUE_SIZE = 10;
//the underlying buffer
private ArrayList<Frame> queue = new ArrayList(QUEUE_SIZE);
@@ -72,9 +65,9 @@
//first received sequence number
private long isn = -1;
- //allowed jitter buffer size
+ //allowed jitter
private long jitterBufferSize;
-
+
//packet arrival dead line measured on RTP clock.
//initial value equals to infinity
private long arrivalDeadLine = 0;
@@ -224,10 +217,6 @@
{
this.format=format;
logger.info("Format has been changed: " +
this.format.toString());
-
- //Since the RTP packet Payload Type (format) changed, it is
possible that the sampling rate/clock rate is different for the new format
- // update current clock rate we use to convert timestamp units to
absolute time and vice versa
- updateCurrentClockRate(this.format.getClockRate());
}
//if this is first packet then synchronize clock
@@ -239,6 +228,9 @@
else
estimateJitter(packet);
+ //update clock rate
+ rtpClock.setClockRate(this.format.getClockRate());
+
Frame f=null;
//drop outstanding packets
//packet is outstanding if its timestamp of arrived packet is
less
@@ -333,12 +325,7 @@
}
}
-
- private void updateCurrentClockRate(int newClockRate) {
- rtpClock.setClockRate(newClockRate);
- }
-
- /**
+ /**
* Polls packet from buffer's head.
*
* @param timestamp the media time measured by reader