diff options
author | 2017-03-02 23:03:58 +0000 | |
---|---|---|
committer | 2017-03-02 23:04:03 +0000 | |
commit | 72a489c035dd536cd13c0a87fc74e9b45da43cae (patch) | |
tree | ab30477cb2ab89cc8156a898864de9a1f0060237 | |
parent | e1c54d53f1fcb04337e6fc5654e24fddb52edc02 (diff) | |
parent | f0f6685eeb2093f52b8024b8e4643719e798636a (diff) |
Merge "Javadoc for the recently added getMetrics()"
-rw-r--r-- | media/java/android/media/MediaCodec.java | 48 | ||||
-rw-r--r-- | media/java/android/media/MediaExtractor.java | 27 | ||||
-rw-r--r-- | media/java/android/media/MediaPlayer.java | 58 |
3 files changed, 132 insertions, 1 deletions
diff --git a/media/java/android/media/MediaCodec.java b/media/java/android/media/MediaCodec.java index 1ca96583112e..d26412789f39 100644 --- a/media/java/android/media/MediaCodec.java +++ b/media/java/android/media/MediaCodec.java @@ -3188,9 +3188,55 @@ final public class MediaCodec { /** * Returns Analytics/Metrics data about the current content being * - * @return a Bundle containint the set of attributes and values available + * @return a Bundle containing the set of attributes and values available * for the media being handled by this instance of MediaCodec * + * <table style="width: 0%"> + * <thead> + * <tr> + * <th>Key</th> + * <th>Type</th> + * <th>Description</th> + * </tr> + * </thead> + * <tbody> + * <tr> + * <td>{@code "codec"}</td> + * <td>String</td> + * <td>Identifies the particular codec in use</td> + * </tr><tr> + * <td>{@code "mime"}</td> + * <td>String</td> + * <td>Mime type of the media being encoded/decoded</td> + * </tr><tr> + * <td>{@code "mode"}</td> + * <td>String</td> + * <td>"Audio" or "Video"</td> + * </tr><tr> + * <td>{@code "secure"}</td> + * <td>Integer</td> + * <td>Indicates whether the code is operating on secure content and + * may also use capabilities in android.media.MediaCrypto</td> + * </tr><tr> + * <td>{@code "height"}</td> + * <td>Integer</td> + * <td>Height (pixels); valid only when mode=video</td> + * </tr><tr> + * <td>{@code "width"}</td> + * <td>Integer</td> + * <td>Width (pixels); valid only when mode=video</td> + * </tr><tr> + * <td>{@code "rotation"}</td> + * <td>Integer</td> + * <td>rotation (degrees) to orient the video onto the target surface; + * valid only when mode=video. Note there may be additional + * rotations applied when the surface is mapped to the screen.</td> + * </tr> + * </tbody> + * </table> + * + * Additional fields specific to individual codecs will also appear in + * the return value. */ public native Bundle getMetrics(); diff --git a/media/java/android/media/MediaExtractor.java b/media/java/android/media/MediaExtractor.java index 01ae36ffccfe..b9e409d17748 100644 --- a/media/java/android/media/MediaExtractor.java +++ b/media/java/android/media/MediaExtractor.java @@ -656,6 +656,33 @@ final public class MediaExtractor { * @return the set of keys and values available for the media being * handled by this instance of MediaExtractor * + * <table style="width: 0%"> + * <thead> + * <tr> + * <th>Key</th> + * <th>Type</th> + * <th>Description</th> + * </tr> + * </thead> + * <tbody> + * <tr> + * <td>{@code "fmt"}</td> + * <td>String</td> + * <td>The container format (which determines the handler)</td> + * </tr><tr> + * <td>{@code "mime"}</td> + * <td>String</td> + * <td>Mime type of the container.</td> + * </tr><tr> + * <td>{@code "ntrk"}</td> + * <td>Integer</td> + * <td>Number of tracks in the container</td> + * </tr> + * </tbody> + * </table> + * + * Additional fields specific to individual codecs will also appear in + * the return value. */ public native Bundle getMetrics(); diff --git a/media/java/android/media/MediaPlayer.java b/media/java/android/media/MediaPlayer.java index fb37f9f62d14..b85c91119384 100644 --- a/media/java/android/media/MediaPlayer.java +++ b/media/java/android/media/MediaPlayer.java @@ -1498,6 +1498,64 @@ public class MediaPlayer extends PlayerBase * * @return the a map of attributes and values available for this video * player or null if no metrics are available. + * + * <table style="width: 0%"> + * <thead> + * <tr> + * <th>Key</th> + * <th>Type</th> + * <th>Description</th> + * </tr> + * </thead> + * <tbody> + * <tr> + * <td>{@code "video/codec"}</td> + * <td>String</td> + * <td>Identifies the video codec in use</td> + * </tr><tr> + * <td>{@code "video/mime"}</td> + * <td>String</td> + * <td>Mime type of the video being encoded/decoded</td> + * </tr><tr> + * <td>{@code "audio/codec"}</td> + * <td>String</td> + * <td>Identifies the audio codec in use</td> + * </tr><tr> + * <td>{@code "audio/mime"}</td> + * <td>String</td> + * <td>Mime type of the audio being encoded/decoded</td> + * </tr><tr> + * <td>{@code "ht"}</td> + * <td>Integer</td> + * <td>Height (pixels); valid only when mode=video</td> + * </tr><tr> + * <td>{@code "wid"}</td> + * <td>Integer</td> + * <td>Width (pixels); valid only when mode=video</td> + * </tr><tr> + * <td>{@code "frame"}</td> + * <td>Integer</td> + * <td>Number of decoded video frames sent to the display</td> + * </tr><tr> + * <td>{@code "dropped"}</td> + * <td>Integer</td> + * <td>Number of decoded video frames that were not sent to display. + * These frames were dropped by the player.</td> + * </tr><tr> + * <td>{@code "durationMs"}</td> + * <td>Integer</td> + * <td>The length of the media being played (in ms), e.g. "This video lasts for 30000 milliseconds". </td> + * </tr><tr> + * <td>{@code "playingMs"}</td> + * <td>Integer</td> + * <td>The time the media has been played (in ms). If you watch a + * 30 second twice through, this will report 60000 ms.</td> + * </tr> + * </tbody> + * </table> + * + * Additional fields specific to individual codecs will also appear in + * the return value. */ public native Bundle getMetrics(); |