OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
watk
2017/02/17 22:40:36
no (c)
liberato (no reviews please)
2017/03/07 21:30:25
never copy old headers :)
| |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef MEDIA_GPU_CONTENT_VIDEO_VIEW_OVERLAY_H_ | |
6 #define MEDIA_GPU_CONTENT_VIDEO_VIEW_OVERLAY_H_ | |
7 | |
8 #include "base/memory/weak_ptr.h" | |
9 #include "media/base/android/android_overlay.h" | |
10 #include "media/gpu/avda_codec_allocator.h" | |
11 #include "ui/gl/android/scoped_java_surface.h" | |
12 | |
13 namespace media { | |
14 | |
15 // TODO(liberato): most of Allocate/DeallocateSurface can be moved here, out | |
16 // of AVDACodecAllocator. | |
17 class ContentVideoViewOverlay : public AndroidOverlay, | |
18 public AVDASurfaceAllocatorClient { | |
19 public: | |
20 // |config| is ignored except for callbacks. | |
21 ContentVideoViewOverlay(AVDACodecAllocator* codec_allocator, | |
22 int surface_id, | |
23 const AndroidOverlay::Config& config); | |
24 ~ContentVideoViewOverlay() override; | |
25 | |
26 // ContentVideoView ignores this, unfortunately. | |
27 void ScheduleLayout(const gfx::Rect& rect) override; | |
28 | |
29 // AVDASurfaceAllocatorClient | |
30 void OnSurfaceAvailable(bool success) override; | |
31 void OnSurfaceDestroyed() override; | |
32 | |
33 private: | |
34 AVDACodecAllocator* codec_allocator_; | |
35 int surface_id_; | |
36 AndroidOverlay::Config config_; | |
37 | |
38 base::WeakPtrFactory<ContentVideoViewOverlay> weak_factory_; | |
39 }; | |
40 | |
41 } // namespace media | |
42 | |
43 #endif // MEDIA_GPU_ANDROID_CONTENT_VIDEO_VIEW_OVERLAY_H_ | |
OLD | NEW |