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

Unified Diff: media/gpu/android_video_decode_accelerator.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/gpu/android_video_decode_accelerator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2b4d4aefca925dfaab841985ac4adb6c5a3d0532..d4179ac6be92eb88c5c83da6362ea755c02835cc 100644
--- a/media/gpu/android_video_decode_accelerator.h
+++ b/media/gpu/android_video_decode_accelerator.h
@@ -45,6 +45,9 @@ class MEDIA_GPU_EXPORT AndroidVideoDecodeAccelerator
: public VideoDecodeAccelerator,
public AVDAStateProvider {
public:
+ static VideoDecodeAccelerator::Capabilities GetCapabilities(
+ const gpu::GpuPreferences& gpu_preferences);
+
AndroidVideoDecodeAccelerator(
const MakeGLContextCurrentCallback& make_context_current_cb,
const GetGLES2DecoderCallback& get_gles2_decoder_cb);
@@ -68,11 +71,8 @@ class MEDIA_GPU_EXPORT AndroidVideoDecodeAccelerator
// AVDAStateProvider implementation:
const gfx::Size& GetSize() const override;
base::WeakPtr<gpu::gles2::GLES2Decoder> GetGlDecoder() const override;
- void PostError(const ::tracked_objects::Location& from_here,
- VideoDecodeAccelerator::Error error) override;
-
- static VideoDecodeAccelerator::Capabilities GetCapabilities(
- const gpu::GpuPreferences& gpu_preferences);
+ // Notifies the client about the error and sets |state_| to |ERROR|.
+ void NotifyError(Error error) override;
private:
friend class AVDAManager;
@@ -230,14 +230,6 @@ class MEDIA_GPU_EXPORT AndroidVideoDecodeAccelerator
// Notifies the client that the decoder was reset.
void NotifyResetDone();
- // Notifies about decoding errors.
- // Note: you probably don't want to call this directly. Use PostError or
- // RETURN_ON_FAILURE, since we can defer error reporting to keep the pipeline
- // from breaking. NotifyError will do so immediately, PostError may wait.
- // |token| has to match |error_sequence_token_|, or else it's assumed to be
- // from a post that's prior to a previous reset, and ignored.
- void NotifyError(VideoDecodeAccelerator::Error error, int token);
-
// Start or stop our work-polling timer based on whether we did any work, and
// how long it has been since we've done work. Calling this with true will
// start the timer. Calling it with false may stop the timer.
@@ -375,9 +367,6 @@ class MEDIA_GPU_EXPORT AndroidVideoDecodeAccelerator
// from being sent after a reset.
int error_sequence_token_;
- // PostError will defer sending an error if and only if this is true.
- bool defer_errors_;
-
// True if and only if VDA initialization is deferred, and we have not yet
// called NotifyInitializationComplete.
bool deferred_initialization_pending_;
« no previous file with comments | « no previous file | media/gpu/android_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698