OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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_MOCK_MOCK_RTC_EVENT_LOG_H_ | 11 #ifndef WEBRTC_LOGGING_RTC_EVENT_LOG_MOCK_MOCK_RTC_EVENT_LOG_H_ |
12 #define WEBRTC_LOGGING_RTC_EVENT_LOG_MOCK_MOCK_RTC_EVENT_LOG_H_ | 12 #define WEBRTC_LOGGING_RTC_EVENT_LOG_MOCK_MOCK_RTC_EVENT_LOG_H_ |
13 | 13 |
14 #include <string> | 14 #include <string> |
15 | 15 |
16 #include "webrtc/logging/rtc_event_log/rtc_event_log.h" | 16 #include "webrtc/logging/rtc_event_log/rtc_event_log.h" |
17 #include "webrtc/logging/rtc_event_log/rtc_stream_config.h" | 17 #include "webrtc/logging/rtc_event_log/rtc_stream_config.h" |
18 #include "webrtc/modules/audio_coding/audio_network_adaptor/include/audio_networ
k_adaptor.h" | 18 #include "webrtc/modules/audio_coding/audio_network_adaptor/include/audio_networ
k_adaptor.h" |
| 19 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_received.h" |
| 20 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_to_send.h" |
19 #include "webrtc/test/gmock.h" | 21 #include "webrtc/test/gmock.h" |
20 | 22 |
21 namespace webrtc { | 23 namespace webrtc { |
22 | 24 |
23 class MockRtcEventLog : public RtcEventLog { | 25 class MockRtcEventLog : public RtcEventLog { |
24 public: | 26 public: |
25 MOCK_METHOD2(StartLogging, | 27 MOCK_METHOD2(StartLogging, |
26 bool(const std::string& file_name, int64_t max_size_bytes)); | 28 bool(const std::string& file_name, int64_t max_size_bytes)); |
27 | 29 |
28 MOCK_METHOD2(StartLogging, | 30 MOCK_METHOD2(StartLogging, |
29 bool(rtc::PlatformFile log_file, int64_t max_size_bytes)); | 31 bool(rtc::PlatformFile log_file, int64_t max_size_bytes)); |
30 | 32 |
31 MOCK_METHOD0(StopLogging, void()); | 33 MOCK_METHOD0(StopLogging, void()); |
32 | 34 |
33 MOCK_METHOD1(LogVideoReceiveStreamConfig, | 35 MOCK_METHOD1(LogVideoReceiveStreamConfig, |
34 void(const rtclog::StreamConfig& config)); | 36 void(const rtclog::StreamConfig& config)); |
35 | 37 |
36 MOCK_METHOD1(LogVideoSendStreamConfig, | 38 MOCK_METHOD1(LogVideoSendStreamConfig, |
37 void(const rtclog::StreamConfig& config)); | 39 void(const rtclog::StreamConfig& config)); |
38 | 40 |
39 MOCK_METHOD1(LogAudioReceiveStreamConfig, | 41 MOCK_METHOD1(LogAudioReceiveStreamConfig, |
40 void(const rtclog::StreamConfig& config)); | 42 void(const rtclog::StreamConfig& config)); |
41 | 43 |
42 MOCK_METHOD1(LogAudioSendStreamConfig, | 44 MOCK_METHOD1(LogAudioSendStreamConfig, |
43 void(const rtclog::StreamConfig& config)); | 45 void(const rtclog::StreamConfig& config)); |
44 | 46 |
45 MOCK_METHOD3(LogRtpHeader, | 47 MOCK_METHOD1(LogIncomingRtpHeader, void(const RtpPacketReceived& packet)); |
46 void(PacketDirection direction, | |
47 const uint8_t* header, | |
48 size_t packet_length)); | |
49 | 48 |
50 MOCK_METHOD4(LogRtpHeader, | 49 MOCK_METHOD2(LogOutgoingRtpHeader, |
51 void(PacketDirection direction, | 50 void(const RtpPacketToSend& packet, int probe_cluster_id)); |
52 const uint8_t* header, | |
53 size_t packet_length, | |
54 int probe_cluster_id)); | |
55 | 51 |
56 MOCK_METHOD3(LogRtcpPacket, | 52 MOCK_METHOD1(LogIncomingRtcpPacket, |
57 void(PacketDirection direction, | 53 void(rtc::ArrayView<const uint8_t> packet)); |
58 const uint8_t* packet, | 54 |
59 size_t length)); | 55 MOCK_METHOD1(LogOutgoingRtcpPacket, |
| 56 void(rtc::ArrayView<const uint8_t> packet)); |
60 | 57 |
61 MOCK_METHOD1(LogAudioPlayout, void(uint32_t ssrc)); | 58 MOCK_METHOD1(LogAudioPlayout, void(uint32_t ssrc)); |
62 | 59 |
63 MOCK_METHOD3(LogLossBasedBweUpdate, | 60 MOCK_METHOD3(LogLossBasedBweUpdate, |
64 void(int32_t bitrate_bps, | 61 void(int32_t bitrate_bps, |
65 uint8_t fraction_loss, | 62 uint8_t fraction_loss, |
66 int32_t total_packets)); | 63 int32_t total_packets)); |
67 | 64 |
68 MOCK_METHOD2(LogDelayBasedBweUpdate, | 65 MOCK_METHOD2(LogDelayBasedBweUpdate, |
69 void(int32_t bitrate_bps, BandwidthUsage detector_state)); | 66 void(int32_t bitrate_bps, BandwidthUsage detector_state)); |
70 | 67 |
71 MOCK_METHOD1(LogAudioNetworkAdaptation, | 68 MOCK_METHOD1(LogAudioNetworkAdaptation, |
72 void(const AudioEncoderRuntimeConfig& config)); | 69 void(const AudioEncoderRuntimeConfig& config)); |
73 | 70 |
74 MOCK_METHOD4(LogProbeClusterCreated, | 71 MOCK_METHOD4(LogProbeClusterCreated, |
75 void(int id, int bitrate_bps, int min_probes, int min_bytes)); | 72 void(int id, int bitrate_bps, int min_probes, int min_bytes)); |
76 | 73 |
77 MOCK_METHOD2(LogProbeResultSuccess, void(int id, int bitrate_bps)); | 74 MOCK_METHOD2(LogProbeResultSuccess, void(int id, int bitrate_bps)); |
78 MOCK_METHOD2(LogProbeResultFailure, | 75 MOCK_METHOD2(LogProbeResultFailure, |
79 void(int id, ProbeFailureReason failure_reason)); | 76 void(int id, ProbeFailureReason failure_reason)); |
80 }; | 77 }; |
81 | 78 |
82 } // namespace webrtc | 79 } // namespace webrtc |
83 | 80 |
84 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_MOCK_MOCK_RTC_EVENT_LOG_H_ | 81 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_MOCK_MOCK_RTC_EVENT_LOG_H_ |
OLD | NEW |