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

Side by Side Diff: media/cast/logging/logging_defines.h

Issue 165723002: Cast: Implemented size limiting and event filtering in EncodingEventSubscriber. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 10 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_CAST_LOGGING_LOGGING_DEFINES_H_ 5 #ifndef MEDIA_CAST_LOGGING_LOGGING_DEFINES_H_
6 #define MEDIA_CAST_LOGGING_LOGGING_DEFINES_H_ 6 #define MEDIA_CAST_LOGGING_LOGGING_DEFINES_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 13
14 namespace media { 14 namespace media {
15 namespace cast { 15 namespace cast {
16 16
17 static const uint32 kFrameIdUnknown = 0xFFFFFFFF; 17 static const uint32 kFrameIdUnknown = 0xFFFFFFFF;
18 18
19 typedef uint32 RtpTimestamp;
20
19 struct CastLoggingConfig { 21 struct CastLoggingConfig {
20 // Constructs default config - all logging is disabled. 22 // Constructs default config - all logging is disabled.
21 CastLoggingConfig(); 23 CastLoggingConfig();
22 ~CastLoggingConfig(); 24 ~CastLoggingConfig();
23 25
24 bool enable_raw_data_collection; 26 bool enable_raw_data_collection;
25 bool enable_stats_data_collection; 27 bool enable_stats_data_collection;
26 bool enable_tracing; 28 bool enable_tracing;
27 }; 29 };
28 30
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // Receive-side packet events. 69 // Receive-side packet events.
68 kAudioPacketReceived, 70 kAudioPacketReceived,
69 kVideoPacketReceived, 71 kVideoPacketReceived,
70 kDuplicateAudioPacketReceived, 72 kDuplicateAudioPacketReceived,
71 kDuplicateVideoPacketReceived, 73 kDuplicateVideoPacketReceived,
72 kNumOfLoggingEvents, 74 kNumOfLoggingEvents,
73 }; 75 };
74 76
75 std::string CastLoggingToString(CastLoggingEvent event); 77 std::string CastLoggingToString(CastLoggingEvent event);
76 78
77 typedef uint32 RtpTimestamp; 79 // CastLoggingEvent are classified into one of three following types.
80 enum EventMediaType { AUDIO_EVENT, VIDEO_EVENT, OTHER_EVENT };
81
82 EventMediaType GetEventMediaType(CastLoggingEvent event);
78 83
79 struct FrameEvent { 84 struct FrameEvent {
80 FrameEvent(); 85 FrameEvent();
81 ~FrameEvent(); 86 ~FrameEvent();
82 87
83 RtpTimestamp rtp_timestamp; 88 RtpTimestamp rtp_timestamp;
84 uint32 frame_id; 89 uint32 frame_id;
85 size_t size; // Encoded size only. 90 size_t size; // Encoded size only.
86 91
87 // Time of event logged. 92 // Time of event logged.
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 171
167 172
168 typedef std::map<CastLoggingEvent, FrameLogStats> FrameStatsMap; 173 typedef std::map<CastLoggingEvent, FrameLogStats> FrameStatsMap;
169 typedef std::map<CastLoggingEvent, PacketLogStats> PacketStatsMap; 174 typedef std::map<CastLoggingEvent, PacketLogStats> PacketStatsMap;
170 typedef std::map<CastLoggingEvent, GenericLogStats> GenericStatsMap; 175 typedef std::map<CastLoggingEvent, GenericLogStats> GenericStatsMap;
171 176
172 } // namespace cast 177 } // namespace cast
173 } // namespace media 178 } // namespace media
174 179
175 #endif // MEDIA_CAST_LOGGING_LOGGING_DEFINES_H_ 180 #endif // MEDIA_CAST_LOGGING_LOGGING_DEFINES_H_
OLDNEW
« no previous file with comments | « media/cast/logging/encoding_event_subscriber_unittest.cc ('k') | media/cast/logging/logging_defines.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698