pbos@webrtc.org | dc8c883 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2013 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 | |
pbos@webrtc.org | b581c90 | 2013-10-28 16:32:01 +0000 | [diff] [blame] | 11 | #include "webrtc/video/video_send_stream.h" |
pbos@webrtc.org | dc8c883 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 12 | |
henrik.lundin@webrtc.org | ce21c82 | 2013-10-23 11:04:57 +0000 | [diff] [blame] | 13 | #include <string> |
pbos@webrtc.org | dc8c883 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 14 | #include <vector> |
| 15 | |
| 16 | #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" |
| 17 | #include "webrtc/video_engine/include/vie_base.h" |
| 18 | #include "webrtc/video_engine/include/vie_capture.h" |
| 19 | #include "webrtc/video_engine/include/vie_codec.h" |
stefan@webrtc.org | a0a91d8 | 2013-08-22 09:29:56 +0000 | [diff] [blame] | 20 | #include "webrtc/video_engine/include/vie_external_codec.h" |
pbos@webrtc.org | 3ba57eb | 2013-10-21 10:34:43 +0000 | [diff] [blame] | 21 | #include "webrtc/video_engine/include/vie_image_process.h" |
pbos@webrtc.org | dc8c883 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 22 | #include "webrtc/video_engine/include/vie_network.h" |
| 23 | #include "webrtc/video_engine/include/vie_rtp_rtcp.h" |
pbos@webrtc.org | b581c90 | 2013-10-28 16:32:01 +0000 | [diff] [blame] | 24 | #include "webrtc/video_send_stream.h" |
pbos@webrtc.org | dc8c883 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 25 | |
| 26 | namespace webrtc { |
| 27 | namespace internal { |
| 28 | |
pbos@webrtc.org | 12d5ede | 2013-07-09 08:02:33 +0000 | [diff] [blame] | 29 | VideoSendStream::VideoSendStream(newapi::Transport* transport, |
asapersson@webrtc.org | 4b1817f | 2014-01-31 10:05:07 +0000 | [diff] [blame] | 30 | CpuOveruseObserver* overuse_observer, |
pbos@webrtc.org | 12d5ede | 2013-07-09 08:02:33 +0000 | [diff] [blame] | 31 | webrtc::VideoEngine* video_engine, |
mflodman@webrtc.org | e4d538a | 2013-12-13 09:40:45 +0000 | [diff] [blame] | 32 | const VideoSendStream::Config& config, |
| 33 | int base_channel) |
pbos@webrtc.org | 8f2997c | 2013-11-14 08:58:14 +0000 | [diff] [blame] | 34 | : transport_adapter_(transport), |
sprang@webrtc.org | 4a9843f | 2013-11-26 11:41:59 +0000 | [diff] [blame] | 35 | encoded_frame_proxy_(config.post_encode_callback), |
pbos@webrtc.org | 8f2997c | 2013-11-14 08:58:14 +0000 | [diff] [blame] | 36 | codec_lock_(CriticalSectionWrapper::CreateCriticalSection()), |
| 37 | config_(config), |
mflodman@webrtc.org | e4d538a | 2013-12-13 09:40:45 +0000 | [diff] [blame] | 38 | external_codec_(NULL), |
| 39 | channel_(-1) { |
pbos@webrtc.org | dc8c883 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 40 | video_engine_base_ = ViEBase::GetInterface(video_engine); |
mflodman@webrtc.org | e4d538a | 2013-12-13 09:40:45 +0000 | [diff] [blame] | 41 | video_engine_base_->CreateChannel(channel_, base_channel); |
pbos@webrtc.org | dc8c883 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 42 | assert(channel_ != -1); |
| 43 | |
| 44 | rtp_rtcp_ = ViERTP_RTCP::GetInterface(video_engine); |
| 45 | assert(rtp_rtcp_ != NULL); |
| 46 | |
pbos@webrtc.org | 8f2997c | 2013-11-14 08:58:14 +0000 | [diff] [blame] | 47 | assert(config_.rtp.ssrcs.size() > 0); |
henrik.lundin@webrtc.org | d7d60c8 | 2013-11-21 14:05:40 +0000 | [diff] [blame] | 48 | if (config_.suspend_below_min_bitrate) |
| 49 | config_.pacing = true; |
stefan@webrtc.org | a0a91d8 | 2013-08-22 09:29:56 +0000 | [diff] [blame] | 50 | rtp_rtcp_->SetTransmissionSmoothingStatus(channel_, config_.pacing); |
pbos@webrtc.org | 905cebd | 2013-09-11 10:14:56 +0000 | [diff] [blame] | 51 | |
| 52 | for (size_t i = 0; i < config_.rtp.extensions.size(); ++i) { |
| 53 | const std::string& extension = config_.rtp.extensions[i].name; |
| 54 | int id = config_.rtp.extensions[i].id; |
pbos@webrtc.org | 60108c2 | 2013-11-20 11:48:56 +0000 | [diff] [blame] | 55 | if (extension == RtpExtension::kTOffset) { |
pbos@webrtc.org | 905cebd | 2013-09-11 10:14:56 +0000 | [diff] [blame] | 56 | if (rtp_rtcp_->SetSendTimestampOffsetStatus(channel_, true, id) != 0) |
| 57 | abort(); |
pbos@webrtc.org | 60108c2 | 2013-11-20 11:48:56 +0000 | [diff] [blame] | 58 | } else if (extension == RtpExtension::kAbsSendTime) { |
pbos@webrtc.org | e22b761 | 2013-09-11 19:00:39 +0000 | [diff] [blame] | 59 | if (rtp_rtcp_->SetSendAbsoluteSendTimeStatus(channel_, true, id) != 0) |
| 60 | abort(); |
pbos@webrtc.org | 905cebd | 2013-09-11 10:14:56 +0000 | [diff] [blame] | 61 | } else { |
| 62 | abort(); // Unsupported extension. |
| 63 | } |
| 64 | } |
pbos@webrtc.org | dc8c883 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 65 | |
mflodman@webrtc.org | ab6ccbc | 2013-12-13 16:36:28 +0000 | [diff] [blame] | 66 | rtp_rtcp_->SetRembStatus(channel_, true, false); |
| 67 | |
pbos@webrtc.org | aa693dd | 2013-09-20 11:56:26 +0000 | [diff] [blame] | 68 | // Enable NACK, FEC or both. |
| 69 | if (config_.rtp.fec.red_payload_type != -1) { |
| 70 | assert(config_.rtp.fec.ulpfec_payload_type != -1); |
| 71 | if (config_.rtp.nack.rtp_history_ms > 0) { |
| 72 | rtp_rtcp_->SetHybridNACKFECStatus( |
| 73 | channel_, |
| 74 | true, |
| 75 | static_cast<unsigned char>(config_.rtp.fec.red_payload_type), |
| 76 | static_cast<unsigned char>(config_.rtp.fec.ulpfec_payload_type)); |
| 77 | } else { |
| 78 | rtp_rtcp_->SetFECStatus( |
| 79 | channel_, |
| 80 | true, |
| 81 | static_cast<unsigned char>(config_.rtp.fec.red_payload_type), |
| 82 | static_cast<unsigned char>(config_.rtp.fec.ulpfec_payload_type)); |
| 83 | } |
| 84 | } else { |
| 85 | rtp_rtcp_->SetNACKStatus(channel_, config_.rtp.nack.rtp_history_ms > 0); |
| 86 | } |
| 87 | |
pbos@webrtc.org | debc672 | 2013-08-22 09:42:17 +0000 | [diff] [blame] | 88 | char rtcp_cname[ViERTP_RTCP::KMaxRTCPCNameLength]; |
| 89 | assert(config_.rtp.c_name.length() < ViERTP_RTCP::KMaxRTCPCNameLength); |
| 90 | strncpy(rtcp_cname, config_.rtp.c_name.c_str(), sizeof(rtcp_cname) - 1); |
| 91 | rtcp_cname[sizeof(rtcp_cname) - 1] = '\0'; |
| 92 | |
| 93 | rtp_rtcp_->SetRTCPCName(channel_, rtcp_cname); |
| 94 | |
pbos@webrtc.org | dc8c883 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 95 | capture_ = ViECapture::GetInterface(video_engine); |
| 96 | capture_->AllocateExternalCaptureDevice(capture_id_, external_capture_); |
| 97 | capture_->ConnectCaptureDevice(capture_id_, channel_); |
| 98 | |
| 99 | network_ = ViENetwork::GetInterface(video_engine); |
| 100 | assert(network_ != NULL); |
| 101 | |
pbos@webrtc.org | 26d75f3 | 2013-09-18 11:52:42 +0000 | [diff] [blame] | 102 | network_->RegisterSendTransport(channel_, transport_adapter_); |
sprang@webrtc.org | 6133dd5 | 2013-10-16 13:29:14 +0000 | [diff] [blame] | 103 | // 28 to match packet overhead in ModuleRtpRtcpImpl. |
pbos@webrtc.org | b581c90 | 2013-10-28 16:32:01 +0000 | [diff] [blame] | 104 | network_->SetMTU(channel_, |
| 105 | static_cast<unsigned int>(config_.rtp.max_packet_size + 28)); |
pbos@webrtc.org | dc8c883 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 106 | |
stefan@webrtc.org | a0a91d8 | 2013-08-22 09:29:56 +0000 | [diff] [blame] | 107 | if (config.encoder) { |
| 108 | external_codec_ = ViEExternalCodec::GetInterface(video_engine); |
pbos@webrtc.org | c766775 | 2014-01-24 09:30:53 +0000 | [diff] [blame] | 109 | if (external_codec_->RegisterExternalSendCodec(channel_, |
| 110 | config.codec.plType, |
| 111 | config.encoder, |
| 112 | config.internal_source) != |
| 113 | 0) { |
stefan@webrtc.org | a0a91d8 | 2013-08-22 09:29:56 +0000 | [diff] [blame] | 114 | abort(); |
| 115 | } |
| 116 | } |
| 117 | |
pbos@webrtc.org | dc8c883 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 118 | codec_ = ViECodec::GetInterface(video_engine); |
pbos@webrtc.org | 8f2997c | 2013-11-14 08:58:14 +0000 | [diff] [blame] | 119 | if (!SetCodec(config_.codec)) |
pbos@webrtc.org | dc8c883 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 120 | abort(); |
mflodman@webrtc.org | ecbeb2b | 2013-07-23 11:35:00 +0000 | [diff] [blame] | 121 | |
asapersson@webrtc.org | 4b1817f | 2014-01-31 10:05:07 +0000 | [diff] [blame] | 122 | if (overuse_observer) { |
| 123 | video_engine_base_->RegisterCpuOveruseObserver(channel_, overuse_observer); |
mflodman@webrtc.org | ecbeb2b | 2013-07-23 11:35:00 +0000 | [diff] [blame] | 124 | } |
pbos@webrtc.org | 3ba57eb | 2013-10-21 10:34:43 +0000 | [diff] [blame] | 125 | |
| 126 | image_process_ = ViEImageProcess::GetInterface(video_engine); |
| 127 | image_process_->RegisterPreEncodeCallback(channel_, |
| 128 | config_.pre_encode_callback); |
sprang@webrtc.org | 4a9843f | 2013-11-26 11:41:59 +0000 | [diff] [blame] | 129 | if (config_.post_encode_callback) { |
| 130 | image_process_->RegisterPostEncodeImageCallback(channel_, |
| 131 | &encoded_frame_proxy_); |
| 132 | } |
henrik.lundin@webrtc.org | ce21c82 | 2013-10-23 11:04:57 +0000 | [diff] [blame] | 133 | |
henrik.lundin@webrtc.org | 8fdf191 | 2013-11-18 12:18:43 +0000 | [diff] [blame] | 134 | if (config.suspend_below_min_bitrate) { |
| 135 | codec_->SuspendBelowMinBitrate(channel_); |
henrik.lundin@webrtc.org | ce21c82 | 2013-10-23 11:04:57 +0000 | [diff] [blame] | 136 | } |
sprang@webrtc.org | ca72300 | 2014-01-07 09:54:34 +0000 | [diff] [blame] | 137 | |
pbos@webrtc.org | c766775 | 2014-01-24 09:30:53 +0000 | [diff] [blame] | 138 | stats_proxy_.reset(new SendStatisticsProxy(config, this)); |
sprang@webrtc.org | ca72300 | 2014-01-07 09:54:34 +0000 | [diff] [blame] | 139 | |
| 140 | rtp_rtcp_->RegisterSendChannelRtcpStatisticsCallback(channel_, |
| 141 | stats_proxy_.get()); |
| 142 | rtp_rtcp_->RegisterSendChannelRtpStatisticsCallback(channel_, |
| 143 | stats_proxy_.get()); |
| 144 | rtp_rtcp_->RegisterSendBitrateObserver(channel_, stats_proxy_.get()); |
| 145 | rtp_rtcp_->RegisterSendFrameCountObserver(channel_, stats_proxy_.get()); |
| 146 | |
| 147 | codec_->RegisterEncoderObserver(channel_, *stats_proxy_); |
| 148 | capture_->RegisterObserver(capture_id_, *stats_proxy_); |
pbos@webrtc.org | dc8c883 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 149 | } |
| 150 | |
| 151 | VideoSendStream::~VideoSendStream() { |
sprang@webrtc.org | ca72300 | 2014-01-07 09:54:34 +0000 | [diff] [blame] | 152 | capture_->DeregisterObserver(capture_id_); |
| 153 | codec_->DeregisterEncoderObserver(channel_); |
| 154 | |
| 155 | rtp_rtcp_->DeregisterSendFrameCountObserver(channel_, stats_proxy_.get()); |
| 156 | rtp_rtcp_->DeregisterSendBitrateObserver(channel_, stats_proxy_.get()); |
| 157 | rtp_rtcp_->DeregisterSendChannelRtpStatisticsCallback(channel_, |
| 158 | stats_proxy_.get()); |
| 159 | rtp_rtcp_->DeregisterSendChannelRtcpStatisticsCallback(channel_, |
| 160 | stats_proxy_.get()); |
| 161 | |
pbos@webrtc.org | 3ba57eb | 2013-10-21 10:34:43 +0000 | [diff] [blame] | 162 | image_process_->DeRegisterPreEncodeCallback(channel_); |
| 163 | |
pbos@webrtc.org | dc8c883 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 164 | network_->DeregisterSendTransport(channel_); |
pbos@webrtc.org | dc8c883 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 165 | |
| 166 | capture_->DisconnectCaptureDevice(channel_); |
| 167 | capture_->ReleaseCaptureDevice(capture_id_); |
| 168 | |
stefan@webrtc.org | a0a91d8 | 2013-08-22 09:29:56 +0000 | [diff] [blame] | 169 | if (external_codec_) { |
| 170 | external_codec_->DeRegisterExternalSendCodec(channel_, |
| 171 | config_.codec.plType); |
| 172 | } |
| 173 | |
pbos@webrtc.org | 3ba57eb | 2013-10-21 10:34:43 +0000 | [diff] [blame] | 174 | video_engine_base_->DeleteChannel(channel_); |
| 175 | |
| 176 | image_process_->Release(); |
pbos@webrtc.org | dc8c883 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 177 | video_engine_base_->Release(); |
| 178 | capture_->Release(); |
| 179 | codec_->Release(); |
stefan@webrtc.org | a0a91d8 | 2013-08-22 09:29:56 +0000 | [diff] [blame] | 180 | if (external_codec_) |
| 181 | external_codec_->Release(); |
pbos@webrtc.org | dc8c883 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 182 | network_->Release(); |
| 183 | rtp_rtcp_->Release(); |
| 184 | } |
| 185 | |
pbos@webrtc.org | 7123a80 | 2013-12-11 16:26:16 +0000 | [diff] [blame] | 186 | void VideoSendStream::PutFrame(const I420VideoFrame& frame) { |
| 187 | input_frame_.CopyFrame(frame); |
| 188 | SwapFrame(&input_frame_); |
| 189 | } |
pbos@webrtc.org | dc8c883 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 190 | |
pbos@webrtc.org | 7123a80 | 2013-12-11 16:26:16 +0000 | [diff] [blame] | 191 | void VideoSendStream::SwapFrame(I420VideoFrame* frame) { |
| 192 | // TODO(pbos): Warn if frame is "too far" into the future, or too old. This |
| 193 | // would help detect if frame's being used without NTP. |
| 194 | // TO REVIEWER: Is there any good check for this? Should it be |
| 195 | // skipped? |
| 196 | if (frame != &input_frame_) |
| 197 | input_frame_.SwapFrame(frame); |
pbos@webrtc.org | dc8c883 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 198 | |
pbos@webrtc.org | 7123a80 | 2013-12-11 16:26:16 +0000 | [diff] [blame] | 199 | // TODO(pbos): Local rendering should not be done on the capture thread. |
| 200 | if (config_.local_renderer != NULL) |
| 201 | config_.local_renderer->RenderFrame(input_frame_, 0); |
pbos@webrtc.org | dc8c883 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 202 | |
pbos@webrtc.org | 7123a80 | 2013-12-11 16:26:16 +0000 | [diff] [blame] | 203 | external_capture_->SwapFrame(&input_frame_); |
pbos@webrtc.org | dc8c883 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 204 | } |
| 205 | |
pbos@webrtc.org | d8e92c9 | 2013-08-23 09:19:30 +0000 | [diff] [blame] | 206 | VideoSendStreamInput* VideoSendStream::Input() { return this; } |
pbos@webrtc.org | dc8c883 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 207 | |
pbos@webrtc.org | 48cc9dc | 2013-11-20 11:36:47 +0000 | [diff] [blame] | 208 | void VideoSendStream::StartSending() { |
sprang@webrtc.org | 48ac0da | 2014-01-27 13:03:02 +0000 | [diff] [blame] | 209 | transport_adapter_.Enable(); |
pbos@webrtc.org | df9f099 | 2014-01-10 18:47:32 +0000 | [diff] [blame] | 210 | video_engine_base_->StartSend(channel_); |
| 211 | video_engine_base_->StartReceive(channel_); |
pbos@webrtc.org | dc8c883 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 212 | } |
| 213 | |
pbos@webrtc.org | 48cc9dc | 2013-11-20 11:36:47 +0000 | [diff] [blame] | 214 | void VideoSendStream::StopSending() { |
pbos@webrtc.org | df9f099 | 2014-01-10 18:47:32 +0000 | [diff] [blame] | 215 | video_engine_base_->StopSend(channel_); |
| 216 | video_engine_base_->StopReceive(channel_); |
sprang@webrtc.org | 48ac0da | 2014-01-27 13:03:02 +0000 | [diff] [blame] | 217 | transport_adapter_.Disable(); |
pbos@webrtc.org | dc8c883 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 218 | } |
| 219 | |
pbos@webrtc.org | 8f2997c | 2013-11-14 08:58:14 +0000 | [diff] [blame] | 220 | bool VideoSendStream::SetCodec(const VideoCodec& codec) { |
pbos@webrtc.org | 9105cbd | 2013-11-28 11:59:31 +0000 | [diff] [blame] | 221 | assert(config_.rtp.ssrcs.size() >= codec.numberOfSimulcastStreams); |
pbos@webrtc.org | 8f2997c | 2013-11-14 08:58:14 +0000 | [diff] [blame] | 222 | |
| 223 | CriticalSectionScoped crit(codec_lock_.get()); |
| 224 | if (codec_->SetSendCodec(channel_, codec) != 0) |
| 225 | return false; |
| 226 | |
pbos@webrtc.org | 9105cbd | 2013-11-28 11:59:31 +0000 | [diff] [blame] | 227 | for (size_t i = 0; i < config_.rtp.ssrcs.size(); ++i) { |
| 228 | rtp_rtcp_->SetLocalSSRC(channel_, |
| 229 | config_.rtp.ssrcs[i], |
| 230 | kViEStreamTypeNormal, |
| 231 | static_cast<unsigned char>(i)); |
| 232 | } |
| 233 | |
pbos@webrtc.org | c766775 | 2014-01-24 09:30:53 +0000 | [diff] [blame] | 234 | if (&config_.codec != &codec) |
| 235 | config_.codec = codec; |
| 236 | |
pbos@webrtc.org | 9105cbd | 2013-11-28 11:59:31 +0000 | [diff] [blame] | 237 | if (config_.rtp.rtx.ssrcs.empty()) |
| 238 | return true; |
| 239 | |
| 240 | // Set up RTX. |
| 241 | assert(config_.rtp.rtx.ssrcs.size() == config_.rtp.ssrcs.size()); |
| 242 | for (size_t i = 0; i < config_.rtp.ssrcs.size(); ++i) { |
| 243 | rtp_rtcp_->SetLocalSSRC(channel_, |
| 244 | config_.rtp.rtx.ssrcs[i], |
| 245 | kViEStreamTypeRtx, |
| 246 | static_cast<unsigned char>(i)); |
| 247 | } |
| 248 | |
pbos@webrtc.org | c766775 | 2014-01-24 09:30:53 +0000 | [diff] [blame] | 249 | if (config_.rtp.rtx.payload_type != 0) |
| 250 | rtp_rtcp_->SetRtxSendPayloadType(channel_, config_.rtp.rtx.payload_type); |
pbos@webrtc.org | 9105cbd | 2013-11-28 11:59:31 +0000 | [diff] [blame] | 251 | |
pbos@webrtc.org | 8f2997c | 2013-11-14 08:58:14 +0000 | [diff] [blame] | 252 | return true; |
pbos@webrtc.org | dc8c883 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 253 | } |
| 254 | |
pbos@webrtc.org | 8f2997c | 2013-11-14 08:58:14 +0000 | [diff] [blame] | 255 | VideoCodec VideoSendStream::GetCodec() { |
| 256 | CriticalSectionScoped crit(codec_lock_.get()); |
| 257 | return config_.codec; |
pbos@webrtc.org | dc8c883 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 258 | } |
| 259 | |
pbos@webrtc.org | bf9bc32 | 2013-08-05 12:01:36 +0000 | [diff] [blame] | 260 | bool VideoSendStream::DeliverRtcp(const uint8_t* packet, size_t length) { |
| 261 | return network_->ReceivedRTCPPacket( |
pbos@webrtc.org | 30c741a | 2013-08-05 13:25:51 +0000 | [diff] [blame] | 262 | channel_, packet, static_cast<int>(length)) == 0; |
pbos@webrtc.org | bf9bc32 | 2013-08-05 12:01:36 +0000 | [diff] [blame] | 263 | } |
sprang@webrtc.org | ca72300 | 2014-01-07 09:54:34 +0000 | [diff] [blame] | 264 | |
| 265 | VideoSendStream::Stats VideoSendStream::GetStats() const { |
| 266 | return stats_proxy_->GetStats(); |
| 267 | } |
| 268 | |
| 269 | bool VideoSendStream::GetSendSideDelay(VideoSendStream::Stats* stats) { |
| 270 | return codec_->GetSendSideDelay( |
| 271 | channel_, &stats->avg_delay_ms, &stats->max_delay_ms); |
| 272 | } |
| 273 | |
| 274 | std::string VideoSendStream::GetCName() { |
| 275 | char rtcp_cname[ViERTP_RTCP::KMaxRTCPCNameLength]; |
| 276 | rtp_rtcp_->GetRTCPCName(channel_, rtcp_cname); |
| 277 | return rtcp_cname; |
| 278 | } |
| 279 | |
pbos@webrtc.org | dc8c883 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 280 | } // namespace internal |
| 281 | } // namespace webrtc |