Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1019)

Unified Diff: media/capture/video/video_frame_receiver.h

Issue 2607203002: [Mojo Video Capture] Retire buffers when Android Chromium goes to the background (Closed)
Patch Set: Added tests and fixed a bug uncovered by the tests. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/capture/video/video_frame_receiver.h
diff --git a/media/capture/video/video_frame_receiver.h b/media/capture/video/video_frame_receiver.h
index 55d98aa564ae49ca38a8761a9b788bd63810e621..0e269bc8dcee8ce1edcd75aa38dac4841a5f1fbc 100644
--- a/media/capture/video/video_frame_receiver.h
+++ b/media/capture/video/video_frame_receiver.h
@@ -21,7 +21,16 @@ class CAPTURE_EXPORT VideoFrameReceiver {
scoped_refptr<media::VideoFrame> frame) = 0;
virtual void OnError() = 0;
virtual void OnLog(const std::string& message) = 0;
- virtual void OnBufferDestroyed(int buffer_id_to_drop) = 0;
+
+ // Tells the VideoFrameReceiver that the producer is no longer going to use
+ // the buffer with id |buffer_id| for frame delivery. This may be called even
+ // while the receiver is still consuming the buffer from a call to
+ // OnIncomingCapturedVideoFrame(). In that case, it means that the
+ // caller is asking the VideoFrameReceiver to release the buffer
+ // at its earliest convenience.
miu 2017/01/31 01:18:51 nit: Does "at its earliest convenience" really mea
chfremer 2017/01/31 18:54:28 In case of the concrete implementation VideoCaptur
+ // The producer guarantees that it does not reuse a retired |buffer_id| before
+ // having cycled through all other possible values.
+ virtual void OnBufferRetired(int buffer_id) = 0;
};
} // namespace media

Powered by Google App Engine
This is Rietveld 408576698