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

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

Issue 3006263002: Introduce RtcEvent and 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
(Empty)
1 /*
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #ifndef WEBRTC_LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_H_
12 #define WEBRTC_LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_H_
13
14 namespace webrtc {
15
16 // 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,
18 // even when their type and associated information differ, in the same buffer.
19 // Additionally, it prevents dependency leaking - a module that only logs
20 // events of type RtcEvent_A doesn't need to know about anything associated
21 // with events of type RtcEvent_B.
22 class RtcEvent {
23 public:
24 // Subclasses of this class have to associate themselves with a unique
25 // of Type. This leaks the information of existing subclasses into the
26 // superclass, but the *actual* information - rtclog::StreamConfig, etc. -
27 // is kept separate.
28 enum class Type {
29 AudioNetworkAdaptation,
30 AudioPlayout,
31 AudioReceiveStreamConfig,
32 AudioSendStreamConfig,
33 BweUpdateDelayBased,
34 BweUpdateLossBased,
35 LoggingStarted,
36 LoggingStopped,
37 ProbeClusterCreated,
38 ProbeResultFailure,
39 ProbeResultSuccess,
40 RtcpPacketIncoming,
41 RtcpPacketOutgoing,
42 RtpPacketIncoming,
43 RtpPacketOutgoing,
44 VideoReceiveStreamConfig,
45 VideoSendStreamConfig
46 };
47
48 virtual ~RtcEvent() = default;
49
50 virtual Type GetType() const = 0;
51
52 virtual bool IsConfigEvent() const = 0;
53 };
54
55 } // namespace webrtc
56
57 #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