blob: cd29d6273673e38ee6634ba46c6691ad302bad5a [file] [log] [blame]
pbos@webrtc.org29d58392013-05-16 12:08:03 +00001/*
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.org12dc1a32013-08-05 16:22:53 +000011#include <assert.h>
12#include <string.h>
13
pbos@webrtc.org29d58392013-05-16 12:08:03 +000014#include <map>
15#include <vector>
16
pbos@webrtc.org16e03b72013-10-28 16:32:01 +000017#include "webrtc/call.h"
stefan@webrtc.org7e9315b2013-12-04 10:24:26 +000018#include "webrtc/common.h"
pbos@webrtc.orgc49d5b72013-12-05 12:11:47 +000019#include "webrtc/config.h"
pbos@webrtc.org16e03b72013-10-28 16:32:01 +000020#include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
pbos@webrtc.orgde74b642013-10-02 13:36:09 +000021#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
pbos@webrtc.org16e03b72013-10-28 16:32:01 +000022#include "webrtc/system_wrappers/interface/rw_lock_wrapper.h"
pbos@webrtc.orgde74b642013-10-02 13:36:09 +000023#include "webrtc/system_wrappers/interface/scoped_ptr.h"
pbos@webrtc.orgde1429e2014-04-28 13:00:21 +000024#include "webrtc/system_wrappers/interface/thread_annotations.h"
pbos@webrtc.orgde74b642013-10-02 13:36:09 +000025#include "webrtc/system_wrappers/interface/trace.h"
pbos@webrtc.org16e03b72013-10-28 16:32:01 +000026#include "webrtc/video/video_receive_stream.h"
27#include "webrtc/video/video_send_stream.h"
pbos@webrtc.org29d58392013-05-16 12:08:03 +000028#include "webrtc/video_engine/include/vie_base.h"
29#include "webrtc/video_engine/include/vie_codec.h"
30#include "webrtc/video_engine/include/vie_rtp_rtcp.h"
pbos@webrtc.org29d58392013-05-16 12:08:03 +000031
32namespace webrtc {
pbos@webrtc.orgc49d5b72013-12-05 12:11:47 +000033const char* RtpExtension::kTOffset = "urn:ietf:params:rtp-hdrext:toffset";
34const char* RtpExtension::kAbsSendTime =
35 "http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time";
pbos@webrtc.org3c107582014-07-20 15:27:35 +000036
37bool RtpExtension::IsSupported(const std::string& name) {
38 return name == webrtc::RtpExtension::kTOffset ||
39 name == webrtc::RtpExtension::kAbsSendTime;
40}
41
pbos@webrtc.org16e03b72013-10-28 16:32:01 +000042namespace internal {
asapersson@webrtc.orgbdc5ed22014-01-31 10:05:07 +000043
44class CpuOveruseObserverProxy : public webrtc::CpuOveruseObserver {
45 public:
pbos@webrtc.orgdde16f12014-08-05 23:35:43 +000046 explicit CpuOveruseObserverProxy(OveruseCallback* overuse_callback)
asapersson@webrtc.orgbdc5ed22014-01-31 10:05:07 +000047 : crit_(CriticalSectionWrapper::CreateCriticalSection()),
48 overuse_callback_(overuse_callback) {
49 assert(overuse_callback != NULL);
50 }
51
52 virtual ~CpuOveruseObserverProxy() {}
53
54 virtual void OveruseDetected() OVERRIDE {
pbos@webrtc.orgde1429e2014-04-28 13:00:21 +000055 CriticalSectionScoped lock(crit_.get());
asapersson@webrtc.orgbdc5ed22014-01-31 10:05:07 +000056 overuse_callback_->OnOveruse();
57 }
58
59 virtual void NormalUsage() OVERRIDE {
pbos@webrtc.orgde1429e2014-04-28 13:00:21 +000060 CriticalSectionScoped lock(crit_.get());
asapersson@webrtc.orgbdc5ed22014-01-31 10:05:07 +000061 overuse_callback_->OnNormalUse();
62 }
63
64 private:
pbos@webrtc.orgde1429e2014-04-28 13:00:21 +000065 const scoped_ptr<CriticalSectionWrapper> crit_;
66 OveruseCallback* overuse_callback_ GUARDED_BY(crit_);
asapersson@webrtc.orgbdc5ed22014-01-31 10:05:07 +000067};
68
pbos@webrtc.org16e03b72013-10-28 16:32:01 +000069class Call : public webrtc::Call, public PacketReceiver {
70 public:
71 Call(webrtc::VideoEngine* video_engine, const Call::Config& config);
72 virtual ~Call();
73
74 virtual PacketReceiver* Receiver() OVERRIDE;
pbos@webrtc.org16e03b72013-10-28 16:32:01 +000075
pbos@webrtc.org5a636552013-11-20 10:40:25 +000076 virtual VideoSendStream* CreateVideoSendStream(
pbos@webrtc.org6ae48c62014-06-06 10:49:19 +000077 const VideoSendStream::Config& config,
78 const std::vector<VideoStream>& video_streams,
79 const void* encoder_settings) OVERRIDE;
pbos@webrtc.org16e03b72013-10-28 16:32:01 +000080
pbos@webrtc.org2c46f8d2013-11-21 13:49:43 +000081 virtual void DestroyVideoSendStream(webrtc::VideoSendStream* send_stream)
82 OVERRIDE;
pbos@webrtc.org16e03b72013-10-28 16:32:01 +000083
pbos@webrtc.org5a636552013-11-20 10:40:25 +000084 virtual VideoReceiveStream* CreateVideoReceiveStream(
pbos@webrtc.org16e03b72013-10-28 16:32:01 +000085 const VideoReceiveStream::Config& config) OVERRIDE;
86
pbos@webrtc.org2c46f8d2013-11-21 13:49:43 +000087 virtual void DestroyVideoReceiveStream(
pbos@webrtc.org16e03b72013-10-28 16:32:01 +000088 webrtc::VideoReceiveStream* receive_stream) OVERRIDE;
89
90 virtual uint32_t SendBitrateEstimate() OVERRIDE;
91 virtual uint32_t ReceiveBitrateEstimate() OVERRIDE;
92
pbos@webrtc.orgcaba2d22014-05-14 13:57:12 +000093 virtual DeliveryStatus DeliverPacket(const uint8_t* packet,
94 size_t length) OVERRIDE;
pbos@webrtc.org16e03b72013-10-28 16:32:01 +000095
96 private:
pbos@webrtc.orgcaba2d22014-05-14 13:57:12 +000097 DeliveryStatus DeliverRtcp(const uint8_t* packet, size_t length);
pbos@webrtc.orgaf38f4e2014-07-08 07:38:12 +000098 DeliveryStatus DeliverRtp(const uint8_t* packet, size_t length);
pbos@webrtc.org16e03b72013-10-28 16:32:01 +000099
100 Call::Config config_;
101
pbos@webrtc.orgde1429e2014-04-28 13:00:21 +0000102 std::map<uint32_t, VideoReceiveStream*> receive_ssrcs_
103 GUARDED_BY(receive_lock_);
pbos@webrtc.org16e03b72013-10-28 16:32:01 +0000104 scoped_ptr<RWLockWrapper> receive_lock_;
105
pbos@webrtc.orgde1429e2014-04-28 13:00:21 +0000106 std::map<uint32_t, VideoSendStream*> send_ssrcs_ GUARDED_BY(send_lock_);
pbos@webrtc.org16e03b72013-10-28 16:32:01 +0000107 scoped_ptr<RWLockWrapper> send_lock_;
108
asapersson@webrtc.orgbdc5ed22014-01-31 10:05:07 +0000109 scoped_ptr<CpuOveruseObserverProxy> overuse_observer_proxy_;
110
pbos@webrtc.org2bb1bda2014-07-07 13:06:48 +0000111 VideoSendStream::RtpStateMap suspended_send_ssrcs_;
112
mflodman@webrtc.orgf3973e82013-12-13 09:40:45 +0000113 VideoEngine* video_engine_;
pbos@webrtc.org16e03b72013-10-28 16:32:01 +0000114 ViERTP_RTCP* rtp_rtcp_;
115 ViECodec* codec_;
mflodman@webrtc.orgf3973e82013-12-13 09:40:45 +0000116 ViEBase* base_;
117 int base_channel_id_;
pbos@webrtc.org16e03b72013-10-28 16:32:01 +0000118
119 DISALLOW_COPY_AND_ASSIGN(Call);
120};
pbos@webrtc.orgc49d5b72013-12-05 12:11:47 +0000121} // namespace internal
pbos@webrtc.orgfd39e132013-08-14 13:52:52 +0000122
stefan@webrtc.org7e9315b2013-12-04 10:24:26 +0000123Call* Call::Create(const Call::Config& config) {
pbos@webrtc.orgc279a5d2014-01-24 09:30:53 +0000124 VideoEngine* video_engine = config.webrtc_config != NULL
125 ? VideoEngine::Create(*config.webrtc_config)
126 : VideoEngine::Create();
pbos@webrtc.orgfd39e132013-08-14 13:52:52 +0000127 assert(video_engine != NULL);
128
pbos@webrtc.org841c8a42013-09-09 15:04:25 +0000129 return new internal::Call(video_engine, config);
pbos@webrtc.orgfd39e132013-08-14 13:52:52 +0000130}
pbos@webrtc.orgfd39e132013-08-14 13:52:52 +0000131
pbos@webrtc.org29d58392013-05-16 12:08:03 +0000132namespace internal {
133
mflodman@webrtc.orgeb16b812014-06-16 08:57:39 +0000134const int kDefaultVideoStreamBitrateBps = 300000;
135
pbos@webrtc.org841c8a42013-09-09 15:04:25 +0000136Call::Call(webrtc::VideoEngine* video_engine, const Call::Config& config)
mflodman@webrtc.org6879c8a2013-07-23 11:35:00 +0000137 : config_(config),
pbos@webrtc.org1819fd72013-06-10 13:48:26 +0000138 receive_lock_(RWLockWrapper::CreateRWLock()),
139 send_lock_(RWLockWrapper::CreateRWLock()),
mflodman@webrtc.orgf3973e82013-12-13 09:40:45 +0000140 video_engine_(video_engine),
141 base_channel_id_(-1) {
pbos@webrtc.org29d58392013-05-16 12:08:03 +0000142 assert(video_engine != NULL);
mflodman@webrtc.org6879c8a2013-07-23 11:35:00 +0000143 assert(config.send_transport != NULL);
pbos@webrtc.org29d58392013-05-16 12:08:03 +0000144
asapersson@webrtc.orgbdc5ed22014-01-31 10:05:07 +0000145 if (config.overuse_callback) {
146 overuse_observer_proxy_.reset(
147 new CpuOveruseObserverProxy(config.overuse_callback));
148 }
149
pbos@webrtc.org29d58392013-05-16 12:08:03 +0000150 rtp_rtcp_ = ViERTP_RTCP::GetInterface(video_engine_);
151 assert(rtp_rtcp_ != NULL);
152
153 codec_ = ViECodec::GetInterface(video_engine_);
154 assert(codec_ != NULL);
mflodman@webrtc.orgf3973e82013-12-13 09:40:45 +0000155
156 // As a workaround for non-existing calls in the old API, create a base
157 // channel used as default channel when creating send and receive streams.
158 base_ = ViEBase::GetInterface(video_engine_);
159 assert(base_ != NULL);
160
161 base_->CreateChannel(base_channel_id_);
162 assert(base_channel_id_ != -1);
pbos@webrtc.org29d58392013-05-16 12:08:03 +0000163}
164
pbos@webrtc.org841c8a42013-09-09 15:04:25 +0000165Call::~Call() {
mflodman@webrtc.orgf3973e82013-12-13 09:40:45 +0000166 base_->DeleteChannel(base_channel_id_);
167 base_->Release();
pbos@webrtc.org29d58392013-05-16 12:08:03 +0000168 codec_->Release();
pbos@webrtc.orgfd39e132013-08-14 13:52:52 +0000169 rtp_rtcp_->Release();
170 webrtc::VideoEngine::Delete(video_engine_);
pbos@webrtc.org29d58392013-05-16 12:08:03 +0000171}
172
pbos@webrtc.org841c8a42013-09-09 15:04:25 +0000173PacketReceiver* Call::Receiver() { return this; }
pbos@webrtc.org29d58392013-05-16 12:08:03 +0000174
pbos@webrtc.org5a636552013-11-20 10:40:25 +0000175VideoSendStream* Call::CreateVideoSendStream(
pbos@webrtc.org6ae48c62014-06-06 10:49:19 +0000176 const VideoSendStream::Config& config,
177 const std::vector<VideoStream>& video_streams,
178 const void* encoder_settings) {
pbos@webrtc.org1819fd72013-06-10 13:48:26 +0000179 assert(config.rtp.ssrcs.size() > 0);
pbos@webrtc.org1819fd72013-06-10 13:48:26 +0000180
mflodman@webrtc.orgeb16b812014-06-16 08:57:39 +0000181 // TODO(mflodman): Base the start bitrate on a current bandwidth estimate, if
182 // the call has already started.
183 VideoSendStream* send_stream = new VideoSendStream(
184 config_.send_transport,
185 overuse_observer_proxy_.get(),
186 video_engine_,
187 config,
188 video_streams,
189 encoder_settings,
pbos@webrtc.org2bb1bda2014-07-07 13:06:48 +0000190 suspended_send_ssrcs_,
mflodman@webrtc.orgeb16b812014-06-16 08:57:39 +0000191 base_channel_id_,
192 config_.start_bitrate_bps != -1 ? config_.start_bitrate_bps
193 : kDefaultVideoStreamBitrateBps);
pbos@webrtc.org1819fd72013-06-10 13:48:26 +0000194
195 WriteLockScoped write_lock(*send_lock_);
196 for (size_t i = 0; i < config.rtp.ssrcs.size(); ++i) {
197 assert(send_ssrcs_.find(config.rtp.ssrcs[i]) == send_ssrcs_.end());
198 send_ssrcs_[config.rtp.ssrcs[i]] = send_stream;
pbos@webrtc.org29d58392013-05-16 12:08:03 +0000199 }
200 return send_stream;
201}
202
pbos@webrtc.org2c46f8d2013-11-21 13:49:43 +0000203void Call::DestroyVideoSendStream(webrtc::VideoSendStream* send_stream) {
pbos@webrtc.org95e51f52013-09-05 12:38:54 +0000204 assert(send_stream != NULL);
205
pbos@webrtc.org2bb1bda2014-07-07 13:06:48 +0000206 send_stream->Stop();
207
pbos@webrtc.org95e51f52013-09-05 12:38:54 +0000208 VideoSendStream* send_stream_impl = NULL;
209 {
210 WriteLockScoped write_lock(*send_lock_);
pbos@webrtc.org2bb1bda2014-07-07 13:06:48 +0000211 std::map<uint32_t, VideoSendStream*>::iterator it = send_ssrcs_.begin();
212 while (it != send_ssrcs_.end()) {
pbos@webrtc.org95e51f52013-09-05 12:38:54 +0000213 if (it->second == static_cast<VideoSendStream*>(send_stream)) {
214 send_stream_impl = it->second;
pbos@webrtc.org2bb1bda2014-07-07 13:06:48 +0000215 send_ssrcs_.erase(it++);
216 } else {
217 ++it;
pbos@webrtc.org95e51f52013-09-05 12:38:54 +0000218 }
219 }
pbos@webrtc.org29d58392013-05-16 12:08:03 +0000220 }
pbos@webrtc.org95e51f52013-09-05 12:38:54 +0000221
pbos@webrtc.org2bb1bda2014-07-07 13:06:48 +0000222 VideoSendStream::RtpStateMap rtp_state = send_stream_impl->GetRtpStates();
223
224 for (VideoSendStream::RtpStateMap::iterator it = rtp_state.begin();
225 it != rtp_state.end();
226 ++it) {
227 suspended_send_ssrcs_[it->first] = it->second;
228 }
229
pbos@webrtc.org95e51f52013-09-05 12:38:54 +0000230 assert(send_stream_impl != NULL);
231 delete send_stream_impl;
pbos@webrtc.org29d58392013-05-16 12:08:03 +0000232}
233
pbos@webrtc.org5a636552013-11-20 10:40:25 +0000234VideoReceiveStream* Call::CreateVideoReceiveStream(
pbos@webrtc.org74fa4892013-08-23 09:19:30 +0000235 const VideoReceiveStream::Config& config) {
mflodman@webrtc.orgf3973e82013-12-13 09:40:45 +0000236 VideoReceiveStream* receive_stream =
237 new VideoReceiveStream(video_engine_,
238 config,
239 config_.send_transport,
240 config_.voice_engine,
241 base_channel_id_);
pbos@webrtc.org29d58392013-05-16 12:08:03 +0000242
pbos@webrtc.org1819fd72013-06-10 13:48:26 +0000243 WriteLockScoped write_lock(*receive_lock_);
pbos@webrtc.orgb613b5a2013-12-03 10:13:04 +0000244 assert(receive_ssrcs_.find(config.rtp.remote_ssrc) == receive_ssrcs_.end());
245 receive_ssrcs_[config.rtp.remote_ssrc] = receive_stream;
pbos@webrtc.orgc279a5d2014-01-24 09:30:53 +0000246 // TODO(pbos): Configure different RTX payloads per receive payload.
247 VideoReceiveStream::Config::Rtp::RtxMap::const_iterator it =
248 config.rtp.rtx.begin();
249 if (it != config.rtp.rtx.end())
250 receive_ssrcs_[it->second.ssrc] = receive_stream;
251
pbos@webrtc.org29d58392013-05-16 12:08:03 +0000252 return receive_stream;
253}
254
pbos@webrtc.org2c46f8d2013-11-21 13:49:43 +0000255void Call::DestroyVideoReceiveStream(
256 webrtc::VideoReceiveStream* receive_stream) {
pbos@webrtc.org95e51f52013-09-05 12:38:54 +0000257 assert(receive_stream != NULL);
258
259 VideoReceiveStream* receive_stream_impl = NULL;
260 {
261 WriteLockScoped write_lock(*receive_lock_);
pbos@webrtc.orgc279a5d2014-01-24 09:30:53 +0000262 // Remove all ssrcs pointing to a receive stream. As RTX retransmits on a
263 // separate SSRC there can be either one or two.
264 std::map<uint32_t, VideoReceiveStream*>::iterator it =
265 receive_ssrcs_.begin();
266 while (it != receive_ssrcs_.end()) {
pbos@webrtc.org95e51f52013-09-05 12:38:54 +0000267 if (it->second == static_cast<VideoReceiveStream*>(receive_stream)) {
solenberg@webrtc.org094ac392014-01-29 11:21:58 +0000268 assert(receive_stream_impl == NULL ||
269 receive_stream_impl == it->second);
pbos@webrtc.org95e51f52013-09-05 12:38:54 +0000270 receive_stream_impl = it->second;
pbos@webrtc.orgc279a5d2014-01-24 09:30:53 +0000271 receive_ssrcs_.erase(it++);
272 } else {
273 ++it;
pbos@webrtc.org95e51f52013-09-05 12:38:54 +0000274 }
275 }
pbos@webrtc.org29d58392013-05-16 12:08:03 +0000276 }
pbos@webrtc.org95e51f52013-09-05 12:38:54 +0000277
278 assert(receive_stream_impl != NULL);
279 delete receive_stream_impl;
pbos@webrtc.org29d58392013-05-16 12:08:03 +0000280}
281
pbos@webrtc.org841c8a42013-09-09 15:04:25 +0000282uint32_t Call::SendBitrateEstimate() {
pbos@webrtc.org29d58392013-05-16 12:08:03 +0000283 // TODO(pbos): Return send-bitrate estimate
284 return 0;
285}
286
pbos@webrtc.org841c8a42013-09-09 15:04:25 +0000287uint32_t Call::ReceiveBitrateEstimate() {
pbos@webrtc.org29d58392013-05-16 12:08:03 +0000288 // TODO(pbos): Return receive-bitrate estimate
289 return 0;
290}
291
pbos@webrtc.orgaf38f4e2014-07-08 07:38:12 +0000292PacketReceiver::DeliveryStatus Call::DeliverRtcp(const uint8_t* packet,
pbos@webrtc.orgcaba2d22014-05-14 13:57:12 +0000293 size_t length) {
pbos@webrtc.org29d58392013-05-16 12:08:03 +0000294 // TODO(pbos): Figure out what channel needs it actually.
295 // Do NOT broadcast! Also make sure it's a valid packet.
pbos@webrtc.orgcaba2d22014-05-14 13:57:12 +0000296 // Return DELIVERY_UNKNOWN_SSRC if it can be determined that
297 // there's no receiver of the packet.
pbos@webrtc.org29d58392013-05-16 12:08:03 +0000298 bool rtcp_delivered = false;
pbos@webrtc.org40523702013-08-05 12:49:22 +0000299 {
300 ReadLockScoped read_lock(*receive_lock_);
301 for (std::map<uint32_t, VideoReceiveStream*>::iterator it =
302 receive_ssrcs_.begin();
303 it != receive_ssrcs_.end();
304 ++it) {
pbos@webrtc.org0e63e762013-09-20 11:56:26 +0000305 if (it->second->DeliverRtcp(packet, length))
pbos@webrtc.org40523702013-08-05 12:49:22 +0000306 rtcp_delivered = true;
pbos@webrtc.orgbbb07e62013-08-05 12:01:36 +0000307 }
308 }
309
pbos@webrtc.org40523702013-08-05 12:49:22 +0000310 {
311 ReadLockScoped read_lock(*send_lock_);
312 for (std::map<uint32_t, VideoSendStream*>::iterator it =
313 send_ssrcs_.begin();
314 it != send_ssrcs_.end();
315 ++it) {
pbos@webrtc.org0e63e762013-09-20 11:56:26 +0000316 if (it->second->DeliverRtcp(packet, length))
pbos@webrtc.org40523702013-08-05 12:49:22 +0000317 rtcp_delivered = true;
pbos@webrtc.org29d58392013-05-16 12:08:03 +0000318 }
319 }
pbos@webrtc.orgcaba2d22014-05-14 13:57:12 +0000320 return rtcp_delivered ? DELIVERY_OK : DELIVERY_PACKET_ERROR;
pbos@webrtc.org29d58392013-05-16 12:08:03 +0000321}
322
pbos@webrtc.orgaf38f4e2014-07-08 07:38:12 +0000323PacketReceiver::DeliveryStatus Call::DeliverRtp(const uint8_t* packet,
324 size_t length) {
325 // Minimum RTP header size.
326 if (length < 12)
327 return DELIVERY_PACKET_ERROR;
328
329 const uint8_t* ptr = &packet[8];
pbos@webrtc.orgdde16f12014-08-05 23:35:43 +0000330 uint32_t ssrc = ptr[0] << 24 | ptr[1] << 16 | ptr[2] << 8 | ptr[3];
pbos@webrtc.orgaf38f4e2014-07-08 07:38:12 +0000331
solenberg@webrtc.org094ac392014-01-29 11:21:58 +0000332 ReadLockScoped read_lock(*receive_lock_);
333 std::map<uint32_t, VideoReceiveStream*>::iterator it =
pbos@webrtc.orgaf38f4e2014-07-08 07:38:12 +0000334 receive_ssrcs_.find(ssrc);
pbos@webrtc.orgcaba2d22014-05-14 13:57:12 +0000335
336 if (it == receive_ssrcs_.end())
337 return DELIVERY_UNKNOWN_SSRC;
338
pbos@webrtc.orgaf38f4e2014-07-08 07:38:12 +0000339 return it->second->DeliverRtp(packet, length) ? DELIVERY_OK
340 : DELIVERY_PACKET_ERROR;
pbos@webrtc.org29d58392013-05-16 12:08:03 +0000341}
342
pbos@webrtc.orgaf38f4e2014-07-08 07:38:12 +0000343PacketReceiver::DeliveryStatus Call::DeliverPacket(const uint8_t* packet,
344 size_t length) {
pbos@webrtc.org62bafae2014-07-08 12:10:51 +0000345 if (RtpHeaderParser::IsRtcp(packet, length))
pbos@webrtc.org40523702013-08-05 12:49:22 +0000346 return DeliverRtcp(packet, length);
pbos@webrtc.org29d58392013-05-16 12:08:03 +0000347
pbos@webrtc.orgaf38f4e2014-07-08 07:38:12 +0000348 return DeliverRtp(packet, length);
pbos@webrtc.org29d58392013-05-16 12:08:03 +0000349}
350
351} // namespace internal
352} // namespace webrtc