Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 #ifndef WEBRTC_CALL_H_ | 10 #ifndef WEBRTC_CALL_H_ |
| 11 #define WEBRTC_CALL_H_ | 11 #define WEBRTC_CALL_H_ |
| 12 | 12 |
| 13 #include <string> | 13 #include <string> |
| 14 #include <vector> | 14 #include <vector> |
| 15 | 15 |
| 16 #include "webrtc/api/call/audio_receive_stream.h" | 16 #include "webrtc/api/call/audio_receive_stream.h" |
| 17 #include "webrtc/api/call/audio_send_stream.h" | 17 #include "webrtc/api/call/audio_send_stream.h" |
| 18 #include "webrtc/api/call/audio_state.h" | 18 #include "webrtc/api/call/audio_state.h" |
| 19 #include "webrtc/base/networkroute.h" | 19 #include "webrtc/base/networkroute.h" |
| 20 #include "webrtc/base/platform_file.h" | 20 #include "webrtc/base/platform_file.h" |
| 21 #include "webrtc/base/socket.h" | 21 #include "webrtc/base/socket.h" |
| 22 #include "webrtc/common_types.h" | 22 #include "webrtc/common_types.h" |
| 23 #include "webrtc/video_receive_stream.h" | 23 #include "webrtc/video_receive_stream.h" |
| 24 #include "webrtc/video_send_stream.h" | 24 #include "webrtc/video_send_stream.h" |
| 25 | 25 |
| 26 namespace webrtc { | 26 namespace webrtc { |
| 27 | 27 |
| 28 class AudioProcessing; | 28 class AudioProcessing; |
| 29 class RtcEventLog; | |
| 29 | 30 |
| 30 const char* Version(); | 31 const char* Version(); |
| 31 | 32 |
| 32 enum class MediaType { | 33 enum class MediaType { |
| 33 ANY, | 34 ANY, |
| 34 AUDIO, | 35 AUDIO, |
| 35 VIDEO, | 36 VIDEO, |
| 36 DATA | 37 DATA |
| 37 }; | 38 }; |
| 38 | 39 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 82 int max_bitrate_bps = -1; | 83 int max_bitrate_bps = -1; |
| 83 } bitrate_config; | 84 } bitrate_config; |
| 84 | 85 |
| 85 // AudioState which is possibly shared between multiple calls. | 86 // AudioState which is possibly shared between multiple calls. |
| 86 // TODO(solenberg): Change this to a shared_ptr once we can use C++11. | 87 // TODO(solenberg): Change this to a shared_ptr once we can use C++11. |
| 87 rtc::scoped_refptr<AudioState> audio_state; | 88 rtc::scoped_refptr<AudioState> audio_state; |
| 88 | 89 |
| 89 // Audio Processing Module to be used in this call. | 90 // Audio Processing Module to be used in this call. |
| 90 // TODO(solenberg): Change this to a shared_ptr once we can use C++11. | 91 // TODO(solenberg): Change this to a shared_ptr once we can use C++11. |
| 91 AudioProcessing* audio_processing = nullptr; | 92 AudioProcessing* audio_processing = nullptr; |
| 93 | |
| 94 // RtcEventLog to use for this call. Required. | |
| 95 // Use webrtc::RtcEventLog::CreateNull() for a null implementation. | |
| 96 RtcEventLog* event_log = nullptr; | |
| 97 | |
| 98 explicit Config(RtcEventLog* event_log) : event_log(event_log) { | |
| 99 RTC_DCHECK(event_log); | |
| 100 } | |
|
stefan-webrtc
2016/10/06 08:53:14
Move this to the top as methods and ctors usually
skvlad
2016/10/07 01:35:04
Done.
| |
| 92 }; | 101 }; |
| 93 | 102 |
| 94 struct Stats { | 103 struct Stats { |
| 95 std::string ToString(int64_t time_ms) const; | 104 std::string ToString(int64_t time_ms) const; |
| 96 | 105 |
| 97 int send_bandwidth_bps = 0; // Estimated available send bandwidth. | 106 int send_bandwidth_bps = 0; // Estimated available send bandwidth. |
| 98 int max_padding_bitrate_bps = 0; // Cumulative configured max padding. | 107 int max_padding_bitrate_bps = 0; // Cumulative configured max padding. |
| 99 int recv_bandwidth_bps = 0; // Estimated available receive bandwidth. | 108 int recv_bandwidth_bps = 0; // Estimated available receive bandwidth. |
| 100 int64_t pacer_delay_ms = 0; | 109 int64_t pacer_delay_ms = 0; |
| 101 int64_t rtt_ms = -1; | 110 int64_t rtt_ms = -1; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 144 // for each stream separately. Right now it's global per media type. | 153 // for each stream separately. Right now it's global per media type. |
| 145 virtual void SignalChannelNetworkState(MediaType media, | 154 virtual void SignalChannelNetworkState(MediaType media, |
| 146 NetworkState state) = 0; | 155 NetworkState state) = 0; |
| 147 | 156 |
| 148 virtual void OnNetworkRouteChanged( | 157 virtual void OnNetworkRouteChanged( |
| 149 const std::string& transport_name, | 158 const std::string& transport_name, |
| 150 const rtc::NetworkRoute& network_route) = 0; | 159 const rtc::NetworkRoute& network_route) = 0; |
| 151 | 160 |
| 152 virtual void OnSentPacket(const rtc::SentPacket& sent_packet) = 0; | 161 virtual void OnSentPacket(const rtc::SentPacket& sent_packet) = 0; |
| 153 | 162 |
| 154 virtual bool StartEventLog(rtc::PlatformFile log_file, | |
| 155 int64_t max_size_bytes) = 0; | |
| 156 virtual void StopEventLog() = 0; | |
| 157 | |
| 158 virtual ~Call() {} | 163 virtual ~Call() {} |
| 159 }; | 164 }; |
| 160 | 165 |
| 161 } // namespace webrtc | 166 } // namespace webrtc |
| 162 | 167 |
| 163 #endif // WEBRTC_CALL_H_ | 168 #endif // WEBRTC_CALL_H_ |
| OLD | NEW |