| 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 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 MediaLogEvent::Type type, const std::string& property, bool value); | 50 MediaLogEvent::Type type, const std::string& property, bool value); |
| 51 scoped_ptr<MediaLogEvent> CreateStringEvent(MediaLogEvent::Type type, | 51 scoped_ptr<MediaLogEvent> CreateStringEvent(MediaLogEvent::Type type, |
| 52 const std::string& property, | 52 const std::string& property, |
| 53 const std::string& value); | 53 const std::string& value); |
| 54 scoped_ptr<MediaLogEvent> CreateTimeEvent(MediaLogEvent::Type type, | 54 scoped_ptr<MediaLogEvent> CreateTimeEvent(MediaLogEvent::Type type, |
| 55 const std::string& property, | 55 const std::string& property, |
| 56 base::TimeDelta value); | 56 base::TimeDelta value); |
| 57 scoped_ptr<MediaLogEvent> CreateLoadEvent(const std::string& url); | 57 scoped_ptr<MediaLogEvent> CreateLoadEvent(const std::string& url); |
| 58 scoped_ptr<MediaLogEvent> CreateSeekEvent(float seconds); | 58 scoped_ptr<MediaLogEvent> CreateSeekEvent(float seconds); |
| 59 scoped_ptr<MediaLogEvent> CreatePipelineStateChangedEvent( | 59 scoped_ptr<MediaLogEvent> CreatePipelineStateChangedEvent( |
| 60 Pipeline::State state); | 60 PipelineImpl::State state); |
| 61 scoped_ptr<MediaLogEvent> CreatePipelineErrorEvent(PipelineStatus error); | 61 scoped_ptr<MediaLogEvent> CreatePipelineErrorEvent(PipelineStatus error); |
| 62 scoped_ptr<MediaLogEvent> CreateVideoSizeSetEvent( | 62 scoped_ptr<MediaLogEvent> CreateVideoSizeSetEvent( |
| 63 size_t width, size_t height); | 63 size_t width, size_t height); |
| 64 scoped_ptr<MediaLogEvent> CreateBufferedExtentsChangedEvent(int64_t start, | 64 scoped_ptr<MediaLogEvent> CreateBufferedExtentsChangedEvent(int64_t start, |
| 65 int64_t current, | 65 int64_t current, |
| 66 int64_t end); | 66 int64_t end); |
| 67 | 67 |
| 68 // Report a log message at the specified log level. | 68 // Report a log message at the specified log level. |
| 69 void AddLogEvent(MediaLogLevel level, const std::string& message); | 69 void AddLogEvent(MediaLogLevel level, const std::string& message); |
| 70 | 70 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 #define LIMITED_MEDIA_LOG(level, media_log, count, max) \ | 122 #define LIMITED_MEDIA_LOG(level, media_log, count, max) \ |
| 123 LAZY_STREAM(MEDIA_LOG(level, media_log), \ | 123 LAZY_STREAM(MEDIA_LOG(level, media_log), \ |
| 124 (count) < (max) && ((count)++ || true)) \ | 124 (count) < (max) && ((count)++ || true)) \ |
| 125 << (((count) == (max)) ? "(Log limit reached. Further similar entries " \ | 125 << (((count) == (max)) ? "(Log limit reached. Further similar entries " \ |
| 126 "may be suppressed): " \ | 126 "may be suppressed): " \ |
| 127 : "") | 127 : "") |
| 128 | 128 |
| 129 } // namespace media | 129 } // namespace media |
| 130 | 130 |
| 131 #endif // MEDIA_BASE_MEDIA_LOG_H_ | 131 #endif // MEDIA_BASE_MEDIA_LOG_H_ |
| OLD | NEW |