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

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: add gn build. 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.
no sievers 2015/09/11 00:20:39 nit: drop (c)
liberato (no reviews please) 2015/09/14 17:41:28 Done.
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 AndroidVideoDecoder and the various
14 // backing strategies. |provider| must support PostError.
15 #define RETURN_ON_FAILURE(provider, result, log, error) \
16 do { \
17 if (!(result)) { \
18 DLOG(ERROR) << log; \
19 provider->PostError(FROM_HERE, media::VideoDecodeAccelerator::error); \
20 return; \
21 } \
22 } while (0)
23
24 #endif // CONTENT_COMMON_GPU_MEDIA_AVDA_RETURN_ON_FAILURE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698