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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_FORMATS_MP4_RCHECK_H_ 5 #ifndef MEDIA_FORMATS_MP4_RCHECK_H_
6 #define MEDIA_FORMATS_MP4_RCHECK_H_ 6 #define MEDIA_FORMATS_MP4_RCHECK_H_
7 7
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "media/base/media_log.h"
9 10
10 #define RCHECK(x) \ 11 #define RCHECK_MEDIA_LOGGED(condition, log_cb, msg) \
11 do { \ 12 do { \
12 if (!(x)) { \ 13 if (!(condition)) { \
13 DLOG(ERROR) << "Failure while parsing MP4: " << #x; \ 14 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
14 return false; \ 15 MEDIA_LOG(ERROR, log_cb) << "Failure parsing MP4: " << (msg); \
15 } \ 16 return false; \
16 } while (0) 17 } \
18 } while (0)
19
20 // TODO(wolenetz,chcunningham): Eliminate usage of this macro in favor of
21 // 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
22 #define RCHECK(condition) \
23 do { \
24 if (!(condition)) { \
25 DLOG(ERROR) << "Failure while parsing MP4: " << #condition; \
26 return false; \
27 } \
28 } while (0)
17 29
18 #endif // MEDIA_FORMATS_MP4_RCHECK_H_ 30 #endif // MEDIA_FORMATS_MP4_RCHECK_H_
OLDNEW
« media/formats/mp4/box_reader.cc ('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