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

Unified Diff: media/base/media_log.h

Issue 883403002: Parsing of encoded duration for unencrypted opus streams. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Responding to review feedback, round 2. Created 5 years, 10 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
Index: media/base/media_log.h
diff --git a/media/base/media_log.h b/media/base/media_log.h
index 1a76cbf5f01ed68e67479f523e4119bd365b3dc8..5ac733c20a42b40af4e70929914947ced1959db9 100644
--- a/media/base/media_log.h
+++ b/media/base/media_log.h
@@ -8,6 +8,7 @@
#include <sstream>
#include <string>
+#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "media/base/media_export.h"
@@ -36,6 +37,11 @@ class LogHelper {
#define MEDIA_LOG(log_cb) LogHelper(log_cb).stream()
+// Logs only while count < max. Increments count for each log. Use LAZY_STREAM
+// to avoid wasteful evaluation of subsequent stream arguments.
+#define LIMITED_MEDIA_LOG(log_cb, count, max) \
+ LAZY_STREAM(MEDIA_LOG(log_cb), count <= max && count++)
wolenetz 2015/02/05 23:04:59 macros-r-fun :) s/<=/</. Also, caller might have
chcunningham 2015/02/06 03:20:09 Done. Adding akalin@chromium.org to review this ch
+
class MEDIA_EXPORT MediaLog : public base::RefCountedThreadSafe<MediaLog> {
public:
// Convert various enums to strings.

Powered by Google App Engine
This is Rietveld 408576698