[sip-comm-dev] junit tests error


#1

Hi to all,

I've downloaded sip-communicator's source code, and I can run it from source (in eclipse).
I have a problem running the junit tests. I've tried to launch some single test classes, some of them work, some give errors. By right-clicking the whole test package and selecting "run as -> junit test", each test is called, but most of them end up with a java.lang.NullPointerException (runs: 304, errors 242, failures 55).

Could someone help me to run all the test correctly?

Thanks,
Bernhard Glatt

···

---------------------------------------------------------------------
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 to all,
I've found out in the meantime that the tests should be run by ant, starting them from the build.xml. Now each test is launched, but only those of the slicklesstests-package succeed.
For most of the other slick packages (callhistory, configuration, fileaccess,...), the test report gives me an error like this for each package:

No test with id=CallHistoryServiceLick

java.lang.IllegalArgumentException: No test with id=CallHistoryServiceLick
at net.java.sip.communicator.slick.runner.SipCommunicatorSlickRunner$2.runTest(SipCommunicatorSlickRunner.java:237)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at net.java.sip.communicator.slick.runner.ScTestRunner.doRun(ScTestRunner.java:104)
at net.java.sip.communicator.slick.runner.ScTestRunner.doRun(ScTestRunner.java:94)
at net.java.sip.communicator.slick.runner.ScTestRunner.run(ScTestRunner.java:56)
at net.java.sip.communicator.slick.runner.SipCommunicatorSlickRunner.start(SipCommunicatorSlickRunner.java:150)
at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:509)
at org.apache.felix.framework.Felix._startBundle(Felix.java:1260)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1201)
at org.apache.felix.framework.Felix.setFrameworkStartLevel(Felix.java:807)
at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:256)
at java.lang.Thread.run(Unknown Source)

Has anyone suggestions for me how to go on?

Thanks,
Bernhard Glatt

Bernhard Glatt schrieb:

···

Hi to all,

I've downloaded sip-communicator's source code, and I can run it from source (in eclipse).
I have a problem running the junit tests. I've tried to launch some single test classes, some of them work, some give errors. By right-clicking the whole test package and selecting "run as -> junit test", each test is called, but most of them end up with a java.lang.NullPointerException (runs: 304, errors 242, failures 55).

Could someone help me to run all the test correctly?

Thanks,
Bernhard Glatt

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

Hello Bernhard,

One other thing you need to do before running the tests, is edit your
accounts.properties file in the sip-communicator/lib directory. That's
where you define the user names and the passwords for the accounts that
will be used for the testing. You can use the
sip-communicator/lib/accounts.properties.template file as a basis.

The exception that you have pasted in your mail, however, is not related
to what I just said. Have you been modifying your
felix.unit.test.properties file? Or maybe lib/testing.properties? In
either case I'd suggest you start over with a clean checkout (and don't
forget to create your own copy of the accounts.properties file)

Hope this helps
Emil

Bernhard Glatt wrote:

···

Hi to all,
I've found out in the meantime that the tests should be run by ant,
starting them from the build.xml. Now each test is launched, but only
those of the slicklesstests-package succeed.
For most of the other slick packages (callhistory, configuration,
fileaccess,...), the test report gives me an error like this for each
package:

No test with id=CallHistoryServiceLick

java.lang.IllegalArgumentException: No test with id=CallHistoryServiceLick
at
net.java.sip.communicator.slick.runner.SipCommunicatorSlickRunner$2.runTest(SipCommunicatorSlickRunner.java:237)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
net.java.sip.communicator.slick.runner.ScTestRunner.doRun(ScTestRunner.java:104)
at
net.java.sip.communicator.slick.runner.ScTestRunner.doRun(ScTestRunner.java:94)
at
net.java.sip.communicator.slick.runner.ScTestRunner.run(ScTestRunner.java:56)
at
net.java.sip.communicator.slick.runner.SipCommunicatorSlickRunner.start(SipCommunicatorSlickRunner.java:150)
at
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:509)
at org.apache.felix.framework.Felix._startBundle(Felix.java:1260)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1201)
at org.apache.felix.framework.Felix.setFrameworkStartLevel(Felix.java:807)
at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:256)
at java.lang.Thread.run(Unknown Source)

Has anyone suggestions for me how to go on?

Thanks,
Bernhard Glatt

Bernhard Glatt schrieb:

Hi to all,

I've downloaded sip-communicator's source code, and I can run it from
source (in eclipse).
I have a problem running the junit tests. I've tried to launch some
single test classes, some of them work, some give errors. By
right-clicking the whole test package and selecting "run as -> junit
test", each test is called, but most of them end up with a
java.lang.NullPointerException (runs: 304, errors 242, failures 55).

Could someone help me to run all the test correctly?

Thanks,
Bernhard Glatt

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

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


#4

Hi Emil,

thank you for your response.
As you suggested I started with a new checkout, the errors don't appear anymore.

To prepare the accounts.properties file correctly, I need real accounts for each service implemented, right?
Is there a possibility to launch the tests of only one service, for example msn? My intention is to test first my own new written tests to see if they work, and in a second moment all the test-packages together. I have a little experience with junit, but launching the existing tests with junit gives me most times a java.lang.NullPointerException. I assume because the environment in that case is not prepared for testing.
Could you explain me the "right" way to test my code?

Thanks again for your help,
Bernhard

···

-----Ursprüngliche Nachricht-----
Von: Emil Ivov [mailto:emcho@sip-communicator.org]
Gesendet: Fr 09.11.2007 09:45
An: dev@sip-communicator.dev.java.net
Betreff: Re: [sip-comm-dev] junit tests error

Hello Bernhard,

One other thing you need to do before running the tests, is edit your
accounts.properties file in the sip-communicator/lib directory. That's
where you define the user names and the passwords for the accounts that
will be used for the testing. You can use the
sip-communicator/lib/accounts.properties.template file as a basis.

The exception that you have pasted in your mail, however, is not related
to what I just said. Have you been modifying your
felix.unit.test.properties file? Or maybe lib/testing.properties? In
either case I'd suggest you start over with a clean checkout (and don't
forget to create your own copy of the accounts.properties file)

Hope this helps
Emil

Bernhard Glatt wrote:

Hi to all,
I've found out in the meantime that the tests should be run by ant,
starting them from the build.xml. Now each test is launched, but only
those of the slicklesstests-package succeed.
For most of the other slick packages (callhistory, configuration,
fileaccess,...), the test report gives me an error like this for each
package:

No test with id=CallHistoryServiceLick

java.lang.IllegalArgumentException: No test with id=CallHistoryServiceLick
at
net.java.sip.communicator.slick.runner.SipCommunicatorSlickRunner$2.runTest(SipCommunicatorSlickRunner.java:237)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
net.java.sip.communicator.slick.runner.ScTestRunner.doRun(ScTestRunner.java:104)
at
net.java.sip.communicator.slick.runner.ScTestRunner.doRun(ScTestRunner.java:94)
at
net.java.sip.communicator.slick.runner.ScTestRunner.run(ScTestRunner.java:56)
at
net.java.sip.communicator.slick.runner.SipCommunicatorSlickRunner.start(SipCommunicatorSlickRunner.java:150)
at
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:509)
at org.apache.felix.framework.Felix._startBundle(Felix.java:1260)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1201)
at org.apache.felix.framework.Felix.setFrameworkStartLevel(Felix.java:807)
at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:256)
at java.lang.Thread.run(Unknown Source)

Has anyone suggestions for me how to go on?

Thanks,
Bernhard Glatt

Bernhard Glatt schrieb:

Hi to all,

I've downloaded sip-communicator's source code, and I can run it from
source (in eclipse).
I have a problem running the junit tests. I've tried to launch some
single test classes, some of them work, some give errors. By
right-clicking the whole test package and selecting "run as -> junit
test", each test is called, but most of them end up with a
java.lang.NullPointerException (runs: 304, errors 242, failures 55).

Could someone help me to run all the test correctly?

Thanks,
Bernhard Glatt

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

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


#5

Hello Bernhard,

Glatt Bernhard (Student Com07) wrote:

Hi Emil,

thank you for your response. As you suggested I started with a new
checkout, the errors don't appear anymore.

Great! Glad to hear this.

To prepare the accounts.properties file correctly, I need real
accounts for each service implemented, right?

Right.

Is there a possibility
to launch the tests of only one service, for example msn?

Yes, have a look at the lib/testing.properties file, you can edit it and
remove the lines with the protocol SLICKs that you don't want to run.

My
intention is to test first my own new written tests to see if they
work, and in a second moment all the test-packages together.

Good idea. Besides tests for protocols like MSN, Yahoo! and ICQ often
fail for reasons that we have no idea of determining since we don't have
access to the corresponding servers.

I have a
little experience with junit, but launching the existing tests with
junit gives me most times a java.lang.NullPointerException. I assume
because the environment in that case is not prepared for testing.
Could you explain me the "right" way to test my code?

We do it with the ant "test" target in the build.xml. If you'd like to
run them differently (e.g., in an IDE) you would have to make sure that
you specify the complete classpath and all the system properties that
you see in the test target.

Thanks again for your help, Bernhard

Sure, you are most welcome!

Cheers
Emil

···

-----Urspr�ngliche Nachricht----- Von: Emil Ivov
[mailto:emcho@sip-communicator.org] Gesendet: Fr 09.11.2007 09:45 An:
dev@sip-communicator.dev.java.net Betreff: Re: [sip-comm-dev] junit
tests error

Hello Bernhard,

One other thing you need to do before running the tests, is edit your
accounts.properties file in the sip-communicator/lib directory.
That's where you define the user names and the passwords for the
accounts that will be used for the testing. You can use the
sip-communicator/lib/accounts.properties.template file as a basis.

The exception that you have pasted in your mail, however, is not
related to what I just said. Have you been modifying your
felix.unit.test.properties file? Or maybe lib/testing.properties? In
either case I'd suggest you start over with a clean checkout (and
don't forget to create your own copy of the accounts.properties file)

Hope this helps Emil

Bernhard Glatt wrote:

Hi to all, I've found out in the meantime that the tests should be
run by ant, starting them from the build.xml. Now each test is
launched, but only those of the slicklesstests-package succeed. For
most of the other slick packages (callhistory, configuration,
fileaccess,...), the test report gives me an error like this for
each package:

No test with id=CallHistoryServiceLick

java.lang.IllegalArgumentException: No test with
id=CallHistoryServiceLick at
net.java.sip.communicator.slick.runner.SipCommunicatorSlickRunner$2.runTest(SipCommunicatorSlickRunner.java:237)
at junit.framework.TestCase.runBare(TestCase.java:127) at
junit.framework.TestResult$1.protect(TestResult.java:106) at
junit.framework.TestResult.runProtected(TestResult.java:124) at
junit.framework.TestResult.run(TestResult.java:109) at
junit.framework.TestCase.run(TestCase.java:118) at
junit.framework.TestSuite.runTest(TestSuite.java:208) at
junit.framework.TestSuite.run(TestSuite.java:203) at
net.java.sip.communicator.slick.runner.ScTestRunner.doRun(ScTestRunner.java:104)
at
net.java.sip.communicator.slick.runner.ScTestRunner.doRun(ScTestRunner.java:94)
at
net.java.sip.communicator.slick.runner.ScTestRunner.run(ScTestRunner.java:56)
at
net.java.sip.communicator.slick.runner.SipCommunicatorSlickRunner.start(SipCommunicatorSlickRunner.java:150)
at
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:509)
at org.apache.felix.framework.Felix._startBundle(Felix.java:1260)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1201) at
org.apache.felix.framework.Felix.setFrameworkStartLevel(Felix.java:807)
at
org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:256)
at java.lang.Thread.run(Unknown Source)

Has anyone suggestions for me how to go on?

Thanks, Bernhard Glatt

Bernhard Glatt schrieb:

Hi to all,

I've downloaded sip-communicator's source code, and I can run it
from source (in eclipse). I have a problem running the junit
tests. I've tried to launch some single test classes, some of
them work, some give errors. By right-clicking the whole test
package and selecting "run as -> junit test", each test is
called, but most of them end up with a
java.lang.NullPointerException (runs: 304, errors 242, failures
55).

Could someone help me to run all the test correctly?

Thanks, Bernhard Glatt

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

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

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


#6

I would like to implement a volume meter possibly using the javax.sound DataLine and getLevel but I'm not sure how to link these to the incoming RTP stream/ player. Does anyone have any ideas?

Thank you

Sergei

···

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


#7

Thanks Emil,
that's what I needed. Now everything runs well!

···

-----Ursprüngliche Nachricht-----
Von: Emil Ivov [mailto:emcho@sip-communicator.org]
Gesendet: So 11.11.2007 21:27
An: dev@sip-communicator.dev.java.net
Betreff: Re: AW: [sip-comm-dev] junit tests error

Hello Bernhard,

Glatt Bernhard (Student Com07) wrote:

Hi Emil,

thank you for your response. As you suggested I started with a new
checkout, the errors don't appear anymore.

Great! Glad to hear this.

To prepare the accounts.properties file correctly, I need real
accounts for each service implemented, right?

Right.

Is there a possibility
to launch the tests of only one service, for example msn?

Yes, have a look at the lib/testing.properties file, you can edit it and
remove the lines with the protocol SLICKs that you don't want to run.

My
intention is to test first my own new written tests to see if they
work, and in a second moment all the test-packages together.

Good idea. Besides tests for protocols like MSN, Yahoo! and ICQ often
fail for reasons that we have no idea of determining since we don't have
access to the corresponding servers.

I have a
little experience with junit, but launching the existing tests with
junit gives me most times a java.lang.NullPointerException. I assume
because the environment in that case is not prepared for testing.
Could you explain me the "right" way to test my code?

We do it with the ant "test" target in the build.xml. If you'd like to
run them differently (e.g., in an IDE) you would have to make sure that
you specify the complete classpath and all the system properties that
you see in the test target.

Thanks again for your help, Bernhard

Sure, you are most welcome!

Cheers
Emil

-----Ursprüngliche Nachricht----- Von: Emil Ivov
[mailto:emcho@sip-communicator.org] Gesendet: Fr 09.11.2007 09:45 An:
dev@sip-communicator.dev.java.net Betreff: Re: [sip-comm-dev] junit
tests error

Hello Bernhard,

One other thing you need to do before running the tests, is edit your
accounts.properties file in the sip-communicator/lib directory.
That's where you define the user names and the passwords for the
accounts that will be used for the testing. You can use the
sip-communicator/lib/accounts.properties.template file as a basis.

The exception that you have pasted in your mail, however, is not
related to what I just said. Have you been modifying your
felix.unit.test.properties file? Or maybe lib/testing.properties? In
either case I'd suggest you start over with a clean checkout (and
don't forget to create your own copy of the accounts.properties file)

Hope this helps Emil

Bernhard Glatt wrote:

Hi to all, I've found out in the meantime that the tests should be
run by ant, starting them from the build.xml. Now each test is
launched, but only those of the slicklesstests-package succeed. For
most of the other slick packages (callhistory, configuration,
fileaccess,...), the test report gives me an error like this for
each package:

No test with id=CallHistoryServiceLick

java.lang.IllegalArgumentException: No test with
id=CallHistoryServiceLick at
net.java.sip.communicator.slick.runner.SipCommunicatorSlickRunner$2.runTest(SipCommunicatorSlickRunner.java:237)
at junit.framework.TestCase.runBare(TestCase.java:127) at
junit.framework.TestResult$1.protect(TestResult.java:106) at
junit.framework.TestResult.runProtected(TestResult.java:124) at
junit.framework.TestResult.run(TestResult.java:109) at
junit.framework.TestCase.run(TestCase.java:118) at
junit.framework.TestSuite.runTest(TestSuite.java:208) at
junit.framework.TestSuite.run(TestSuite.java:203) at
net.java.sip.communicator.slick.runner.ScTestRunner.doRun(ScTestRunner.java:104)
at
net.java.sip.communicator.slick.runner.ScTestRunner.doRun(ScTestRunner.java:94)
at
net.java.sip.communicator.slick.runner.ScTestRunner.run(ScTestRunner.java:56)
at
net.java.sip.communicator.slick.runner.SipCommunicatorSlickRunner.start(SipCommunicatorSlickRunner.java:150)
at
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:509)
at org.apache.felix.framework.Felix._startBundle(Felix.java:1260)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1201) at
org.apache.felix.framework.Felix.setFrameworkStartLevel(Felix.java:807)
at
org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:256)
at java.lang.Thread.run(Unknown Source)

Has anyone suggestions for me how to go on?

Thanks, Bernhard Glatt

Bernhard Glatt schrieb:

Hi to all,

I've downloaded sip-communicator's source code, and I can run it
from source (in eclipse). I have a problem running the junit
tests. I've tried to launch some single test classes, some of
them work, some give errors. By right-clicking the whole test
package and selecting "run as -> junit test", each test is
called, but most of them end up with a
java.lang.NullPointerException (runs: 304, errors 242, failures
55).

Could someone help me to run all the test correctly?

Thanks, Bernhard Glatt

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

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

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


#8

Hello Sergei,

Actually, this has already been implemented in JMF. Have a look at
CallSessionImpl. Once a player is initialized you could retrieve its
control component. Among other things this component contains a volume
slider.

Alternately you could modify volue by obtaining a reference to the
GainControl of a player and then setting its level:

GainControl gc
  = (GainControl)player.getControl(GainControl.class.getName());
if (gc != null)
{
    logger.debug("Setting volume to max");
    gc.setLevel(1);
}

Hope this helps
Emil

···

FRANKOFF.S@forces.gc.ca wrote:

I would like to implement a volume meter possibly using the javax.sound DataLine and getLevel but I'm not sure how to link these to the incoming RTP stream/ player. Does anyone have any ideas?

Thank you

Sergei

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


#9

Emil,

thank you!

···

-----Original Message-----

From: Emil Ivov [mailto:emcho@sip-communicator.org]

Sent: Thursday, 15 November, 2007 06:39
To: dev@sip-communicator.dev.java.net
Subject: Re: [sip-comm-dev] volume meter

Hello Sergei,

Actually, this has already been implemented in JMF. Have a look at
CallSessionImpl. Once a player is initialized you could retrieve its
control component. Among other things this component contains a volume
slider.

Alternately you could modify volue by obtaining a reference to the
GainControl of a player and then setting its level:

GainControl gc
  = (GainControl)player.getControl(GainControl.class.getName());
if (gc != null)
{
    logger.debug("Setting volume to max");
    gc.setLevel(1);
}

Hope this helps
Emil

FRANKOFF.S@forces.gc.ca wrote:

I would like to implement a volume meter possibly using the javax.sound DataLine and getLevel but I'm not sure how to link these to the incoming RTP stream/ player. Does anyone have any ideas?

Thank you

Sergei

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

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