Loading graphics/java/android/graphics/SurfaceTexture.java +4 −1 Original line number Diff line number Diff line Loading @@ -174,12 +174,15 @@ public class SurfaceTexture { * Retrieve the timestamp associated with the texture image set by the most recent call to * updateTexImage. * * This timestamp is in nanoseconds, and is guaranteed to be monotonically increasing. The * This timestamp is in nanoseconds, and is normally monotonically increasing. The timestamp * should be unaffected by time-of-day adjustments, and for a camera should be strictly * monotonic but for a MediaPlayer may be reset when the position is set. The * specific meaning and zero point of the timestamp depends on the source providing images to * the SurfaceTexture. Unless otherwise specified by the image source, timestamps cannot * generally be compared across SurfaceTexture instances, or across multiple program * invocations. It is mostly useful for determining time offsets between subsequent frames. */ public long getTimestamp() { return nativeGetTimestamp(); } Loading media/java/android/media/MediaPlayer.java +4 −7 Original line number Diff line number Diff line Loading @@ -611,15 +611,11 @@ public class MediaPlayer * needed. Not calling this method when playing back a video will * result in only the audio track being played. * * @param sh the SurfaceHolder to use for video display */ /* * This portion of comment has a non-Javadoc prefix so as not to refer to a * hidden method. When unhidden, merge it with the previous javadoc comment. * * Either a surface or surface texture must be set if a display or video sink * is needed. Not calling this method or {@link #setTexture(SurfaceTexture)} * when playing back a video will result in only the audio track being played. * * @param sh the SurfaceHolder to use for video display */ public void setDisplay(SurfaceHolder sh) { mSurfaceHolder = sh; Loading Loading @@ -648,7 +644,8 @@ public class MediaPlayer * SurfaceTexture set as the video sink have an unspecified zero point, * and cannot be directly compared between different media sources or different * instances of the same media source, or across multiple runs of the same * program. * program. The timestamp is normally monotonically increasing and unaffected * by time-of-day adjustments, but is reset when the position is set. */ public void setTexture(SurfaceTexture st) { ParcelSurfaceTexture pst = null; Loading media/libstagefright/AwesomePlayer.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,9 @@ struct AwesomeNativeWindowRenderer : public AwesomeRenderer { } virtual void render(MediaBuffer *buffer) { int64_t timeUs; CHECK(buffer->meta_data()->findInt64(kKeyTime, &timeUs)); native_window_set_buffers_timestamp(mNativeWindow.get(), timeUs * 1000); status_t err = mNativeWindow->queueBuffer( mNativeWindow.get(), buffer->graphicBuffer().get()); if (err != 0) { Loading Loading
graphics/java/android/graphics/SurfaceTexture.java +4 −1 Original line number Diff line number Diff line Loading @@ -174,12 +174,15 @@ public class SurfaceTexture { * Retrieve the timestamp associated with the texture image set by the most recent call to * updateTexImage. * * This timestamp is in nanoseconds, and is guaranteed to be monotonically increasing. The * This timestamp is in nanoseconds, and is normally monotonically increasing. The timestamp * should be unaffected by time-of-day adjustments, and for a camera should be strictly * monotonic but for a MediaPlayer may be reset when the position is set. The * specific meaning and zero point of the timestamp depends on the source providing images to * the SurfaceTexture. Unless otherwise specified by the image source, timestamps cannot * generally be compared across SurfaceTexture instances, or across multiple program * invocations. It is mostly useful for determining time offsets between subsequent frames. */ public long getTimestamp() { return nativeGetTimestamp(); } Loading
media/java/android/media/MediaPlayer.java +4 −7 Original line number Diff line number Diff line Loading @@ -611,15 +611,11 @@ public class MediaPlayer * needed. Not calling this method when playing back a video will * result in only the audio track being played. * * @param sh the SurfaceHolder to use for video display */ /* * This portion of comment has a non-Javadoc prefix so as not to refer to a * hidden method. When unhidden, merge it with the previous javadoc comment. * * Either a surface or surface texture must be set if a display or video sink * is needed. Not calling this method or {@link #setTexture(SurfaceTexture)} * when playing back a video will result in only the audio track being played. * * @param sh the SurfaceHolder to use for video display */ public void setDisplay(SurfaceHolder sh) { mSurfaceHolder = sh; Loading Loading @@ -648,7 +644,8 @@ public class MediaPlayer * SurfaceTexture set as the video sink have an unspecified zero point, * and cannot be directly compared between different media sources or different * instances of the same media source, or across multiple runs of the same * program. * program. The timestamp is normally monotonically increasing and unaffected * by time-of-day adjustments, but is reset when the position is set. */ public void setTexture(SurfaceTexture st) { ParcelSurfaceTexture pst = null; Loading
media/libstagefright/AwesomePlayer.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,9 @@ struct AwesomeNativeWindowRenderer : public AwesomeRenderer { } virtual void render(MediaBuffer *buffer) { int64_t timeUs; CHECK(buffer->meta_data()->findInt64(kKeyTime, &timeUs)); native_window_set_buffers_timestamp(mNativeWindow.get(), timeUs * 1000); status_t err = mNativeWindow->queueBuffer( mNativeWindow.get(), buffer->graphicBuffer().get()); if (err != 0) { Loading