OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BASE_MEDIA_LOG_H_ | 5 #ifndef MEDIA_BASE_MEDIA_LOG_H_ |
6 #define MEDIA_BASE_MEDIA_LOG_H_ | 6 #define MEDIA_BASE_MEDIA_LOG_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <memory> | 11 #include <memory> |
12 #include <sstream> | 12 #include <sstream> |
13 #include <string> | 13 #include <string> |
14 | 14 |
15 #include "base/containers/flat_set.h" | 15 #include "base/containers/flat_set.h" |
16 #include "base/logging.h" | 16 #include "base/logging.h" |
17 #include "base/macros.h" | 17 #include "base/macros.h" |
18 #include "base/memory/ref_counted.h" | 18 #include "base/memory/ref_counted.h" |
19 #include "media/base/buffering_state.h" | 19 #include "media/base/buffering_state.h" |
20 #include "media/base/media_export.h" | 20 #include "media/base/media_export.h" |
21 #include "media/base/media_log_event.h" | 21 #include "media/base/media_log_event.h" |
22 #include "media/base/pipeline_impl.h" | 22 #include "media/base/pipeline_impl.h" |
23 #include "media/base/pipeline_status.h" | 23 #include "media/base/pipeline_status.h" |
| 24 #include "url/gurl.h" |
24 | 25 |
25 namespace media { | 26 namespace media { |
26 | 27 |
27 class MEDIA_EXPORT MediaLog : public base::RefCountedThreadSafe<MediaLog> { | 28 class MEDIA_EXPORT MediaLog : public base::RefCountedThreadSafe<MediaLog> { |
28 public: | 29 public: |
29 enum MediaLogLevel { | 30 enum MediaLogLevel { |
30 MEDIALOG_ERROR, | 31 MEDIALOG_ERROR, |
31 MEDIALOG_INFO, | 32 MEDIALOG_INFO, |
32 MEDIALOG_DEBUG, | 33 MEDIALOG_DEBUG, |
33 }; | 34 }; |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 #define LIMITED_MEDIA_LOG(level, media_log, count, max) \ | 170 #define LIMITED_MEDIA_LOG(level, media_log, count, max) \ |
170 LAZY_STREAM(MEDIA_LOG(level, media_log), \ | 171 LAZY_STREAM(MEDIA_LOG(level, media_log), \ |
171 (count) < (max) && ((count)++ || true)) \ | 172 (count) < (max) && ((count)++ || true)) \ |
172 << (((count) == (max)) ? "(Log limit reached. Further similar entries " \ | 173 << (((count) == (max)) ? "(Log limit reached. Further similar entries " \ |
173 "may be suppressed): " \ | 174 "may be suppressed): " \ |
174 : "") | 175 : "") |
175 | 176 |
176 } // namespace media | 177 } // namespace media |
177 | 178 |
178 #endif // MEDIA_BASE_MEDIA_LOG_H_ | 179 #endif // MEDIA_BASE_MEDIA_LOG_H_ |
OLD | NEW |