Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: media/base/media_log.h

Issue 877273002: Add media log messages to the main log (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a typo in comments Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/media/render_media_log.cc ('k') | media/base/media_log.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
(...skipping 30 matching lines...) Expand all
41 // to avoid wasteful evaluation of subsequent stream arguments. 41 // to avoid wasteful evaluation of subsequent stream arguments.
42 #define LIMITED_MEDIA_LOG(log_cb, count, max) \ 42 #define LIMITED_MEDIA_LOG(log_cb, count, max) \
43 LAZY_STREAM(MEDIA_LOG(log_cb), (count) < (max) && ((count)++ || true)) 43 LAZY_STREAM(MEDIA_LOG(log_cb), (count) < (max) && ((count)++ || true))
44 44
45 class MEDIA_EXPORT MediaLog : public base::RefCountedThreadSafe<MediaLog> { 45 class MEDIA_EXPORT MediaLog : public base::RefCountedThreadSafe<MediaLog> {
46 public: 46 public:
47 // Convert various enums to strings. 47 // Convert various enums to strings.
48 static std::string EventTypeToString(MediaLogEvent::Type type); 48 static std::string EventTypeToString(MediaLogEvent::Type type);
49 static std::string PipelineStatusToString(PipelineStatus status); 49 static std::string PipelineStatusToString(PipelineStatus status);
50 50
51 static std::string MediaEventToLogString(const MediaLogEvent& event);
52
51 MediaLog(); 53 MediaLog();
52 54
53 // Add an event to this log. Overriden by inheritors to actually do something 55 // Add an event to this log. Overriden by inheritors to actually do something
54 // with it. 56 // with it.
55 virtual void AddEvent(scoped_ptr<MediaLogEvent> event); 57 virtual void AddEvent(scoped_ptr<MediaLogEvent> event);
56 58
57 // Helper methods to create events and their parameters. 59 // Helper methods to create events and their parameters.
58 scoped_ptr<MediaLogEvent> CreateEvent(MediaLogEvent::Type type); 60 scoped_ptr<MediaLogEvent> CreateEvent(MediaLogEvent::Type type);
59 scoped_ptr<MediaLogEvent> CreateBooleanEvent( 61 scoped_ptr<MediaLogEvent> CreateBooleanEvent(
60 MediaLogEvent::Type type, const std::string& property, bool value); 62 MediaLogEvent::Type type, const std::string& property, bool value);
(...skipping 29 matching lines...) Expand all
90 private: 92 private:
91 // A unique (to this process) id for this MediaLog. 93 // A unique (to this process) id for this MediaLog.
92 int32 id_; 94 int32 id_;
93 95
94 DISALLOW_COPY_AND_ASSIGN(MediaLog); 96 DISALLOW_COPY_AND_ASSIGN(MediaLog);
95 }; 97 };
96 98
97 } // namespace media 99 } // namespace media
98 100
99 #endif // MEDIA_BASE_MEDIA_LOG_H_ 101 #endif // MEDIA_BASE_MEDIA_LOG_H_
OLDNEW
« no previous file with comments | « content/renderer/media/render_media_log.cc ('k') | media/base/media_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698