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

Side by Side Diff: webrtc/logging/rtc_event_log/events/rtc_event.h

Issue 3012923002: Add the internals of RtcEvent's subclasses (Closed)
Patch Set: Rebased Created 3 years, 3 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 /* 1 /*
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #ifndef WEBRTC_LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_H_ 11 #ifndef WEBRTC_LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_H_
12 #define WEBRTC_LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_H_ 12 #define WEBRTC_LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_H_
13 13
14 #include <webrtc/typedefs.h>
15
16 namespace rtc {
17 int64_t TimeMicros();
18 } // namespace rtc
19
14 namespace webrtc { 20 namespace webrtc {
15 21
16 // This class allows us to store unencoded RTC events. Subclasses of this class 22 // This class allows us to store unencoded RTC events. Subclasses of this class
17 // store the actual information. This allows us to keep all unencoded events, 23 // store the actual information. This allows us to keep all unencoded events,
18 // even when their type and associated information differ, in the same buffer. 24 // even when their type and associated information differ, in the same buffer.
19 // Additionally, it prevents dependency leaking - a module that only logs 25 // Additionally, it prevents dependency leaking - a module that only logs
20 // events of type RtcEvent_A doesn't need to know about anything associated 26 // events of type RtcEvent_A doesn't need to know about anything associated
21 // with events of type RtcEvent_B. 27 // with events of type RtcEvent_B.
22 class RtcEvent { 28 class RtcEvent {
23 public: 29 public:
(...skipping 14 matching lines...) Expand all
38 ProbeResultFailure, 44 ProbeResultFailure,
39 ProbeResultSuccess, 45 ProbeResultSuccess,
40 RtcpPacketIncoming, 46 RtcpPacketIncoming,
41 RtcpPacketOutgoing, 47 RtcpPacketOutgoing,
42 RtpPacketIncoming, 48 RtpPacketIncoming,
43 RtpPacketOutgoing, 49 RtpPacketOutgoing,
44 VideoReceiveStreamConfig, 50 VideoReceiveStreamConfig,
45 VideoSendStreamConfig 51 VideoSendStreamConfig
46 }; 52 };
47 53
54 RtcEvent() : timestamp_us_(rtc::TimeMicros()) {}
48 virtual ~RtcEvent() = default; 55 virtual ~RtcEvent() = default;
49 56
50 virtual Type GetType() const = 0; 57 virtual Type GetType() const = 0;
51 58
52 virtual bool IsConfigEvent() const = 0; 59 virtual bool IsConfigEvent() const = 0;
60
61 const int64_t timestamp_us_;
53 }; 62 };
54 63
55 } // namespace webrtc 64 } // namespace webrtc
56 65
57 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_H_ 66 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_H_
OLDNEW
« no previous file with comments | « webrtc/logging/BUILD.gn ('k') | webrtc/logging/rtc_event_log/events/rtc_event_audio_network_adaptation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698