From e0112b51a1e966192feadedcf72f65cb63a214dc Mon Sep 17 00:00:00 2001 From: Lajos Molnar Date: Fri, 24 Apr 2015 14:40:52 -0700 Subject: MediaSync: rename onReturnAudioBuffer to onAudioBufferConsumed Bug: 19666434 Change-Id: I117d4a1ab29e5c8e02879d2321316b669c8e43ae --- api/current.txt | 2 +- api/system-current.txt | 2 +- media/java/android/media/MediaSync.java | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/api/current.txt b/api/current.txt index 2fec250..6884e3b 100644 --- a/api/current.txt +++ b/api/current.txt @@ -16407,7 +16407,7 @@ package android.media { public static abstract class MediaSync.Callback { ctor public MediaSync.Callback(); - method public abstract void onReturnAudioBuffer(android.media.MediaSync, java.nio.ByteBuffer, int); + method public abstract void onAudioBufferConsumed(android.media.MediaSync, java.nio.ByteBuffer, int); } public static abstract interface MediaSync.OnErrorListener { diff --git a/api/system-current.txt b/api/system-current.txt index f1156ad..137fb0a 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -17623,7 +17623,7 @@ package android.media { public static abstract class MediaSync.Callback { ctor public MediaSync.Callback(); - method public abstract void onReturnAudioBuffer(android.media.MediaSync, java.nio.ByteBuffer, int); + method public abstract void onAudioBufferConsumed(android.media.MediaSync, java.nio.ByteBuffer, int); } public static abstract interface MediaSync.OnErrorListener { diff --git a/media/java/android/media/MediaSync.java b/media/java/android/media/MediaSync.java index 55c65f6..dc6760d 100644 --- a/media/java/android/media/MediaSync.java +++ b/media/java/android/media/MediaSync.java @@ -49,7 +49,7 @@ import java.util.List; * sync.setAudioTrack(audioTrack); * sync.setCallback(new MediaSync.Callback() { * {@literal @Override} - * public void onReturnAudioBuffer(MediaSync sync, ByteBuffer audioBuffer, int bufferIndex) { + * public void onAudioBufferConsumed(MediaSync sync, ByteBuffer audioBuffer, int bufferIndex) { * ... * } * }, null); @@ -88,7 +88,7 @@ import java.util.List; * } * * // This is the callback from MediaSync. - * onReturnAudioBuffer(MediaSync sync, ByteBuffer buffer, int bufferIndex) { + * onAudioBufferConsumed(MediaSync sync, ByteBuffer buffer, int bufferIndex) { * // ... * audioDecoder.releaseBuffer(bufferIndex, false); * // ... @@ -104,7 +104,7 @@ import java.util.List; *

* For audio, the client needs to set up audio track correctly, e.g., using {@link * AudioTrack#MODE_STREAM}. The audio buffers are sent to MediaSync directly via {@link - * #queueAudio}, and are returned to the client via {@link Callback#onReturnAudioBuffer} + * #queueAudio}, and are returned to the client via {@link Callback#onAudioBufferConsumed} * asynchronously. The client should not modify an audio buffer till it's returned. *

* The client can optionally pre-fill audio/video buffers by setting playback rate to 0.0, @@ -125,7 +125,7 @@ final public class MediaSync { * @param audioBuffer The returned audio buffer. * @param bufferIndex The index associated with the audio buffer */ - public abstract void onReturnAudioBuffer( + public abstract void onAudioBufferConsumed( @NonNull MediaSync sync, @NonNull ByteBuffer audioBuffer, int bufferIndex); } @@ -682,7 +682,7 @@ final public class MediaSync { return; } if (mCallback != null) { - mCallback.onReturnAudioBuffer(sync, audioBuffer.mByteBuffer, + mCallback.onAudioBufferConsumed(sync, audioBuffer.mByteBuffer, audioBuffer.mBufferIndex); } } -- cgit v1.1