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_ |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 27 | 27 |
| 28 const char* Version(); | 28 const char* Version(); |
| 29 | 29 |
| 30 enum class MediaType { | 30 enum class MediaType { |
| 31 ANY, | 31 ANY, |
| 32 AUDIO, | 32 AUDIO, |
| 33 VIDEO, | 33 VIDEO, |
| 34 DATA | 34 DATA |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 enum class ChannelNetworkState | |
|
the sun
2016/03/04 12:40:48
I don't think you need this enum. The CHANNEL_NOT_
| |
| 38 { | |
| 39 CHANNEL_NOT_PRESENT, | |
| 40 CHANNEL_NETWORK_DOWN, | |
| 41 CHANNEL_NETWORK_UP | |
| 42 }; | |
| 43 | |
| 44 NetworkState ChannelStateToNetworkState(ChannelNetworkState channelState); | |
| 45 NetworkState AggregateNetworkState(ChannelNetworkState channelA, | |
| 46 ChannelNetworkState channelB); | |
| 47 | |
| 37 class PacketReceiver { | 48 class PacketReceiver { |
| 38 public: | 49 public: |
| 39 enum DeliveryStatus { | 50 enum DeliveryStatus { |
| 40 DELIVERY_OK, | 51 DELIVERY_OK, |
| 41 DELIVERY_UNKNOWN_SSRC, | 52 DELIVERY_UNKNOWN_SSRC, |
| 42 DELIVERY_PACKET_ERROR, | 53 DELIVERY_PACKET_ERROR, |
| 43 }; | 54 }; |
| 44 | 55 |
| 45 virtual DeliveryStatus DeliverPacket(MediaType media_type, | 56 virtual DeliveryStatus DeliverPacket(MediaType media_type, |
| 46 const uint8_t* packet, | 57 const uint8_t* packet, |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 126 // pacing delay, etc. | 137 // pacing delay, etc. |
| 127 virtual Stats GetStats() const = 0; | 138 virtual Stats GetStats() const = 0; |
| 128 | 139 |
| 129 // TODO(pbos): Like BitrateConfig above this is currently per-stream instead | 140 // TODO(pbos): Like BitrateConfig above this is currently per-stream instead |
| 130 // of maximum for entire Call. This should be fixed along with the above. | 141 // of maximum for entire Call. This should be fixed along with the above. |
| 131 // Specifying a start bitrate (>0) will currently reset the current bitrate | 142 // Specifying a start bitrate (>0) will currently reset the current bitrate |
| 132 // estimate. This is due to how the 'x-google-start-bitrate' flag is currently | 143 // estimate. This is due to how the 'x-google-start-bitrate' flag is currently |
| 133 // implemented. | 144 // implemented. |
| 134 virtual void SetBitrateConfig( | 145 virtual void SetBitrateConfig( |
| 135 const Config::BitrateConfig& bitrate_config) = 0; | 146 const Config::BitrateConfig& bitrate_config) = 0; |
| 136 virtual void SignalNetworkState(NetworkState state) = 0; | 147 |
| 148 virtual void SignalChannelNetworkState(MediaType media, | |
| 149 ChannelNetworkState state) = 0; | |
| 137 | 150 |
| 138 virtual void OnSentPacket(const rtc::SentPacket& sent_packet) = 0; | 151 virtual void OnSentPacket(const rtc::SentPacket& sent_packet) = 0; |
| 139 | 152 |
| 140 virtual ~Call() {} | 153 virtual ~Call() {} |
| 141 }; | 154 }; |
| 142 | 155 |
| 143 } // namespace webrtc | 156 } // namespace webrtc |
| 144 | 157 |
| 145 #endif // WEBRTC_CALL_H_ | 158 #endif // WEBRTC_CALL_H_ |
| OLD | NEW |