Chromium Code Reviews| Index: media/formats/mp4/rcheck.h |
| diff --git a/media/formats/mp4/rcheck.h b/media/formats/mp4/rcheck.h |
| index fb0f8f27d4ec66f965f18609bcbaacd50186c7bf..d7564874d86dc150b86b1aae21b874c05c3beee1 100644 |
| --- a/media/formats/mp4/rcheck.h |
| +++ b/media/formats/mp4/rcheck.h |
| @@ -6,13 +6,25 @@ |
| #define MEDIA_FORMATS_MP4_RCHECK_H_ |
| #include "base/logging.h" |
| +#include "media/base/media_log.h" |
| -#define RCHECK(x) \ |
| - do { \ |
| - if (!(x)) { \ |
| - DLOG(ERROR) << "Failure while parsing MP4: " << #x; \ |
| - return false; \ |
| - } \ |
| - } while (0) |
| +#define RCHECK_MEDIA_LOGGED(condition, log_cb, msg) \ |
| + do { \ |
| + if (!(condition)) { \ |
| + DLOG(ERROR) << "Failure while parsing MP4: " #condition; \ |
|
DaleCurtis
2015/05/15 18:45:37
<< before # ?
|
| + MEDIA_LOG(ERROR, log_cb) << "Failure parsing MP4: " << (msg); \ |
| + return false; \ |
| + } \ |
| + } while (0) |
| + |
| +// TODO(wolenetz,chcunningham): Where appropriate, replace usage of this macro |
| +// in favor of RCHECK_MEDIA_LOGGED. See https://crbug.com/487410. |
| +#define RCHECK(condition) \ |
| + do { \ |
| + if (!(condition)) { \ |
| + DLOG(ERROR) << "Failure while parsing MP4: " #condition; \ |
|
DaleCurtis
2015/05/15 18:45:37
Ditto
|
| + return false; \ |
| + } \ |
| + } while (0) |
| #endif // MEDIA_FORMATS_MP4_RCHECK_H_ |