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

Unified Diff: media/formats/mp4/rcheck.h

Issue 1147453002: MSE: Increase log visibility when unfragmented MP4 causes parse failure (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased and addressed chcunningham's PS1 comments Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« media/formats/mp4/box_definitions.h ('K') | « media/formats/mp4/box_reader.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« media/formats/mp4/box_definitions.h ('K') | « media/formats/mp4/box_reader.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698