From 7bfec39c21e7b45ce1bbd65bbd0888b7ac769cef Mon Sep 17 00:00:00 2001 From: Lyubomir Marinov Date: Wed, 23 Sep 2009 17:17:13 +0000 Subject: [PATCH] In neomedia: - Uses double for clockRate for both AudioMediaFormat and VideoMediaFormat as it's done in MediaFormatFactory. - Fixes a few javadocs. --- .../service/neomedia/MediaDirection.java | 5 ++--- .../service/neomedia/MediaService.java | 11 ++++++----- .../service/neomedia/MediaType.java | 4 ++-- .../service/neomedia/format/MediaFormat.java | 17 ++++++++--------- .../neomedia/format/MediaFormatFactory.java | 10 +++++----- 5 files changed, 23 insertions(+), 24 deletions(-) diff --git a/src/net/java/sip/communicator/service/neomedia/MediaDirection.java b/src/net/java/sip/communicator/service/neomedia/MediaDirection.java index 958b84e35..439e9b2f0 100644 --- a/src/net/java/sip/communicator/service/neomedia/MediaDirection.java +++ b/src/net/java/sip/communicator/service/neomedia/MediaDirection.java @@ -79,9 +79,8 @@ public String toString() * @return a MediaDirection value corresponding to the specified * mediaDirectionName. * - * @throws a java.lang.IllegalArgumentException in case - * mediaDirectionName is not a valid or currently supported media - * direction. + * @throws IllegalArgumentException in case mediaDirectionName is + * not a valid or currently supported media direction. */ public static MediaDirection parseString(String mediaDirectionName) throws IllegalArgumentException diff --git a/src/net/java/sip/communicator/service/neomedia/MediaService.java b/src/net/java/sip/communicator/service/neomedia/MediaService.java index 6853f6db5..83135df64 100644 --- a/src/net/java/sip/communicator/service/neomedia/MediaService.java +++ b/src/net/java/sip/communicator/service/neomedia/MediaService.java @@ -23,13 +23,13 @@ public interface MediaService * Returns the default MediaDevice for the specified media * type. In most cases users * - * @param type a MediaType instance indicating the kind of device + * @param mediaType a MediaType value indicating the kind of device * that we are trying to obtain. * * @return the currently default MediaDevice for the specified * MediaType, or null if no such device exists. */ - public MediaDevice getDefaultDevice(MediaType type); + public MediaDevice getDefaultDevice(MediaType mediaType); /** * Returns a list containing all devices known to this service @@ -48,9 +48,10 @@ public interface MediaService * MediaDevice for both capture and playback of media exchanged * via the specified MediaConnector. * - * @param connector the connector that the stream should use for sending and receiving - * media. - * @param device + * @param connector the connector that the stream should use for sending and + * receiving media. + * @param device the device to be used for both capture and playback of + * media changed via the specified MediaConnector * * @return the newly created MediaStream. */ diff --git a/src/net/java/sip/communicator/service/neomedia/MediaType.java b/src/net/java/sip/communicator/service/neomedia/MediaType.java index 424b39d55..5737392f3 100644 --- a/src/net/java/sip/communicator/service/neomedia/MediaType.java +++ b/src/net/java/sip/communicator/service/neomedia/MediaType.java @@ -61,8 +61,8 @@ public String toString() * @return a MediaType value corresponding to the specified * mediaTypeName. * - * @throws a java.lang.IllegalArgumentException in case - * mediaTypeName is not a valid or currently supported media type. + * @throws IllegalArgumentException in case mediaTypeName is not a + * valid or currently supported media type. */ public static MediaType parseString(String mediaTypeName) throws IllegalArgumentException diff --git a/src/net/java/sip/communicator/service/neomedia/format/MediaFormat.java b/src/net/java/sip/communicator/service/neomedia/format/MediaFormat.java index af6bd4664..e394f6e72 100644 --- a/src/net/java/sip/communicator/service/neomedia/format/MediaFormat.java +++ b/src/net/java/sip/communicator/service/neomedia/format/MediaFormat.java @@ -42,9 +42,9 @@ public interface MediaFormat /** * Returns the clock rate associated with this MediaFormat. * - * @return The clock rate associated with this format.. + * @return The clock rate associated with this format. */ - public float getClockRate(); + public double getClockRate(); /** * Determines whether this MediaFormat is equal to @@ -59,14 +59,13 @@ public interface MediaFormat public boolean equals(Object mediaFormat); /** - * Returns a Map containing parameters specific to this - * particular MediaFormat. The parameters returned here are meant - * for use in SIP/SDP or XMPP session descriptions where they get - * transported through the "fmtp:" attribute or tag - * respectively. + * Returns a Map containing parameters specific to this particular + * MediaFormat. The parameters returned here are meant for use in + * SIP/SDP or XMPP session descriptions where they get transported through + * the "fmtp:" attribute or tag respectively. * - * @return Returns a Map containing parameters specific to this - * particular MediaFormat. + * @return a Map containing parameters specific to this particular + * MediaFormat. */ public Map getFormatParameters(); diff --git a/src/net/java/sip/communicator/service/neomedia/format/MediaFormatFactory.java b/src/net/java/sip/communicator/service/neomedia/format/MediaFormatFactory.java index edefb62d1..320ccb2db 100644 --- a/src/net/java/sip/communicator/service/neomedia/format/MediaFormatFactory.java +++ b/src/net/java/sip/communicator/service/neomedia/format/MediaFormatFactory.java @@ -46,8 +46,8 @@ public AudioMediaFormat createAudioMediaFormat( * * @param encoding the encoding of the format to create. * @param clockRate the rate in Hz of the audio format - * @param channels the number of availabe channels (1 for mono, - * 2 for stereo) + * @param channels the number of available channels (1 for mono, 2 for + * stereo) * * @return a newly created AudioMediaFormat with the specified * parameters. @@ -62,8 +62,8 @@ public AudioMediaFormat createAudioMediaFormat( * * @param encoding the encoding of the format to create. * @param clockRate the rate in Hz of the audio format - * @param formatParams any codec specific params that have being received - * via SIP/SDP or XMPP/Jingle. + * @param formatParams any codec specific params that have been received via + * SIP/SDP or XMPP/Jingle. * * @return a newly created AudioMediaFormat with the specified * parameters. @@ -106,7 +106,7 @@ public AudioMediaFormat createAudioMediaFormat( * and frameRate. * * @param encoding the encoding of the format to create. - * @param clockRate the the frame rate + * @param clockRate the clock (i.e. frame) rate * @return a newly created AudioMediaFormat with the specified * parameters. */