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

Unified Diff: media/gpu/avda_codec_allocator.h

Issue 2692863011: Add ContentVideoViewOverlay to AVDA. (Closed)
Patch Set: fixed avda unittest Created 3 years, 9 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
« no previous file with comments | « media/gpu/android_video_decode_accelerator.cc ('k') | media/gpu/avda_codec_allocator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/avda_codec_allocator.h
diff --git a/media/gpu/avda_codec_allocator.h b/media/gpu/avda_codec_allocator.h
index 197d015d76284e10198b72ad4ea4e33c2eb035c8..a180ae99f3f69aa8bc6c7884d700b3d6ece6203d 100644
--- a/media/gpu/avda_codec_allocator.h
+++ b/media/gpu/avda_codec_allocator.h
@@ -19,6 +19,7 @@
#include "base/threading/thread_checker.h"
#include "base/time/tick_clock.h"
#include "base/trace_event/trace_event.h"
+#include "media/base/android/android_overlay.h"
#include "media/base/android/media_codec_bridge_impl.h"
#include "media/base/android/media_drm_bridge_cdm_context.h"
#include "media/base/media.h"
@@ -80,7 +81,7 @@ class CodecConfig : public base::RefCountedThreadSafe<CodecConfig> {
DISALLOW_COPY_AND_ASSIGN(CodecConfig);
};
-class AVDACodecAllocatorClient {
+class AVDASurfaceAllocatorClient {
public:
// Called when the requested SurfaceView becomes available after a call to
// AllocateSurface()
@@ -92,6 +93,12 @@ class AVDACodecAllocatorClient {
// need to call DeallocateSurface();
virtual void OnSurfaceDestroyed() = 0;
+ protected:
+ ~AVDASurfaceAllocatorClient() {}
+};
+
+class AVDACodecAllocatorClient {
+ public:
// Called on the main thread when a new MediaCodec is configured.
// |media_codec| will be null if configuration failed.
virtual void OnCodecConfigured(
@@ -122,13 +129,13 @@ class MEDIA_GPU_EXPORT AVDACodecAllocator {
// Returns true if the caller now owns the surface, or false if someone else
// owns the surface. |client| will be notified when the surface is available
// via OnSurfaceAvailable().
- bool AllocateSurface(AVDACodecAllocatorClient* client, int surface_id);
+ bool AllocateSurface(AVDASurfaceAllocatorClient* client, int surface_id);
// Relinquish ownership of the surface or stop waiting for it to be available.
// The caller must guarantee that when calling this the surface is either no
// longer attached to a MediaCodec, or the MediaCodec it was attached to is
// was released with ReleaseMediaCodec().
- void DeallocateSurface(AVDACodecAllocatorClient* client, int surface_id);
+ void DeallocateSurface(AVDASurfaceAllocatorClient* client, int surface_id);
// Create and configure a MediaCodec synchronously.
std::unique_ptr<MediaCodecBridge> CreateMediaCodecSync(
@@ -190,8 +197,8 @@ class MEDIA_GPU_EXPORT AVDACodecAllocator {
friend class AVDACodecAllocatorTest;
struct OwnerRecord {
- AVDACodecAllocatorClient* owner = nullptr;
- AVDACodecAllocatorClient* waiter = nullptr;
+ AVDASurfaceAllocatorClient* owner = nullptr;
+ AVDASurfaceAllocatorClient* waiter = nullptr;
};
class HangDetector : public base::MessageLoop::TaskObserver {
« no previous file with comments | « media/gpu/android_video_decode_accelerator.cc ('k') | media/gpu/avda_codec_allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698