[sip-comm-dev] how to delete DELAY ?


#1

Hallo all,

so , one solution for JMF , how to delete delay.

JButton -> action

···

-----------------------------------------------------------------

DelayRemover delayremover = new DelayRemover(player);
delayremover.start();

public class DelayRemover
    extends Thread {
  javax.media.Player player;

  public DelayRemover(javax.media.Player player) {
    this.player=player;
  }

  public void run() {
    try {
      player.setRate(12F);
      this.sleep(500);
      player.setRate(1.0F);
    }
    catch (InterruptedException e) {
      System.out.println("Bad time!"+e);
    }
  }
}

--------------------------------------------------------------

100% effective :slight_smile:

Wbr,
--
Alexandr Dubovikov * baron@iRC RusNet * mailto:shurik@start4.info
    AD1-UANIC * ICQ: 122351182 * http://www.start4.info

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#2

Hi,

What delay you're talking about? How does this code work? What results we'll
see applying this?

At what stage a player should be passed to this DelayRemover?

Regards,
Shafqat

···

-----Original Message-----
From: Alexandr Dubovikov [mailto:shurik@start4.info]
Sent: Friday, March 11, 2005 6:46 PM
To: dev@sip-communicator.dev.java.net
Subject: [sip-comm-dev] how to delete DELAY ?

Hallo all,

so , one solution for JMF , how to delete delay.

JButton -> action

-----------------------------------------------------------------

DelayRemover delayremover = new DelayRemover(player);
delayremover.start();

public class DelayRemover
    extends Thread {
  javax.media.Player player;

  public DelayRemover(javax.media.Player player) {
    this.player=player;
  }

  public void run() {
    try {
      player.setRate(12F);
      this.sleep(500);
      player.setRate(1.0F);
    }
    catch (InterruptedException e) {
      System.out.println("Bad time!"+e);
    }
  }
}

--------------------------------------------------------------

100% effective :slight_smile:

Wbr,
--
Alexandr Dubovikov * baron@iRC RusNet * mailto:shurik@start4.info
    AD1-UANIC * ICQ: 122351182 * http://www.start4.info

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#3

Hi,

Hi,

What delay you're talking about? How does this code work? What results we'll
see applying this?

PSTN <-> softclient
softclient <-> softclient

When your talkpartner say "Hallo" in time - t1, you will hear it in time t2.
So delta of (t2-t1) called DELAY.

sometimes the delta is very high (around 1-2 second).

if you will create button in your application (here is SIP communicator)
and action of your button is a function:

void delayRemoveButton_actionPerformed(ActionEvent e) {
    if(player == null) return;
    DelayRemover delayremove = new DelayRemover(player);
    delayremove.start();
}

after this action, delay will not exist any more or will be very less.

At what stage a player should be passed to this DelayRemover?

after it:
public void playerStarting(MediaEvent event)

so, a player should be started.

Make a button and you will see it.

I think, the problem exist in MediaTime of RTP stream. It should be one more bug
report for JMF.

···

On Fri, Mar 11, 2005 at 07:05:20PM +0600, Shafqat Ullah wrote:

Regards,
Shafqat

> -----Original Message-----
> From: Alexandr Dubovikov [mailto:shurik@start4.info]
> Sent: Friday, March 11, 2005 6:46 PM
> To: dev@sip-communicator.dev.java.net
> Subject: [sip-comm-dev] how to delete DELAY ?
>
> Hallo all,
>
> so , one solution for JMF , how to delete delay.
>
> JButton -> action
>
> -----------------------------------------------------------------
>
> DelayRemover delayremover = new DelayRemover(player);
> delayremover.start();
>
>
> public class DelayRemover
> extends Thread {
> javax.media.Player player;
>
> public DelayRemover(javax.media.Player player) {
> this.player=player;
> }
>
> public void run() {
> try {
> player.setRate(12F);
> this.sleep(500);
> player.setRate(1.0F);
> }
> catch (InterruptedException e) {
> System.out.println("Bad time!"+e);
> }
> }
> }
>
> --------------------------------------------------------------
>
>
> 100% effective :slight_smile:
>
>
> Wbr,
> --
> Alexandr Dubovikov * baron@iRC RusNet * mailto:shurik@start4.info
> AD1-UANIC * ICQ: 122351182 * http://www.start4.info
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
> For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

--
Alexandr Dubovikov * baron@iRC RusNet * mailto:shurik@start4.info
    AD1-UANIC * ICQ: 122351182 * http://www.start4.info

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net