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

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: Compile fixes for cast_messages.h for chromeos cross-compiles. Created 5 years 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 #include "media/cast/common/rtp_time.h"
13 14
14 namespace media { 15 namespace media {
15 namespace cast { 16 namespace cast {
16 17
17 static const uint32 kFrameIdUnknown = 0xFFFFFFFF; 18 static const uint32 kFrameIdUnknown = 0xFFFFFFFF;
18 19
19 typedef uint32 RtpTimestamp;
20
21 enum CastLoggingEvent { 20 enum CastLoggingEvent {
22 UNKNOWN, 21 UNKNOWN,
23 // Sender side frame events. 22 // Sender side frame events.
24 FRAME_CAPTURE_BEGIN, 23 FRAME_CAPTURE_BEGIN,
25 FRAME_CAPTURE_END, 24 FRAME_CAPTURE_END,
26 FRAME_ENCODED, 25 FRAME_ENCODED,
27 FRAME_ACK_RECEIVED, 26 FRAME_ACK_RECEIVED,
28 // Receiver side frame events. 27 // Receiver side frame events.
29 FRAME_ACK_SENT, 28 FRAME_ACK_SENT,
30 FRAME_DECODED, 29 FRAME_DECODED,
(...skipping 14 matching lines...) Expand all
45 AUDIO_EVENT, 44 AUDIO_EVENT,
46 VIDEO_EVENT, 45 VIDEO_EVENT,
47 UNKNOWN_EVENT, 46 UNKNOWN_EVENT,
48 EVENT_MEDIA_TYPE_LAST = UNKNOWN_EVENT 47 EVENT_MEDIA_TYPE_LAST = UNKNOWN_EVENT
49 }; 48 };
50 49
51 struct FrameEvent { 50 struct FrameEvent {
52 FrameEvent(); 51 FrameEvent();
53 ~FrameEvent(); 52 ~FrameEvent();
54 53
55 RtpTimestamp rtp_timestamp; 54 RtpTimeTicks rtp_timestamp;
56 uint32 frame_id; 55 uint32 frame_id;
57 56
58 // Resolution of the frame. Only set for video FRAME_CAPTURE_END events. 57 // Resolution of the frame. Only set for video FRAME_CAPTURE_END events.
59 int width; 58 int width;
60 int height; 59 int height;
61 60
62 // Size of encoded frame in bytes. Only set for FRAME_ENCODED event. 61 // Size of encoded frame in bytes. Only set for FRAME_ENCODED event.
63 size_t size; 62 size_t size;
64 63
65 // Time of event logged. 64 // Time of event logged.
(...skipping 19 matching lines...) Expand all
85 // Encoding performance metrics. See media/cast/sender/sender_encoded_frame.h 84 // Encoding performance metrics. See media/cast/sender/sender_encoded_frame.h
86 // for a description of these values. 85 // for a description of these values.
87 double encoder_cpu_utilization; 86 double encoder_cpu_utilization;
88 double idealized_bitrate_utilization; 87 double idealized_bitrate_utilization;
89 }; 88 };
90 89
91 struct PacketEvent { 90 struct PacketEvent {
92 PacketEvent(); 91 PacketEvent();
93 ~PacketEvent(); 92 ~PacketEvent();
94 93
95 RtpTimestamp rtp_timestamp; 94 RtpTimeTicks rtp_timestamp;
96 uint32 frame_id; 95 uint32 frame_id;
97 uint16 max_packet_id; 96 uint16 max_packet_id;
98 uint16 packet_id; 97 uint16 packet_id;
99 size_t size; 98 size_t size;
100 99
101 // Time of event logged. 100 // Time of event logged.
102 base::TimeTicks timestamp; 101 base::TimeTicks timestamp;
103 CastLoggingEvent type; 102 CastLoggingEvent type;
104 EventMediaType media_type; 103 EventMediaType media_type;
105 }; 104 };
106 105
107 } // namespace cast 106 } // namespace cast
108 } // namespace media 107 } // namespace media
109 108
110 #endif // MEDIA_CAST_LOGGING_LOGGING_DEFINES_H_ 109 #endif // MEDIA_CAST_LOGGING_LOGGING_DEFINES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698