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. |