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 <sstream> | 8 #include <sstream> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "media/base/media_export.h" | 13 #include "media/base/media_export.h" |
14 #include "media/base/media_log_event.h" | 14 #include "media/base/media_log_event.h" |
15 #include "media/base/pipeline.h" | 15 #include "media/base/pipeline.h" |
16 #include "media/base/pipeline_status.h" | 16 #include "media/base/pipeline_status.h" |
17 | 17 |
18 namespace media { | 18 namespace media { |
19 | 19 |
20 // Indicates a string should be added to the log. | 20 // Indicates a string should be added to the log. |
21 // First parameter - The string to add to the log. | 21 // First parameter - The string to add to the log. |
22 typedef base::Callback<void(const std::string&)> LogCB; | 22 typedef base::Callback<void(const std::string&)> LogCB; |
23 | 23 |
24 // Helper class to make it easier to use log_cb like DVLOG(). | 24 // Helper class to make it easier to use log_cb like DVLOG(). |
25 class LogHelper { | 25 class MEDIA_EXPORT LogHelper { |
scherkus (not reviewing)
2013/09/03 19:34:22
is this change needed? I don't see any new referen
acolwell GONE FROM CHROMIUM
2013/09/04 00:48:13
Nope. This was only needed when I was doing some d
| |
26 public: | 26 public: |
27 LogHelper(const LogCB& Log_cb); | 27 LogHelper(const LogCB& Log_cb); |
28 ~LogHelper(); | 28 ~LogHelper(); |
29 | 29 |
30 std::ostream& stream() { return stream_; } | 30 std::ostream& stream() { return stream_; } |
31 | 31 |
32 private: | 32 private: |
33 LogCB log_cb_; | 33 LogCB log_cb_; |
34 std::stringstream stream_; | 34 std::stringstream stream_; |
35 }; | 35 }; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
81 private: | 81 private: |
82 // A unique (to this process) id for this MediaLog. | 82 // A unique (to this process) id for this MediaLog. |
83 int32 id_; | 83 int32 id_; |
84 | 84 |
85 DISALLOW_COPY_AND_ASSIGN(MediaLog); | 85 DISALLOW_COPY_AND_ASSIGN(MediaLog); |
86 }; | 86 }; |
87 | 87 |
88 } // namespace media | 88 } // namespace media |
89 | 89 |
90 #endif // MEDIA_BASE_MEDIA_LOG_H_ | 90 #endif // MEDIA_BASE_MEDIA_LOG_H_ |
OLD | NEW |