コード例 #1
0
  @Before
  public void setUp() throws IOException {
    clock = new DefaultClock();

    scheduler = new Scheduler();
    scheduler.setClock(clock);
    scheduler.start();

    udpInterface = new UdpManager();
    udpInterface.setBindAddress("localhost");
    udpInterface.start();

    mgcpProvider = new MgcpProvider(udpInterface, 1024, scheduler);
    address = new InetSocketAddress("localhost", 2425);

    selector = new ActionSelector(scheduler);
  }
コード例 #2
0
  public void setup() throws IOException {
    // use default clock
    clock = new WallClock();

    dspFactory.addCodec("org.mobicents.media.server.impl.dsp.audio.g711.alaw.Encoder");
    dspFactory.addCodec("org.mobicents.media.server.impl.dsp.audio.g711.alaw.Decoder");

    // create single thread scheduler
    mediaScheduler = new PriorityQueueScheduler();
    mediaScheduler.setClock(clock);
    mediaScheduler.start();

    udpManager = new UdpManager(scheduler);
    udpManager.setBindAddress("127.0.0.1");
    scheduler.start();
    udpManager.start();

    channelsManager = new ChannelsManager(udpManager);
    channelsManager.setScheduler(mediaScheduler);
  }