diff options
Diffstat (limited to 'media/java/android/media/MediaSync.java')
| -rw-r--r-- | media/java/android/media/MediaSync.java | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/media/java/android/media/MediaSync.java b/media/java/android/media/MediaSync.java index d9e554c..851471c 100644 --- a/media/java/android/media/MediaSync.java +++ b/media/java/android/media/MediaSync.java @@ -524,24 +524,23 @@ 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}). - * <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. - * - * @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. - */ + * Get current playback position. + * <p> + * The MediaTimestamp represents how the media time correlates to the system time in + * 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> + * 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() { |
