OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
| 11 #include "media/base/media_export.h" |
11 #include "media/base/media_log_event.h" | 12 #include "media/base/media_log_event.h" |
12 #include "media/base/pipeline_impl.h" | 13 #include "media/base/pipeline_impl.h" |
13 #include "media/base/pipeline_status.h" | 14 #include "media/base/pipeline_status.h" |
14 | 15 |
15 namespace media { | 16 namespace media { |
16 | 17 |
17 class MediaLog : public base::RefCountedThreadSafe<MediaLog> { | 18 class MEDIA_EXPORT MediaLog : public base::RefCountedThreadSafe<MediaLog> { |
18 public: | 19 public: |
19 // Convert various enums to strings. | 20 // Convert various enums to strings. |
20 static const char* EventTypeToString(MediaLogEvent::Type type); | 21 static const char* EventTypeToString(MediaLogEvent::Type type); |
21 static const char* PipelineStateToString(PipelineImpl::State); | 22 static const char* PipelineStateToString(PipelineImpl::State); |
22 static const char* PipelineStatusToString(PipelineStatus); | 23 static const char* PipelineStatusToString(PipelineStatus); |
23 | 24 |
24 MediaLog(); | 25 MediaLog(); |
25 | 26 |
26 // Add an event to this log. Overriden by inheritors to actually do something | 27 // Add an event to this log. Overriden by inheritors to actually do something |
27 // with it. | 28 // with it. |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 PipelineStatistics last_statistics_; | 65 PipelineStatistics last_statistics_; |
65 bool stats_update_pending_; | 66 bool stats_update_pending_; |
66 base::Lock stats_lock_; | 67 base::Lock stats_lock_; |
67 | 68 |
68 DISALLOW_COPY_AND_ASSIGN(MediaLog); | 69 DISALLOW_COPY_AND_ASSIGN(MediaLog); |
69 }; | 70 }; |
70 | 71 |
71 } // namespace media | 72 } // namespace media |
72 | 73 |
73 #endif // MEDIA_BASE_MEDIA_LOG_H_ | 74 #endif // MEDIA_BASE_MEDIA_LOG_H_ |
OLD | NEW |