From 11c51dd53de97b0ad35cf0888c7d740c16463ae2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sami=20Kalliom=C3=A4ki?= Date: Wed, 7 Feb 2018 12:50:47 +0100 Subject: [PATCH] Update documentation for VideoEncoder.Callback#onEncodedImage. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allows assuming that the buffer is not accessed after the call returns. Bug: b/72675429 No-Try: True Change-Id: Iff4a05433c6eed6aefec49ce67486966b1ed882f Reviewed-on: https://webrtc-review.googlesource.com/49161 Reviewed-by: Magnus Jedvert Commit-Queue: Sami Kalliomäki Cr-Commit-Position: refs/heads/master@{#21940} --- sdk/android/api/org/webrtc/VideoEncoder.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sdk/android/api/org/webrtc/VideoEncoder.java b/sdk/android/api/org/webrtc/VideoEncoder.java index 4f97fb0c0d..01c249fa6b 100644 --- a/sdk/android/api/org/webrtc/VideoEncoder.java +++ b/sdk/android/api/org/webrtc/VideoEncoder.java @@ -122,7 +122,10 @@ public interface VideoEncoder { } public interface Callback { - /** Call to return an encoded frame. */ + /** + * Call to return an encoded frame. It is safe to assume the byte buffer held by |frame| is not + * accessed after the call to this method returns. + */ void onEncodedFrame(EncodedImage frame, CodecSpecificInfo info); }