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

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

Issue 2487813002: Remove delayed error posting from AndroidVideoDecodeAccelerator (Closed)
Patch Set: Rebase Created 4 years, 1 month 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
« no previous file with comments | « media/gpu/avda_picture_buffer_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 MEDIA_GPU_AVDA_STATE_PROVIDER_H_ 5 #ifndef MEDIA_GPU_AVDA_STATE_PROVIDER_H_
6 #define MEDIA_GPU_AVDA_STATE_PROVIDER_H_ 6 #define MEDIA_GPU_AVDA_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 "gpu/command_buffer/service/texture_manager.h" 10 #include "gpu/command_buffer/service/texture_manager.h"
11 #include "media/video/video_decode_accelerator.h" 11 #include "media/video/video_decode_accelerator.h"
12 12
13 namespace gpu { 13 namespace gpu {
14 namespace gles2 { 14 namespace gles2 {
15 class GLES2Decoder; 15 class GLES2Decoder;
16 } 16 }
17 } 17 }
18 18
19 namespace media { 19 namespace media {
20 20
21 // Helper class that provides AVDAPictureBufferManager with enough state 21 // Helper class that provides AVDAPictureBufferManager with enough state
22 // to do useful work. 22 // to do useful work.
23 class AVDAStateProvider { 23 class AVDAStateProvider {
24 public: 24 public:
25 // Various handy getters. 25 // Various handy getters.
26 virtual const gfx::Size& GetSize() const = 0; 26 virtual const gfx::Size& GetSize() const = 0;
27 virtual base::WeakPtr<gpu::gles2::GLES2Decoder> GetGlDecoder() const = 0; 27 virtual base::WeakPtr<gpu::gles2::GLES2Decoder> GetGlDecoder() const = 0;
28 28
29 // Helper function to report an error condition and stop decoding. 29 // Report a fatal error. This will post NotifyError(), and transition to the
30 // This will post NotifyError(), and transition to the error state. 30 // error state.
31 // It is meant to be called from the RETURN_ON_FAILURE macro. 31 virtual void NotifyError(VideoDecodeAccelerator::Error error) = 0;
32 virtual void PostError(const ::tracked_objects::Location& from_here,
33 VideoDecodeAccelerator::Error error) = 0;
34 32
35 protected: 33 protected:
36 ~AVDAStateProvider() = default; 34 ~AVDAStateProvider() = default;
37 }; 35 };
38 36
39 } // namespace media 37 } // namespace media
40 38
41 #endif // MEDIA_GPU_AVDA_STATE_PROVIDER_H_ 39 #endif // MEDIA_GPU_AVDA_STATE_PROVIDER_H_
OLDNEW
« no previous file with comments | « media/gpu/avda_picture_buffer_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698