aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator
diff options
context:
space:
mode:
authorLyubomir Marinov <lyubomir.marinov@jitsi.org>2010-06-16 07:16:32 +0000
committerLyubomir Marinov <lyubomir.marinov@jitsi.org>2010-06-16 07:16:32 +0000
commit1324d1e72d63823717c279acebdca45cdeeaf733 (patch)
treeb2015abecc858eea61db384bcedf66d087c33e57 /src/net/java/sip/communicator
parent5f3646989c06873c0abfa31bad13b0f3c593e163 (diff)
downloadjitsi-1324d1e72d63823717c279acebdca45cdeeaf733.zip
jitsi-1324d1e72d63823717c279acebdca45cdeeaf733.tar.gz
jitsi-1324d1e72d63823717c279acebdca45cdeeaf733.tar.bz2
Adds Javadocs.
Diffstat (limited to 'src/net/java/sip/communicator')
-rw-r--r--src/net/java/sip/communicator/impl/neomedia/GatherEntropy.java19
-rw-r--r--src/net/java/sip/communicator/impl/neomedia/jmfext/media/protocol/portaudio/DataSource.java32
-rw-r--r--src/net/java/sip/communicator/impl/neomedia/jmfext/media/protocol/portaudio/PortAudioStream.java10
3 files changed, 54 insertions, 7 deletions
diff --git a/src/net/java/sip/communicator/impl/neomedia/GatherEntropy.java b/src/net/java/sip/communicator/impl/neomedia/GatherEntropy.java
index 8ffa22b..e186983 100644
--- a/src/net/java/sip/communicator/impl/neomedia/GatherEntropy.java
+++ b/src/net/java/sip/communicator/impl/neomedia/GatherEntropy.java
@@ -29,6 +29,7 @@ import net.java.sip.communicator.impl.neomedia.portaudio.*;
* TODO: add JMF method to read audio (mic) data, check if we can use video?
*
* @author Werner Dittmann <Werner.Dittmann@t-online.de>
+ * @author Lubomir Marinov
*/
public class GatherEntropy
{
@@ -106,8 +107,15 @@ public class GatherEntropy
private class GatherPortAudio extends Thread
{
+ /**
+ * The PortAudio <tt>DataSource</tt> which provides
+ * {@link #portAudioStream}.
+ */
private DataSource dataSource = null;
+ /**
+ * The <tt>PortAudioStream</tt> from which audio data is captured.
+ */
private PortAudioStream portAudioStream = null;
/**
@@ -161,8 +169,8 @@ public class GatherEntropy
*
* The method gathers a number of samples and seeds the Fortuna PRNG.
*/
- public void run() {
-
+ public void run()
+ {
ZrtpFortuna fortuna = ZrtpFortuna.getInstance();
Buffer firstBuf = new Buffer();
@@ -182,12 +190,11 @@ public class GatherEntropy
// others on the first pools. This method is adapted to
// SC requirements to get random data
if (i < 32)
- {
fortuna.addSeedMaterial(entropy);
- }
- else
+ else
{
- fortuna.addSeedMaterial((i%3), entropy, 0, entropy.length);
+ fortuna
+ .addSeedMaterial((i%3), entropy, 0, entropy.length);
}
}
entropyOk = true;
diff --git a/src/net/java/sip/communicator/impl/neomedia/jmfext/media/protocol/portaudio/DataSource.java b/src/net/java/sip/communicator/impl/neomedia/jmfext/media/protocol/portaudio/DataSource.java
index f22a25f..a22a7e8 100644
--- a/src/net/java/sip/communicator/impl/neomedia/jmfext/media/protocol/portaudio/DataSource.java
+++ b/src/net/java/sip/communicator/impl/neomedia/jmfext/media/protocol/portaudio/DataSource.java
@@ -24,21 +24,53 @@ import net.java.sip.communicator.impl.neomedia.portaudio.*;
public class DataSource
extends AbstractPullBufferCaptureDevice
{
+
+ /**
+ * The indicator which determines whether this <tt>DataSource</tt> will
+ * use audio quality improvement in accord with the preferences of the user.
+ */
private final boolean audioQualityImprovement;
+ /**
+ * The list of <tt>Format</tt>s in which this <tt>DataSource</tt> is
+ * capable of capturing audio data.
+ */
private final Format[] supportedFormats;
+ /**
+ * Initializes a new <tt>DataSource</tt> instance.
+ */
public DataSource()
{
this.supportedFormats = null;
this.audioQualityImprovement = true;
}
+ /**
+ * Initializes a new <tt>DataSource</tt> instance from a specific
+ * <tt>MediaLocator</tt>.
+ *
+ * @param locator the <tt>MediaLocator</tt> to create the new instance from
+ */
public DataSource(MediaLocator locator)
{
this(locator, null, true);
}
+ /**
+ * Initializes a new <tt>DataSource</tt> instance from a specific
+ * <tt>MediaLocator</tt> and which has a specific list of <tt>Format</tt>
+ * in which it is capable of capturing audio data overriding its
+ * registration with JMF and optionally uses audio quality improvement in
+ * accord with the preferences of the user.
+ *
+ * @param locator the <tt>MediaLocator</tt> to create the new instance from
+ * @param supportedFormats the list of <tt>Format</tt>s in which the new
+ * instance is to be capable of capturing audio data
+ * @param audioQuality <tt>true</tt> if audio quality improvement is to be
+ * enabled in accord with the preferences of the user or <tt>false</tt> to
+ * completely disable audio quality improvement
+ */
public DataSource(
MediaLocator locator,
Format[] supportedFormats,
diff --git a/src/net/java/sip/communicator/impl/neomedia/jmfext/media/protocol/portaudio/PortAudioStream.java b/src/net/java/sip/communicator/impl/neomedia/jmfext/media/protocol/portaudio/PortAudioStream.java
index 641c079..381a034 100644
--- a/src/net/java/sip/communicator/impl/neomedia/jmfext/media/protocol/portaudio/PortAudioStream.java
+++ b/src/net/java/sip/communicator/impl/neomedia/jmfext/media/protocol/portaudio/PortAudioStream.java
@@ -24,6 +24,12 @@ import net.java.sip.communicator.impl.neomedia.portaudio.*;
public class PortAudioStream
extends AbstractPullBufferStream
{
+
+ /**
+ * The indicator which determines whether audio quality improvement is
+ * enabled for this <tt>PortAudioStream</tt> in accord with the preferences
+ * of the user.
+ */
private final boolean audioQualityImprovement;
/**
@@ -70,7 +76,9 @@ public class PortAudioStream
*
* @param formatControl the <tt>FormatControl</tt> which is to abstract the
* <tt>Format</tt>-related information of the new instance
- * @param audioQualityImprovement
+ * @param audioQualityImprovement <tt>true</tt> to enable audio quality
+ * improvement for the new instance in accord with the preferences of the
+ * user or <tt>false</tt> to completely disable audio quality improvement
*/
public PortAudioStream(
FormatControl formatControl,