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

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

Issue 3006233002: Modularize RtcEventLog
Patch Set: Backup 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) 2015 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_H_
12 #define WEBRTC_LOGGING_RTC_EVENT_LOG_ENCODER_RTC_EVENT_LOG_ENCODER_H_
13
14 #include <memory>
15 #include <string>
16 #include <vector>
17
18 #include "webrtc/api/array_view.h"
19 #include "webrtc/api/rtpparameters.h"
20 #include "webrtc/common_types.h"
21 #include "webrtc/rtc_base/platform_file.h"
22
23 namespace webrtc {
24
25 // Forward declaration of storage class that is automatically generated from
26 // the protobuf file.
27 namespace rtclog {
28 class EventStream;
29
30 struct StreamConfig {
31 uint32_t local_ssrc = 0;
32 uint32_t remote_ssrc = 0;
33 uint32_t rtx_ssrc = 0;
34 std::string rsid;
35
36 bool remb = false;
37 std::vector<RtpExtension> rtp_extensions;
38
39 RtcpMode rtcp_mode = RtcpMode::kReducedSize;
40
41 struct Codec {
42 Codec(const std::string& payload_name,
43 int payload_type,
44 int rtx_payload_type)
45 : payload_name(payload_name),
46 payload_type(payload_type),
47 rtx_payload_type(rtx_payload_type) {}
48
49 std::string payload_name;
50 int payload_type;
51 int rtx_payload_type;
52 };
53 std::vector<Codec> codecs;
54 };
55
56 } // namespace rtclog
57
58 struct AudioEncoderRuntimeConfig;
59 class RtpPacketReceived;
60 class RtpPacketToSend;
61 enum class BandwidthUsage;
62
63 enum PacketDirection { kIncomingPacket = 0, kOutgoingPacket };
64
65 enum ProbeFailureReason {
66 kInvalidSendReceiveInterval,
67 kInvalidSendReceiveRatio,
68 kTimeout
69 };
70
71 class RtcEventLogEncoder {
72 public:
73 virtual ~RtcEventLogEncoder() = default;
74
75 virtual void LoggingStart() = 0;
76 virtual void LoggingStopped() = 0;
77 virtual void VideoReceiveStreamConfig(const rtclog::StreamConfig& config) = 0;
78 virtual void VideoSendStreamConfig(const rtclog::StreamConfig& config) = 0;
79 virtual void AudioReceiveStreamConfig(const rtclog::StreamConfig& config) = 0;
80 virtual void AudioSendStreamConfig(const rtclog::StreamConfig& config) = 0;
81 virtual void RtpHeader(PacketDirection direction,
82 const uint8_t* header,
83 size_t packet_length) = 0;
84 virtual void RtpHeader(PacketDirection direction,
85 const uint8_t* header,
86 size_t packet_length,
87 int probe_cluster_id) = 0;
88 virtual void IncomingRtpHeader(const RtpPacketReceived& packet) = 0;
89 virtual void OutgoingRtpHeader(const RtpPacketToSend& packet,
90 int probe_cluster_id) = 0;
91 virtual void RtcpPacket(PacketDirection direction,
92 const uint8_t* packet,
93 size_t length) = 0;
94 virtual void IncomingRtcpPacket(rtc::ArrayView<const uint8_t> packet) = 0;
95 virtual void OutgoingRtcpPacket(rtc::ArrayView<const uint8_t> packet) = 0;
96 virtual void AudioPlayout(uint32_t ssrc) = 0;
97 virtual void LossBasedBweUpdate(int32_t bitrate_bps,
98 uint8_t fraction_loss,
99 int32_t total_packets) = 0;
100 virtual void DelayBasedBweUpdate(int32_t bitrate_bps,
101 BandwidthUsage detector_state) = 0;
102 virtual void AudioNetworkAdaptation(
103 const AudioEncoderRuntimeConfig& config) = 0;
104 virtual void ProbeClusterCreated(int id,
105 int bitrate_bps,
106 int min_probes,
107 int min_bytes) = 0;
108 virtual void ProbeResultSuccess(int id, int bitrate_bps) = 0;
109 virtual void ProbeResultFailure(int id,
110 ProbeFailureReason failure_reason) = 0;
111 };
112
113 } // namespace webrtc
114
115 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_ENCODER_RTC_EVENT_LOG_ENCODER_H_
OLDNEW
« no previous file with comments | « webrtc/logging/BUILD.gn ('k') | webrtc/logging/rtc_event_log/encoder/rtc_event_log_encoder_legacy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698