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

Unified Diff: media/gpu/android_video_decode_accelerator.h

Issue 2011653002: Close bitstream buffer shared memory handles on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/gpu/android_video_decode_accelerator.h
diff --git a/media/gpu/android_video_decode_accelerator.h b/media/gpu/android_video_decode_accelerator.h
index a9069f9b7da656c09650f9e19973695ce97f80c1..569e511cf73c2329a18af5dd2d40bf4f29d3ea4b 100644
--- a/media/gpu/android_video_decode_accelerator.h
+++ b/media/gpu/android_video_decode_accelerator.h
@@ -176,6 +176,12 @@ class MEDIA_GPU_EXPORT AndroidVideoDecodeAccelerator
DRAIN_FOR_DESTROY,
};
+ // Notification options for ClearPendingBitstreamBuffers()
+ enum BitstreamBufferNotificationType {
+ DONT_NOTIFY_CLIENT = 0,
+ NOTIFY_CLIENT = 1
+ };
+
// Configuration info for MediaCodec.
// This is used to shuttle configuration info between threads without needing
// to worry about the lifetime of the AVDA instance. All of these should not
@@ -341,6 +347,11 @@ class MEDIA_GPU_EXPORT AndroidVideoDecodeAccelerator
// this.
void OnDestroyingSurface(int surface_id);
+ // Clear any pending bitstream buffers. This will close any shared memory
+ // handles, and, if |notify| is NOTIFY_CLIENT, notify the client that we're
+ // done with the buffer.
+ void ClearPendingBitstreamBuffers(BitstreamBufferNotificationType notify);
+
// Return true if and only if we should use deferred rendering.
static bool UseDeferredRenderingStrategy(
const gpu::GpuPreferences& gpu_preferences);
« no previous file with comments | « no previous file | media/gpu/android_video_decode_accelerator.cc » ('j') | media/gpu/android_video_decode_accelerator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698