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

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

Issue 1515433002: Replace uses of raw uint32's with a type-checked RtpTimeTicks data type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Speculative workaround fix for win8_chromium_ng compile error. Created 4 years, 11 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 | « media/cast/logging/log_serializer.cc ('k') | media/cast/logging/logging_defines.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 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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <map> 11 #include <map>
12 #include <string> 12 #include <string>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "media/cast/common/rtp_time.h"
16 17
17 namespace media { 18 namespace media {
18 namespace cast { 19 namespace cast {
19 20
20 static const uint32_t kFrameIdUnknown = 0xFFFFFFFF; 21 static const uint32_t kFrameIdUnknown = 0xFFFFFFFF;
21 22
22 typedef uint32_t RtpTimestamp;
23
24 enum CastLoggingEvent { 23 enum CastLoggingEvent {
25 UNKNOWN, 24 UNKNOWN,
26 // Sender side frame events. 25 // Sender side frame events.
27 FRAME_CAPTURE_BEGIN, 26 FRAME_CAPTURE_BEGIN,
28 FRAME_CAPTURE_END, 27 FRAME_CAPTURE_END,
29 FRAME_ENCODED, 28 FRAME_ENCODED,
30 FRAME_ACK_RECEIVED, 29 FRAME_ACK_RECEIVED,
31 // Receiver side frame events. 30 // Receiver side frame events.
32 FRAME_ACK_SENT, 31 FRAME_ACK_SENT,
33 FRAME_DECODED, 32 FRAME_DECODED,
(...skipping 14 matching lines...) Expand all
48 AUDIO_EVENT, 47 AUDIO_EVENT,
49 VIDEO_EVENT, 48 VIDEO_EVENT,
50 UNKNOWN_EVENT, 49 UNKNOWN_EVENT,
51 EVENT_MEDIA_TYPE_LAST = UNKNOWN_EVENT 50 EVENT_MEDIA_TYPE_LAST = UNKNOWN_EVENT
52 }; 51 };
53 52
54 struct FrameEvent { 53 struct FrameEvent {
55 FrameEvent(); 54 FrameEvent();
56 ~FrameEvent(); 55 ~FrameEvent();
57 56
58 RtpTimestamp rtp_timestamp; 57 RtpTimeTicks rtp_timestamp;
59 uint32_t frame_id; 58 uint32_t frame_id;
60 59
61 // Resolution of the frame. Only set for video FRAME_CAPTURE_END events. 60 // Resolution of the frame. Only set for video FRAME_CAPTURE_END events.
62 int width; 61 int width;
63 int height; 62 int height;
64 63
65 // Size of encoded frame in bytes. Only set for FRAME_ENCODED event. 64 // Size of encoded frame in bytes. Only set for FRAME_ENCODED event.
66 size_t size; 65 size_t size;
67 66
68 // Time of event logged. 67 // Time of event logged.
(...skipping 19 matching lines...) Expand all
88 // Encoding performance metrics. See media/cast/sender/sender_encoded_frame.h 87 // Encoding performance metrics. See media/cast/sender/sender_encoded_frame.h
89 // for a description of these values. 88 // for a description of these values.
90 double encoder_cpu_utilization; 89 double encoder_cpu_utilization;
91 double idealized_bitrate_utilization; 90 double idealized_bitrate_utilization;
92 }; 91 };
93 92
94 struct PacketEvent { 93 struct PacketEvent {
95 PacketEvent(); 94 PacketEvent();
96 ~PacketEvent(); 95 ~PacketEvent();
97 96
98 RtpTimestamp rtp_timestamp; 97 RtpTimeTicks rtp_timestamp;
99 uint32_t frame_id; 98 uint32_t frame_id;
100 uint16_t max_packet_id; 99 uint16_t max_packet_id;
101 uint16_t packet_id; 100 uint16_t packet_id;
102 size_t size; 101 size_t size;
103 102
104 // Time of event logged. 103 // Time of event logged.
105 base::TimeTicks timestamp; 104 base::TimeTicks timestamp;
106 CastLoggingEvent type; 105 CastLoggingEvent type;
107 EventMediaType media_type; 106 EventMediaType media_type;
108 }; 107 };
109 108
110 } // namespace cast 109 } // namespace cast
111 } // namespace media 110 } // namespace media
112 111
113 #endif // MEDIA_CAST_LOGGING_LOGGING_DEFINES_H_ 112 #endif // MEDIA_CAST_LOGGING_LOGGING_DEFINES_H_
OLDNEW
« no previous file with comments | « media/cast/logging/log_serializer.cc ('k') | media/cast/logging/logging_defines.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698