Loading api/current.txt +3 −3 Original line number Diff line number Diff line Loading @@ -16459,9 +16459,9 @@ package android.media { } public final class MediaTimestamp { field public final float clockRate; field public final long mediaTimeUs; field public final long nanoTime; method public long getAnchorMediaTimeUs(); method public long getAnchorSytemNanoTime(); method public float getMediaClockRate(); } public final class NotProvisionedException extends android.media.MediaDrmException { api/system-current.txt +3 −3 Original line number Diff line number Diff line Loading @@ -17699,9 +17699,9 @@ package android.media { } public final class MediaTimestamp { field public final float clockRate; field public final long mediaTimeUs; field public final long nanoTime; method public long getAnchorMediaTimeUs(); method public long getAnchorSytemNanoTime(); method public float getMediaClockRate(); } public final class NotProvisionedException extends android.media.MediaDrmException { media/java/android/media/MediaPlayer.java +10 −11 Original line number Diff line number Diff line Loading @@ -1481,23 +1481,22 @@ public class MediaPlayer implements SubtitleController.Listener public native void seekTo(int msec) throws IllegalStateException; /** * Get current playback position. * Get current playback position as a {@link MediaTimestamp}. * <p> * The MediaTimestamp represents how the media time correlates to the system time in * a linear fashion. It contains the media time and system timestamp of an anchor frame * ({@link MediaTimestamp#mediaTimeUs} and {@link MediaTimestamp#nanoTime}) * and the speed of the media clock ({@link MediaTimestamp#clockRate}). * a linear fashion using an anchor and a clock rate. During regular playback, the media * time moves fairly constantly (though the anchor frame may be rebased to a current * system time, the linear correlation stays steady). Therefore, this method does not * need to be called often. * <p> * During regular playback, the media time moves fairly constantly (though the * anchor frame may be rebased to a current system time, the linear correlation stays * steady). Therefore, this method does not need to be called often. * <p> * To help users to get current playback position, this method always returns the timestamp of * just-rendered frame, i.e., {@link System#nanoTime} and its corresponding media time. They * can be used as current playback position. * To help users get current playback position, this method always anchors the timestamp * to the current {@link System#nanoTime system time}, so * {@link MediaTimestamp#getAnchorMediaTimeUs} can be used as current playback position. * * @return a MediaTimestamp object if a timestamp is available, or {@code null} if no timestamp * is available, e.g. because the media player has not been initialized. * * @see MediaTimestamp */ @Nullable public MediaTimestamp getTimestamp() Loading media/java/android/media/MediaSync.java +17 −18 Original line number Diff line number Diff line Loading @@ -527,20 +527,19 @@ public final class MediaSync { * Get current playback position. * <p> * The MediaTimestamp represents how the media time correlates to the system time in * a linear fashion. It contains the media time and system timestamp of an anchor frame * ({@link MediaTimestamp#mediaTimeUs} and {@link MediaTimestamp#nanoTime}) * and the speed of the media clock ({@link MediaTimestamp#clockRate}). * a linear fashion using an anchor and a clock rate. During regular playback, the media * time moves fairly constantly (though the anchor frame may be rebased to a current * system time, the linear correlation stays steady). Therefore, this method does not * need to be called often. * <p> * During regular playback, the media time moves fairly constantly (though the * anchor frame may be rebased to a current system time, the linear correlation stays * steady). Therefore, this method does not need to be called often. * <p> * To help users to get current playback position, this method always returns the timestamp of * just-rendered frame, i.e., {@link System#nanoTime} and its corresponding media time. They * can be used as current playback position. * To help users get current playback position, this method always anchors the timestamp * to the current {@link System#nanoTime system time}, so * {@link MediaTimestamp#getAnchorMediaTimeUs} can be used as current playback position. * * @return a MediaTimestamp object if a timestamp is available, or {@code null} if no timestamp * is available, e.g. because the media sync has not been initialized. * is available, e.g. because the media player has not been initialized. * * @see MediaTimestamp */ @Nullable public MediaTimestamp getTimestamp() Loading media/java/android/media/MediaTimestamp.java +19 −5 Original line number Diff line number Diff line Loading @@ -37,22 +37,36 @@ package android.media; public final class MediaTimestamp { /** * Media time in microseconds. * Get the media time of the anchor in microseconds. */ public final long mediaTimeUs; public long getAnchorMediaTimeUs() { return mediaTimeUs; } /** * The {@link java.lang.System#nanoTime system time} corresponding to the media time * Get the {@link java.lang.System#nanoTime system time} corresponding to the media time * in nanoseconds. */ public final long nanoTime; public long getAnchorSytemNanoTime() { return nanoTime; } /** * The rate of the media clock in relation to the system time. * Get the rate of the media clock in relation to the system time. * <p> * It is 1.0 if media clock advances in sync with the system clock; * greater than 1.0 if media clock is faster than the system clock; * less than 1.0 if media clock is slower than the system clock. */ public float getMediaClockRate() { return clockRate; } /** @hide - accessor shorthand */ public final long mediaTimeUs; /** @hide - accessor shorthand */ public final long nanoTime; /** @hide - accessor shorthand */ public final float clockRate; /** @hide */ Loading Loading
api/current.txt +3 −3 Original line number Diff line number Diff line Loading @@ -16459,9 +16459,9 @@ package android.media { } public final class MediaTimestamp { field public final float clockRate; field public final long mediaTimeUs; field public final long nanoTime; method public long getAnchorMediaTimeUs(); method public long getAnchorSytemNanoTime(); method public float getMediaClockRate(); } public final class NotProvisionedException extends android.media.MediaDrmException {
api/system-current.txt +3 −3 Original line number Diff line number Diff line Loading @@ -17699,9 +17699,9 @@ package android.media { } public final class MediaTimestamp { field public final float clockRate; field public final long mediaTimeUs; field public final long nanoTime; method public long getAnchorMediaTimeUs(); method public long getAnchorSytemNanoTime(); method public float getMediaClockRate(); } public final class NotProvisionedException extends android.media.MediaDrmException {
media/java/android/media/MediaPlayer.java +10 −11 Original line number Diff line number Diff line Loading @@ -1481,23 +1481,22 @@ public class MediaPlayer implements SubtitleController.Listener public native void seekTo(int msec) throws IllegalStateException; /** * Get current playback position. * Get current playback position as a {@link MediaTimestamp}. * <p> * The MediaTimestamp represents how the media time correlates to the system time in * a linear fashion. It contains the media time and system timestamp of an anchor frame * ({@link MediaTimestamp#mediaTimeUs} and {@link MediaTimestamp#nanoTime}) * and the speed of the media clock ({@link MediaTimestamp#clockRate}). * a linear fashion using an anchor and a clock rate. During regular playback, the media * time moves fairly constantly (though the anchor frame may be rebased to a current * system time, the linear correlation stays steady). Therefore, this method does not * need to be called often. * <p> * During regular playback, the media time moves fairly constantly (though the * anchor frame may be rebased to a current system time, the linear correlation stays * steady). Therefore, this method does not need to be called often. * <p> * To help users to get current playback position, this method always returns the timestamp of * just-rendered frame, i.e., {@link System#nanoTime} and its corresponding media time. They * can be used as current playback position. * To help users get current playback position, this method always anchors the timestamp * to the current {@link System#nanoTime system time}, so * {@link MediaTimestamp#getAnchorMediaTimeUs} can be used as current playback position. * * @return a MediaTimestamp object if a timestamp is available, or {@code null} if no timestamp * is available, e.g. because the media player has not been initialized. * * @see MediaTimestamp */ @Nullable public MediaTimestamp getTimestamp() Loading
media/java/android/media/MediaSync.java +17 −18 Original line number Diff line number Diff line Loading @@ -527,20 +527,19 @@ public final class MediaSync { * Get current playback position. * <p> * The MediaTimestamp represents how the media time correlates to the system time in * a linear fashion. It contains the media time and system timestamp of an anchor frame * ({@link MediaTimestamp#mediaTimeUs} and {@link MediaTimestamp#nanoTime}) * and the speed of the media clock ({@link MediaTimestamp#clockRate}). * a linear fashion using an anchor and a clock rate. During regular playback, the media * time moves fairly constantly (though the anchor frame may be rebased to a current * system time, the linear correlation stays steady). Therefore, this method does not * need to be called often. * <p> * During regular playback, the media time moves fairly constantly (though the * anchor frame may be rebased to a current system time, the linear correlation stays * steady). Therefore, this method does not need to be called often. * <p> * To help users to get current playback position, this method always returns the timestamp of * just-rendered frame, i.e., {@link System#nanoTime} and its corresponding media time. They * can be used as current playback position. * To help users get current playback position, this method always anchors the timestamp * to the current {@link System#nanoTime system time}, so * {@link MediaTimestamp#getAnchorMediaTimeUs} can be used as current playback position. * * @return a MediaTimestamp object if a timestamp is available, or {@code null} if no timestamp * is available, e.g. because the media sync has not been initialized. * is available, e.g. because the media player has not been initialized. * * @see MediaTimestamp */ @Nullable public MediaTimestamp getTimestamp() Loading
media/java/android/media/MediaTimestamp.java +19 −5 Original line number Diff line number Diff line Loading @@ -37,22 +37,36 @@ package android.media; public final class MediaTimestamp { /** * Media time in microseconds. * Get the media time of the anchor in microseconds. */ public final long mediaTimeUs; public long getAnchorMediaTimeUs() { return mediaTimeUs; } /** * The {@link java.lang.System#nanoTime system time} corresponding to the media time * Get the {@link java.lang.System#nanoTime system time} corresponding to the media time * in nanoseconds. */ public final long nanoTime; public long getAnchorSytemNanoTime() { return nanoTime; } /** * The rate of the media clock in relation to the system time. * Get the rate of the media clock in relation to the system time. * <p> * It is 1.0 if media clock advances in sync with the system clock; * greater than 1.0 if media clock is faster than the system clock; * less than 1.0 if media clock is slower than the system clock. */ public float getMediaClockRate() { return clockRate; } /** @hide - accessor shorthand */ public final long mediaTimeUs; /** @hide - accessor shorthand */ public final long nanoTime; /** @hide - accessor shorthand */ public final float clockRate; /** @hide */ Loading