Index: media/formats/mp4/rcheck.h |
diff --git a/media/formats/mp4/rcheck.h b/media/formats/mp4/rcheck.h |
index fb0f8f27d4ec66f965f18609bcbaacd50186c7bf..c1ff7c36e0341dcc2521efd1c1f0f96ec44e1a18 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; \ |
chcunningham
2015/05/15 17:19:33
Noob c++ question. What is the value of #condition
wolenetz
2015/05/15 18:16:25
Yep. Exactly. See https://gcc.gnu.org/onlinedocs/c
|
+ MEDIA_LOG(ERROR, log_cb) << "Failure parsing MP4: " << (msg); \ |
+ return false; \ |
+ } \ |
+ } while (0) |
+ |
+// TODO(wolenetz,chcunningham): Eliminate usage of this macro in favor of |
+// RCHECK_MEDIA_LOGGED. See https://crbug.com/487410. |
chcunningham
2015/05/15 17:19:33
Do we really want to Elminate? Basically, are you
wolenetz
2015/05/15 18:16:25
Yeah, my wording was too strong. I'll relax it. Th
|
+#define RCHECK(condition) \ |
+ do { \ |
+ if (!(condition)) { \ |
+ DLOG(ERROR) << "Failure while parsing MP4: " << #condition; \ |
+ return false; \ |
+ } \ |
+ } while (0) |
#endif // MEDIA_FORMATS_MP4_RCHECK_H_ |