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

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

Issue 1313913003: Begin refactor of AVDA to support zero-copy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed unit test. Created 5 years, 3 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
(Empty)
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_COMMON_GPU_MEDIA_AVDA_RETURN_ON_FAILURE_H_
6 #define CONTENT_COMMON_GPU_MEDIA_AVDA_RETURN_ON_FAILURE_H_
7
8 #include "media/video/video_decode_accelerator.h"
9
10 // Helper macros for dealing with failure. If |result| evaluates false, emit
11 // |log| to ERROR, register |error| with the decoder, and return. This will
12 // also transition to the error state, stopping further decoding.
13 // This is meant to be used only within AndroidVideoDecoderBase and its
14 // various subclasses. |provider| must support PostError.
watk 2015/09/09 00:36:01 Comment is out of date already :P
15 #define RETURN_ON_FAILURE(provider, result, log, error) \
16 do { \
17 if (!(result)) { \
18 DLOG(ERROR) << log; \
19 provider->PostError(FROM_HERE, \
20 media::VideoDecodeAccelerator::error); \
21 return; \
22 } \
23 } while (0)
24
25 #endif // CONTENT_COMMON_GPU_MEDIA_AVDA_RETURN_ON_FAILURE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698