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

Side by Side Diff: content/common/gpu/media/avda_state_provider.h

Issue 1750213002: Fix Android black frames from MSE config changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address the easy feedback, awaiting high level design sign off Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_STATE_PROVIDER _H_ 5 #ifndef CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_STATE_PROVIDER _H_
6 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_STATE_PROVIDER _H_ 6 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_STATE_PROVIDER _H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/threading/thread_checker.h" 9 #include "base/threading/thread_checker.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 #include "gpu/command_buffer/service/texture_manager.h"
11 #include "media/video/video_decode_accelerator.h" 12 #include "media/video/video_decode_accelerator.h"
12 13
13 namespace gfx { 14 namespace gfx {
14 class SurfaceTexture; 15 class SurfaceTexture;
15 } 16 }
16 17
17 namespace gpu { 18 namespace gpu {
18 namespace gles2 { 19 namespace gles2 {
19 class GLES2Decoder; 20 class GLES2Decoder;
20 } 21 }
21 } 22 }
22 23
23 namespace media { 24 namespace media {
24 class VideoCodecBridge; 25 class VideoCodecBridge;
25 } 26 }
26 27
27 namespace content { 28 namespace content {
28 29
29 // Helper class that provides the BackingStrategy with enough state 30 // Helper class that provides the BackingStrategy with enough state
30 // to do useful work. 31 // to do useful work.
31 class AVDAStateProvider { 32 class AVDAStateProvider {
32 public: 33 public:
33 virtual ~AVDAStateProvider() {} 34 virtual ~AVDAStateProvider() {}
34 35
35 // Various handy getters. 36 // Various handy getters.
36 virtual const gfx::Size& GetSize() const = 0; 37 virtual const gfx::Size& GetSize() const = 0;
37 virtual const base::ThreadChecker& ThreadChecker() const = 0; 38 virtual const base::ThreadChecker& ThreadChecker() const = 0;
38 virtual base::WeakPtr<gpu::gles2::GLES2Decoder> GetGlDecoder() const = 0; 39 virtual base::WeakPtr<gpu::gles2::GLES2Decoder> GetGlDecoder() const = 0;
40 virtual gpu::gles2::TextureRef* GetTextureForPicture(
41 const media::PictureBuffer& picture_buffer) = 0;
39 42
40 // Helper function to report an error condition and stop decoding. 43 // Helper function to report an error condition and stop decoding.
41 // This will post NotifyError(), and transition to the error state. 44 // This will post NotifyError(), and transition to the error state.
42 // It is meant to be called from the RETURN_ON_FAILURE macro. 45 // It is meant to be called from the RETURN_ON_FAILURE macro.
43 virtual void PostError(const ::tracked_objects::Location& from_here, 46 virtual void PostError(const ::tracked_objects::Location& from_here,
44 media::VideoDecodeAccelerator::Error error) = 0; 47 media::VideoDecodeAccelerator::Error error) = 0;
45 }; 48 };
46 49
47 } // namespace content 50 } // namespace content
48 51
49 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_STATE_PROVI DER_H_ 52 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_STATE_PROVI DER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698