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

Side by Side Diff: webrtc/logging/rtc_event_log/encoder/rtc_event_log_encoder_legacy.h

Issue 3009333002: Create RtcEventLogEncoderLegacy (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_ENCODER_RTC_EVENT_LOG_ENCODER_LEGACY_H_
12 #define WEBRTC_LOGGING_RTC_EVENT_LOG_ENCODER_RTC_EVENT_LOG_ENCODER_LEGACY_H_
13
14 #include <memory>
15 #include <string>
16
17 #include "webrtc/logging/rtc_event_log/encoder/rtc_event_log_encoder.h"
18 #include "webrtc/rtc_base/buffer.h"
19
20 namespace webrtc {
21
22 namespace rtclog {
23 class Event;
24 } // namespace rtclog
25
26 namespace rtp {
27 class Packet;
28 } // namespace rtp
29
30 class RtcEventAudioNetworkAdaptation;
31 class RtcEventAudioPlayout;
32 class RtcEventAudioReceiveStreamConfig;
33 class RtcEventAudioSendStreamConfig;
34 class RtcEventBweUpdateDelayBased;
35 class RtcEventBweUpdateLossBased;
36 class RtcEventLoggingStarted;
37 class RtcEventLoggingStopped;
38 class RtcEventProbeClusterCreated;
39 class RtcEventProbeResultFailure;
40 class RtcEventProbeResultSuccess;
41 class RtcEventRtcpPacketIncoming;
42 class RtcEventRtcpPacketOutgoing;
43 class RtcEventRtpPacketIncoming;
44 class RtcEventRtpPacketOutgoing;
45 class RtcEventVideoReceiveStreamConfig;
46 class RtcEventVideoSendStreamConfig;
47
48 class RtcEventLogEncoderLegacy final : public RtcEventLogEncoder {
49 public:
50 ~RtcEventLogEncoderLegacy() override = default;
51
52 std::string Encode(const RtcEvent& event) override;
53
54 private:
55 // Encoding entry-point for the various RtcEvent subclasses.
56 std::string AudioNetworkAdaptation(
57 const RtcEventAudioNetworkAdaptation& event);
58 std::string AudioPlayout(const RtcEventAudioPlayout& event);
59 std::string AudioReceiveStreamConfig(
60 const RtcEventAudioReceiveStreamConfig& event);
61 std::string AudioSendStreamConfig(const RtcEventAudioSendStreamConfig& event);
62 std::string BweUpdateDelayBased(const RtcEventBweUpdateDelayBased& event);
63 std::string BweUpdateLossBased(const RtcEventBweUpdateLossBased& event);
64 std::string LoggingStarted(const RtcEventLoggingStarted& event);
65 std::string LoggingStopped(const RtcEventLoggingStopped& event);
66 std::string ProbeClusterCreated(const RtcEventProbeClusterCreated& event);
67 std::string ProbeResultFailure(const RtcEventProbeResultFailure& event);
68 std::string ProbeResultSuccess(const RtcEventProbeResultSuccess&);
69 std::string RtcpPacketIncoming(const RtcEventRtcpPacketIncoming& event);
70 std::string RtcpPacketOutgoing(const RtcEventRtcpPacketOutgoing& event);
71 std::string RtpPacketIncoming(const RtcEventRtpPacketIncoming& event);
72 std::string RtpPacketOutgoing(const RtcEventRtpPacketOutgoing& event);
73 std::string VideoReceiveStreamConfig(
74 const RtcEventVideoReceiveStreamConfig& event);
75 std::string VideoSendStreamConfig(const RtcEventVideoSendStreamConfig& event);
76
77 // RTCP/RTP are handled similarly for incoming/outgoing.
78 std::string RtcpPacket(int64_t timestamp_us,
79 const rtc::Buffer& packet,
80 bool is_incoming);
81 std::string RtpPacket(int64_t timestamp_us,
82 const rtp::Packet& header,
83 size_t packet_length,
84 bool is_incoming);
85
86 std::string Serialize(rtclog::Event* event);
87 };
88
89 } // namespace webrtc
90
91 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_ENCODER_RTC_EVENT_LOG_ENCODER_LEGACY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698