andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +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 | ba8c15b | 2015-07-14 09:36:34 -0700 | [diff] [blame] | 11 | #include "webrtc/base/checks.h" |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 12 | #include "webrtc/base/location.h" |
pbos | 854e84c | 2015-11-16 16:39:06 -0800 | [diff] [blame] | 13 | #include "webrtc/base/logging.h" |
tommi | e4f9650 | 2015-10-20 23:00:48 -0700 | [diff] [blame] | 14 | #include "webrtc/base/trace_event.h" |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 15 | #include "webrtc/common_types.h" |
| 16 | #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 17 | #include "webrtc/modules/utility/include/process_thread.h" |
Henrik Kjellander | 2557b86 | 2015-11-18 22:00:21 +0100 | [diff] [blame] | 18 | #include "webrtc/modules/video_coding/encoded_frame.h" |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 19 | #include "webrtc/modules/video_coding/include/video_codec_interface.h" |
Henrik Kjellander | 2557b86 | 2015-11-18 22:00:21 +0100 | [diff] [blame] | 20 | #include "webrtc/modules/video_coding/jitter_buffer.h" |
| 21 | #include "webrtc/modules/video_coding/packet.h" |
| 22 | #include "webrtc/modules/video_coding/video_coding_impl.h" |
Henrik Kjellander | 98f5351 | 2015-10-28 18:17:40 +0100 | [diff] [blame] | 23 | #include "webrtc/system_wrappers/include/clock.h" |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 24 | |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 25 | namespace webrtc { |
| 26 | namespace vcm { |
| 27 | |
philipel | 83f831a | 2016-03-12 03:30:23 -0800 | [diff] [blame] | 28 | VideoReceiver::VideoReceiver(Clock* clock, |
| 29 | EventFactory* event_factory, |
sprang | 3911c26 | 2016-04-15 01:24:14 -0700 | [diff] [blame] | 30 | EncodedImageCallback* pre_decode_image_callback, |
philipel | 721d402 | 2016-12-15 07:10:57 -0800 | [diff] [blame] | 31 | VCMTiming* timing, |
philipel | 83f831a | 2016-03-12 03:30:23 -0800 | [diff] [blame] | 32 | NackSender* nack_sender, |
| 33 | KeyFrameRequestSender* keyframe_request_sender) |
stefan@webrtc.org | 34c5da6 | 2014-04-11 14:08:35 +0000 | [diff] [blame] | 34 | : clock_(clock), |
philipel | 721d402 | 2016-12-15 07:10:57 -0800 | [diff] [blame] | 35 | _timing(timing), |
| 36 | _receiver(_timing, |
philipel | 83f831a | 2016-03-12 03:30:23 -0800 | [diff] [blame] | 37 | clock_, |
| 38 | event_factory, |
| 39 | nack_sender, |
| 40 | keyframe_request_sender), |
philipel | 721d402 | 2016-12-15 07:10:57 -0800 | [diff] [blame] | 41 | _decodedFrameCallback(_timing, clock_), |
sprang | 3911c26 | 2016-04-15 01:24:14 -0700 | [diff] [blame] | 42 | _frameTypeCallback(nullptr), |
| 43 | _receiveStatsCallback(nullptr), |
sprang | 3911c26 | 2016-04-15 01:24:14 -0700 | [diff] [blame] | 44 | _packetRequestCallback(nullptr), |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 45 | _scheduleKeyRequest(false), |
Peter Boström | ed3277b | 2016-02-02 15:40:04 +0100 | [diff] [blame] | 46 | drop_frames_until_keyframe_(false), |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 47 | max_nack_list_size_(0), |
perkj | f5b2e51 | 2016-07-05 08:34:04 -0700 | [diff] [blame] | 48 | _codecDataBase(nullptr), |
sprang | 3911c26 | 2016-04-15 01:24:14 -0700 | [diff] [blame] | 49 | pre_decode_image_callback_(pre_decode_image_callback), |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 50 | _receiveStatsTimer(1000, clock_), |
| 51 | _retransmissionTimer(10, clock_), |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 52 | _keyRequestTimer(500, clock_) { |
| 53 | decoder_thread_.DetachFromThread(); |
| 54 | module_thread_.DetachFromThread(); |
| 55 | } |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 56 | |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 57 | VideoReceiver::~VideoReceiver() { |
| 58 | RTC_DCHECK_RUN_ON(&construction_thread_); |
| 59 | } |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 60 | |
pbos | a26ac92 | 2016-02-25 04:50:01 -0800 | [diff] [blame] | 61 | void VideoReceiver::Process() { |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 62 | RTC_DCHECK_RUN_ON(&module_thread_); |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 63 | // Receive-side statistics |
philipel | a45102f | 2017-02-22 05:30:39 -0800 | [diff] [blame] | 64 | |
| 65 | // TODO(philipel): Remove this if block when we know what to do with |
| 66 | // ReceiveStatisticsProxy::QualitySample. |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 67 | if (_receiveStatsTimer.TimeUntilProcess() == 0) { |
| 68 | _receiveStatsTimer.Processed(); |
sprang | 3911c26 | 2016-04-15 01:24:14 -0700 | [diff] [blame] | 69 | if (_receiveStatsCallback != nullptr) { |
philipel | a45102f | 2017-02-22 05:30:39 -0800 | [diff] [blame] | 70 | _receiveStatsCallback->OnReceiveRatesUpdated(0, 0); |
fischman@webrtc.org | 37bb497 | 2013-10-23 23:59:45 +0000 | [diff] [blame] | 71 | } |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 72 | } |
| 73 | |
| 74 | // Key frame requests |
| 75 | if (_keyRequestTimer.TimeUntilProcess() == 0) { |
| 76 | _keyRequestTimer.Processed(); |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 77 | bool request_key_frame = _frameTypeCallback != nullptr; |
| 78 | if (request_key_frame) { |
sprang | 3911c26 | 2016-04-15 01:24:14 -0700 | [diff] [blame] | 79 | rtc::CritScope cs(&process_crit_); |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 80 | request_key_frame = _scheduleKeyRequest; |
stefan@webrtc.org | f7c6e74 | 2014-01-29 10:27:51 +0000 | [diff] [blame] | 81 | } |
pbos | a26ac92 | 2016-02-25 04:50:01 -0800 | [diff] [blame] | 82 | if (request_key_frame) |
| 83 | RequestKeyFrame(); |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 84 | } |
| 85 | |
| 86 | // Packet retransmission requests |
| 87 | // TODO(holmer): Add API for changing Process interval and make sure it's |
| 88 | // disabled when NACK is off. |
| 89 | if (_retransmissionTimer.TimeUntilProcess() == 0) { |
| 90 | _retransmissionTimer.Processed(); |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 91 | bool callback_registered = _packetRequestCallback != nullptr; |
| 92 | uint16_t length = max_nack_list_size_; |
stefan@webrtc.org | f7c6e74 | 2014-01-29 10:27:51 +0000 | [diff] [blame] | 93 | if (callback_registered && length > 0) { |
Wan-Teh Chang | b1825a4 | 2015-06-03 15:03:35 -0700 | [diff] [blame] | 94 | // Collect sequence numbers from the default receiver. |
| 95 | bool request_key_frame = false; |
| 96 | std::vector<uint16_t> nackList = _receiver.NackList(&request_key_frame); |
| 97 | int32_t ret = VCM_OK; |
| 98 | if (request_key_frame) { |
| 99 | ret = RequestKeyFrame(); |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 100 | } |
Wan-Teh Chang | b1825a4 | 2015-06-03 15:03:35 -0700 | [diff] [blame] | 101 | if (ret == VCM_OK && !nackList.empty()) { |
sprang | 3911c26 | 2016-04-15 01:24:14 -0700 | [diff] [blame] | 102 | if (_packetRequestCallback != nullptr) { |
Wan-Teh Chang | b1825a4 | 2015-06-03 15:03:35 -0700 | [diff] [blame] | 103 | _packetRequestCallback->ResendPackets(&nackList[0], nackList.size()); |
stefan@webrtc.org | f7c6e74 | 2014-01-29 10:27:51 +0000 | [diff] [blame] | 104 | } |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 105 | } |
| 106 | } |
| 107 | } |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 108 | } |
| 109 | |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 110 | void VideoReceiver::ProcessThreadAttached(ProcessThread* process_thread) { |
| 111 | RTC_DCHECK_RUN_ON(&construction_thread_); |
| 112 | if (process_thread) { |
| 113 | is_attached_to_process_thread_ = true; |
| 114 | process_thread_ = process_thread; |
| 115 | } else { |
| 116 | is_attached_to_process_thread_ = false; |
| 117 | } |
| 118 | } |
| 119 | |
pkasting@chromium.org | 0b1534c | 2014-12-15 22:09:40 +0000 | [diff] [blame] | 120 | int64_t VideoReceiver::TimeUntilNextProcess() { |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 121 | RTC_DCHECK_RUN_ON(&module_thread_); |
pkasting@chromium.org | 0b1534c | 2014-12-15 22:09:40 +0000 | [diff] [blame] | 122 | int64_t timeUntilNextProcess = _receiveStatsTimer.TimeUntilProcess(); |
pbos@webrtc.org | 4f16c87 | 2014-11-24 09:06:48 +0000 | [diff] [blame] | 123 | if (_receiver.NackMode() != kNoNack) { |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 124 | // We need a Process call more often if we are relying on |
| 125 | // retransmissions |
| 126 | timeUntilNextProcess = |
| 127 | VCM_MIN(timeUntilNextProcess, _retransmissionTimer.TimeUntilProcess()); |
| 128 | } |
| 129 | timeUntilNextProcess = |
| 130 | VCM_MIN(timeUntilNextProcess, _keyRequestTimer.TimeUntilProcess()); |
| 131 | |
| 132 | return timeUntilNextProcess; |
| 133 | } |
| 134 | |
pkasting@chromium.org | 16825b1 | 2015-01-12 21:51:21 +0000 | [diff] [blame] | 135 | int32_t VideoReceiver::SetReceiveChannelParameters(int64_t rtt) { |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 136 | RTC_DCHECK_RUN_ON(&module_thread_); |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 137 | _receiver.UpdateRtt(rtt); |
| 138 | return 0; |
| 139 | } |
| 140 | |
| 141 | // Enable or disable a video protection method. |
| 142 | // Note: This API should be deprecated, as it does not offer a distinction |
tommi | a5c18d7 | 2017-03-20 10:43:23 -0700 | [diff] [blame] | 143 | // between the protection method and decoding with or without errors. |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 144 | int32_t VideoReceiver::SetVideoProtection(VCMVideoProtection videoProtection, |
| 145 | bool enable) { |
| 146 | // By default, do not decode with errors. |
| 147 | _receiver.SetDecodeErrorMode(kNoErrors); |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 148 | switch (videoProtection) { |
pbos | ba8c15b | 2015-07-14 09:36:34 -0700 | [diff] [blame] | 149 | case kProtectionNack: { |
henrikg | 91d6ede | 2015-09-17 00:24:34 -0700 | [diff] [blame] | 150 | RTC_DCHECK(enable); |
pbos | ba8c15b | 2015-07-14 09:36:34 -0700 | [diff] [blame] | 151 | _receiver.SetNackMode(kNack, -1, -1); |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 152 | break; |
| 153 | } |
| 154 | |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 155 | case kProtectionNackFEC: { |
henrikg | 91d6ede | 2015-09-17 00:24:34 -0700 | [diff] [blame] | 156 | RTC_DCHECK(enable); |
philipel | ae28408 | 2016-05-09 12:14:29 +0200 | [diff] [blame] | 157 | _receiver.SetNackMode(kNack, |
| 158 | media_optimization::kLowRttNackMs, |
| 159 | media_optimization::kMaxRttDelayThreshold); |
pbos | ba8c15b | 2015-07-14 09:36:34 -0700 | [diff] [blame] | 160 | _receiver.SetDecodeErrorMode(kNoErrors); |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 161 | break; |
| 162 | } |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 163 | case kProtectionFEC: |
pbos@webrtc.org | cade82c | 2015-03-12 10:39:24 +0000 | [diff] [blame] | 164 | case kProtectionNone: |
pbos | ba8c15b | 2015-07-14 09:36:34 -0700 | [diff] [blame] | 165 | // No receiver-side protection. |
henrikg | 91d6ede | 2015-09-17 00:24:34 -0700 | [diff] [blame] | 166 | RTC_DCHECK(enable); |
pbos | ba8c15b | 2015-07-14 09:36:34 -0700 | [diff] [blame] | 167 | _receiver.SetNackMode(kNoNack, -1, -1); |
| 168 | _receiver.SetDecodeErrorMode(kWithErrors); |
pbos@webrtc.org | cade82c | 2015-03-12 10:39:24 +0000 | [diff] [blame] | 169 | break; |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 170 | } |
| 171 | return VCM_OK; |
| 172 | } |
| 173 | |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 174 | // Register a receive callback. Will be called whenever there is a new frame |
| 175 | // ready for rendering. |
| 176 | int32_t VideoReceiver::RegisterReceiveCallback( |
| 177 | VCMReceiveCallback* receiveCallback) { |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 178 | RTC_DCHECK_RUN_ON(&construction_thread_); |
| 179 | RTC_DCHECK(!IsDecoderThreadRunning()); |
| 180 | // This value is set before the decoder thread starts and unset after |
| 181 | // the decoder thread has been stopped. |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 182 | _decodedFrameCallback.SetUserReceiveCallback(receiveCallback); |
| 183 | return VCM_OK; |
| 184 | } |
| 185 | |
| 186 | int32_t VideoReceiver::RegisterReceiveStatisticsCallback( |
| 187 | VCMReceiveStatisticsCallback* receiveStats) { |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 188 | RTC_DCHECK_RUN_ON(&construction_thread_); |
| 189 | RTC_DCHECK(!IsDecoderThreadRunning() && !is_attached_to_process_thread_); |
| 190 | // |_receiver| is used on both the decoder and module threads. |
| 191 | // However, since we make sure that we never do anything on the module thread |
| 192 | // when the decoder thread is not running, we don't need a lock for the |
| 193 | // |_receiver| or |_receiveStatsCallback| here. |
pbos@webrtc.org | 5570769 | 2014-12-19 15:45:03 +0000 | [diff] [blame] | 194 | _receiver.RegisterStatsCallback(receiveStats); |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 195 | _receiveStatsCallback = receiveStats; |
| 196 | return VCM_OK; |
| 197 | } |
| 198 | |
perkj | 796cfaf | 2015-12-10 09:27:38 -0800 | [diff] [blame] | 199 | // Register an externally defined decoder object. |
Peter Boström | 795dbe4 | 2015-11-27 14:09:07 +0100 | [diff] [blame] | 200 | void VideoReceiver::RegisterExternalDecoder(VideoDecoder* externalDecoder, |
perkj | 796cfaf | 2015-12-10 09:27:38 -0800 | [diff] [blame] | 201 | uint8_t payloadType) { |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 202 | RTC_DCHECK_RUN_ON(&construction_thread_); |
| 203 | RTC_DCHECK(!IsDecoderThreadRunning()); |
sprang | 3911c26 | 2016-04-15 01:24:14 -0700 | [diff] [blame] | 204 | if (externalDecoder == nullptr) { |
Peter Boström | 795dbe4 | 2015-11-27 14:09:07 +0100 | [diff] [blame] | 205 | RTC_CHECK(_codecDataBase.DeregisterExternalDecoder(payloadType)); |
Peter Boström | 395c7c6 | 2015-11-27 15:23:12 +0100 | [diff] [blame] | 206 | return; |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 207 | } |
perkj | 796cfaf | 2015-12-10 09:27:38 -0800 | [diff] [blame] | 208 | _codecDataBase.RegisterExternalDecoder(externalDecoder, payloadType); |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 209 | } |
| 210 | |
| 211 | // Register a frame type request callback. |
| 212 | int32_t VideoReceiver::RegisterFrameTypeCallback( |
| 213 | VCMFrameTypeCallback* frameTypeCallback) { |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 214 | RTC_DCHECK_RUN_ON(&construction_thread_); |
| 215 | RTC_DCHECK(!IsDecoderThreadRunning() && !is_attached_to_process_thread_); |
| 216 | // This callback is used on the module thread, but since we don't get |
| 217 | // callbacks on the module thread while the decoder thread isn't running |
| 218 | // (and this function must not be called when the decoder is running), |
| 219 | // we don't need a lock here. |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 220 | _frameTypeCallback = frameTypeCallback; |
| 221 | return VCM_OK; |
| 222 | } |
| 223 | |
| 224 | int32_t VideoReceiver::RegisterPacketRequestCallback( |
| 225 | VCMPacketRequestCallback* callback) { |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 226 | RTC_DCHECK_RUN_ON(&construction_thread_); |
| 227 | RTC_DCHECK(!IsDecoderThreadRunning() && !is_attached_to_process_thread_); |
| 228 | // This callback is used on the module thread, but since we don't get |
| 229 | // callbacks on the module thread while the decoder thread isn't running |
| 230 | // (and this function must not be called when the decoder is running), |
| 231 | // we don't need a lock here. |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 232 | _packetRequestCallback = callback; |
| 233 | return VCM_OK; |
| 234 | } |
| 235 | |
pbos@webrtc.org | 4dd40d6 | 2015-02-17 13:22:43 +0000 | [diff] [blame] | 236 | void VideoReceiver::TriggerDecoderShutdown() { |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 237 | RTC_DCHECK_RUN_ON(&construction_thread_); |
| 238 | RTC_DCHECK(IsDecoderThreadRunning()); |
pbos@webrtc.org | 4dd40d6 | 2015-02-17 13:22:43 +0000 | [diff] [blame] | 239 | _receiver.TriggerDecoderShutdown(); |
| 240 | } |
| 241 | |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 242 | void VideoReceiver::DecoderThreadStarting() { |
| 243 | RTC_DCHECK_RUN_ON(&construction_thread_); |
| 244 | RTC_DCHECK(!IsDecoderThreadRunning()); |
| 245 | if (process_thread_ && !is_attached_to_process_thread_) { |
| 246 | process_thread_->RegisterModule(this, RTC_FROM_HERE); |
| 247 | } |
| 248 | #if RTC_DCHECK_IS_ON |
| 249 | decoder_thread_is_running_ = true; |
| 250 | #endif |
| 251 | } |
| 252 | |
| 253 | void VideoReceiver::DecoderThreadStopped() { |
| 254 | RTC_DCHECK_RUN_ON(&construction_thread_); |
| 255 | RTC_DCHECK(IsDecoderThreadRunning()); |
| 256 | if (process_thread_ && is_attached_to_process_thread_) { |
| 257 | process_thread_->DeRegisterModule(this); |
| 258 | } |
| 259 | #if RTC_DCHECK_IS_ON |
| 260 | decoder_thread_is_running_ = false; |
| 261 | decoder_thread_.DetachFromThread(); |
| 262 | #endif |
| 263 | } |
| 264 | |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 265 | // Decode next frame, blocking. |
| 266 | // Should be called as often as possible to get the most out of the decoder. |
| 267 | int32_t VideoReceiver::Decode(uint16_t maxWaitTimeMs) { |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 268 | RTC_DCHECK_RUN_ON(&decoder_thread_); |
| 269 | VCMEncodedFrame* frame = _receiver.FrameForDecoding( |
| 270 | maxWaitTimeMs, _codecDataBase.PrefersLateDecoding()); |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 271 | |
Peter Boström | b7d9a97 | 2015-12-18 16:01:11 +0100 | [diff] [blame] | 272 | if (!frame) |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 273 | return VCM_FRAME_NOT_READY; |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 274 | |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 275 | bool drop_frame = false; |
Peter Boström | ed3277b | 2016-02-02 15:40:04 +0100 | [diff] [blame] | 276 | { |
sprang | 3911c26 | 2016-04-15 01:24:14 -0700 | [diff] [blame] | 277 | rtc::CritScope cs(&process_crit_); |
Peter Boström | ed3277b | 2016-02-02 15:40:04 +0100 | [diff] [blame] | 278 | if (drop_frames_until_keyframe_) { |
| 279 | // Still getting delta frames, schedule another keyframe request as if |
| 280 | // decode failed. |
| 281 | if (frame->FrameType() != kVideoFrameKey) { |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 282 | drop_frame = true; |
Peter Boström | ed3277b | 2016-02-02 15:40:04 +0100 | [diff] [blame] | 283 | _scheduleKeyRequest = true; |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 284 | } else { |
| 285 | drop_frames_until_keyframe_ = false; |
Peter Boström | ed3277b | 2016-02-02 15:40:04 +0100 | [diff] [blame] | 286 | } |
Peter Boström | ed3277b | 2016-02-02 15:40:04 +0100 | [diff] [blame] | 287 | } |
| 288 | } |
Peter Boström | b7d9a97 | 2015-12-18 16:01:11 +0100 | [diff] [blame] | 289 | |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 290 | if (drop_frame) { |
| 291 | _receiver.ReleaseFrame(frame); |
| 292 | return VCM_FRAME_NOT_READY; |
| 293 | } |
| 294 | |
Peter Boström | b7d9a97 | 2015-12-18 16:01:11 +0100 | [diff] [blame] | 295 | if (pre_decode_image_callback_) { |
| 296 | EncodedImage encoded_image(frame->EncodedImage()); |
| 297 | int qp = -1; |
| 298 | if (qp_parser_.GetQp(*frame, &qp)) { |
| 299 | encoded_image.qp_ = qp; |
sprang@webrtc.org | 4070935 | 2013-11-26 11:41:59 +0000 | [diff] [blame] | 300 | } |
sergeyu | 2cb155a | 2016-11-04 11:39:29 -0700 | [diff] [blame] | 301 | pre_decode_image_callback_->OnEncodedImage(encoded_image, |
| 302 | frame->CodecSpecific(), nullptr); |
Peter Boström | b7d9a97 | 2015-12-18 16:01:11 +0100 | [diff] [blame] | 303 | } |
sprang@webrtc.org | 4070935 | 2013-11-26 11:41:59 +0000 | [diff] [blame] | 304 | |
sprang | 3911c26 | 2016-04-15 01:24:14 -0700 | [diff] [blame] | 305 | // If this frame was too late, we should adjust the delay accordingly |
philipel | 721d402 | 2016-12-15 07:10:57 -0800 | [diff] [blame] | 306 | _timing->UpdateCurrentDelay(frame->RenderTimeMs(), |
| 307 | clock_->TimeInMilliseconds()); |
skvlad | 98bb664 | 2016-04-07 15:36:45 -0700 | [diff] [blame] | 308 | |
| 309 | if (first_frame_received_()) { |
| 310 | LOG(LS_INFO) << "Received first " |
| 311 | << (frame->Complete() ? "complete" : "incomplete") |
| 312 | << " decodable video frame"; |
| 313 | } |
| 314 | |
Peter Boström | b7d9a97 | 2015-12-18 16:01:11 +0100 | [diff] [blame] | 315 | const int32_t ret = Decode(*frame); |
| 316 | _receiver.ReleaseFrame(frame); |
| 317 | return ret; |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 318 | } |
| 319 | |
philipel | a45102f | 2017-02-22 05:30:39 -0800 | [diff] [blame] | 320 | // Used for the new jitter buffer. |
philipel | fd5a20f | 2016-11-15 00:57:57 -0800 | [diff] [blame] | 321 | // TODO(philipel): Clean up among the Decode functions as we replace |
| 322 | // VCMEncodedFrame with FrameObject. |
| 323 | int32_t VideoReceiver::Decode(const webrtc::VCMEncodedFrame* frame) { |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 324 | RTC_DCHECK_RUN_ON(&decoder_thread_); |
philipel | 266f0a4 | 2016-11-28 08:49:07 -0800 | [diff] [blame] | 325 | if (pre_decode_image_callback_) { |
| 326 | EncodedImage encoded_image(frame->EncodedImage()); |
| 327 | int qp = -1; |
| 328 | if (qp_parser_.GetQp(*frame, &qp)) { |
| 329 | encoded_image.qp_ = qp; |
| 330 | } |
| 331 | pre_decode_image_callback_->OnEncodedImage(encoded_image, |
| 332 | frame->CodecSpecific(), nullptr); |
| 333 | } |
philipel | fd5a20f | 2016-11-15 00:57:57 -0800 | [diff] [blame] | 334 | return Decode(*frame); |
| 335 | } |
| 336 | |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 337 | int32_t VideoReceiver::RequestKeyFrame() { |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 338 | RTC_DCHECK_RUN_ON(&module_thread_); |
| 339 | |
| 340 | // Since we deregister from the module thread when the decoder thread isn't |
| 341 | // running, we should get no calls here if decoding isn't being done. |
| 342 | RTC_DCHECK(IsDecoderThreadRunning()); |
| 343 | |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 344 | TRACE_EVENT0("webrtc", "RequestKeyFrame"); |
sprang | 3911c26 | 2016-04-15 01:24:14 -0700 | [diff] [blame] | 345 | if (_frameTypeCallback != nullptr) { |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 346 | const int32_t ret = _frameTypeCallback->RequestKeyFrame(); |
| 347 | if (ret < 0) { |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 348 | return ret; |
| 349 | } |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 350 | rtc::CritScope cs(&process_crit_); |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 351 | _scheduleKeyRequest = false; |
| 352 | } else { |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 353 | return VCM_MISSING_CALLBACK; |
| 354 | } |
| 355 | return VCM_OK; |
| 356 | } |
| 357 | |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 358 | // Must be called from inside the receive side critical section. |
| 359 | int32_t VideoReceiver::Decode(const VCMEncodedFrame& frame) { |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 360 | RTC_DCHECK_RUN_ON(&decoder_thread_); |
tommi | db23ea6 | 2017-03-03 07:21:18 -0800 | [diff] [blame] | 361 | TRACE_EVENT0("webrtc", "VideoReceiver::Decode"); |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 362 | // Change decoder if payload type has changed |
tommi | d0a71ba | 2017-03-14 04:16:20 -0700 | [diff] [blame] | 363 | VCMGenericDecoder* decoder = |
| 364 | _codecDataBase.GetDecoder(frame, &_decodedFrameCallback); |
| 365 | if (decoder == nullptr) { |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 366 | return VCM_NO_CODEC_REGISTERED; |
| 367 | } |
| 368 | // Decode a frame |
tommi | d0a71ba | 2017-03-14 04:16:20 -0700 | [diff] [blame] | 369 | int32_t ret = decoder->Decode(frame, clock_->TimeInMilliseconds()); |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 370 | |
| 371 | // Check for failed decoding, run frame type request callback if needed. |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 372 | bool request_key_frame = (ret < 0); |
nisse | cd386eb | 2017-03-14 08:54:43 -0700 | [diff] [blame] | 373 | |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 374 | if (!frame.Complete() || frame.MissingFrame()) { |
pbos | 081af25 | 2015-07-27 08:02:22 -0700 | [diff] [blame] | 375 | request_key_frame = true; |
| 376 | ret = VCM_OK; |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 377 | } |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 378 | |
stefan@webrtc.org | f7c6e74 | 2014-01-29 10:27:51 +0000 | [diff] [blame] | 379 | if (request_key_frame) { |
sprang | 3911c26 | 2016-04-15 01:24:14 -0700 | [diff] [blame] | 380 | rtc::CritScope cs(&process_crit_); |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 381 | if (!_scheduleKeyRequest) { |
| 382 | _scheduleKeyRequest = true; |
| 383 | // TODO(tommi): Consider if we could instead post a task to the module |
| 384 | // thread and call RequestKeyFrame directly. Here we call WakeUp so that |
| 385 | // TimeUntilNextProcess() gets called straight away. |
| 386 | process_thread_->WakeUp(this); |
| 387 | } |
stefan@webrtc.org | f7c6e74 | 2014-01-29 10:27:51 +0000 | [diff] [blame] | 388 | } |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 389 | return ret; |
| 390 | } |
| 391 | |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 392 | #if defined(WEBRTC_ANDROID) |
| 393 | void VideoReceiver::PollDecodedFrames() { |
| 394 | RTC_DCHECK_RUN_ON(&decoder_thread_); |
| 395 | auto* current_decoder = _codecDataBase.GetCurrentDecoder(); |
| 396 | if (current_decoder) |
| 397 | current_decoder->PollDecodedFrames(); |
| 398 | } |
| 399 | #endif |
| 400 | |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 401 | // Register possible receive codecs, can be called multiple times |
| 402 | int32_t VideoReceiver::RegisterReceiveCodec(const VideoCodec* receiveCodec, |
| 403 | int32_t numberOfCores, |
| 404 | bool requireKeyFrame) { |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 405 | RTC_DCHECK_RUN_ON(&construction_thread_); |
| 406 | RTC_DCHECK(!IsDecoderThreadRunning()); |
sprang | 3911c26 | 2016-04-15 01:24:14 -0700 | [diff] [blame] | 407 | if (receiveCodec == nullptr) { |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 408 | return VCM_PARAMETER_ERROR; |
| 409 | } |
philipel | 9d3ab61 | 2015-12-21 04:12:39 -0800 | [diff] [blame] | 410 | if (!_codecDataBase.RegisterReceiveCodec(receiveCodec, numberOfCores, |
| 411 | requireKeyFrame)) { |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 412 | return -1; |
| 413 | } |
| 414 | return 0; |
| 415 | } |
| 416 | |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 417 | // Incoming packet from network parsed and ready for decode, non blocking. |
| 418 | int32_t VideoReceiver::IncomingPacket(const uint8_t* incomingPayload, |
pkasting@chromium.org | 4591fbd | 2014-11-20 22:28:14 +0000 | [diff] [blame] | 419 | size_t payloadLength, |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 420 | const WebRtcRTPHeader& rtpInfo) { |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 421 | RTC_DCHECK_RUN_ON(&module_thread_); |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 422 | if (rtpInfo.frameType == kVideoFrameKey) { |
philipel | 9d3ab61 | 2015-12-21 04:12:39 -0800 | [diff] [blame] | 423 | TRACE_EVENT1("webrtc", "VCM::PacketKeyFrame", "seqnum", |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 424 | rtpInfo.header.sequenceNumber); |
| 425 | } |
sprang | 3911c26 | 2016-04-15 01:24:14 -0700 | [diff] [blame] | 426 | if (incomingPayload == nullptr) { |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 427 | // The jitter buffer doesn't handle non-zero payload lengths for packets |
| 428 | // without payload. |
| 429 | // TODO(holmer): We should fix this in the jitter buffer. |
| 430 | payloadLength = 0; |
| 431 | } |
| 432 | const VCMPacket packet(incomingPayload, payloadLength, rtpInfo); |
Johan Ahlers | 95348f7 | 2016-06-28 11:11:28 +0200 | [diff] [blame] | 433 | int32_t ret = _receiver.InsertPacket(packet); |
sprang | 3911c26 | 2016-04-15 01:24:14 -0700 | [diff] [blame] | 434 | |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 435 | // TODO(holmer): Investigate if this somehow should use the key frame |
| 436 | // request scheduling to throttle the requests. |
| 437 | if (ret == VCM_FLUSH_INDICATOR) { |
Peter Boström | ed3277b | 2016-02-02 15:40:04 +0100 | [diff] [blame] | 438 | { |
sprang | 3911c26 | 2016-04-15 01:24:14 -0700 | [diff] [blame] | 439 | rtc::CritScope cs(&process_crit_); |
Peter Boström | ed3277b | 2016-02-02 15:40:04 +0100 | [diff] [blame] | 440 | drop_frames_until_keyframe_ = true; |
| 441 | } |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 442 | RequestKeyFrame(); |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 443 | } else if (ret < 0) { |
| 444 | return ret; |
| 445 | } |
| 446 | return VCM_OK; |
| 447 | } |
| 448 | |
| 449 | // Minimum playout delay (used for lip-sync). This is the minimum delay required |
| 450 | // to sync with audio. Not included in VideoCodingModule::Delay() |
| 451 | // Defaults to 0 ms. |
| 452 | int32_t VideoReceiver::SetMinimumPlayoutDelay(uint32_t minPlayoutDelayMs) { |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 453 | RTC_DCHECK_RUN_ON(&module_thread_); |
philipel | 721d402 | 2016-12-15 07:10:57 -0800 | [diff] [blame] | 454 | _timing->set_min_playout_delay(minPlayoutDelayMs); |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 455 | return VCM_OK; |
| 456 | } |
| 457 | |
| 458 | // The estimated delay caused by rendering, defaults to |
| 459 | // kDefaultRenderDelayMs = 10 ms |
| 460 | int32_t VideoReceiver::SetRenderDelay(uint32_t timeMS) { |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 461 | RTC_DCHECK_RUN_ON(&construction_thread_); |
| 462 | RTC_DCHECK(!IsDecoderThreadRunning()); |
philipel | 721d402 | 2016-12-15 07:10:57 -0800 | [diff] [blame] | 463 | _timing->set_render_delay(timeMS); |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 464 | return VCM_OK; |
| 465 | } |
| 466 | |
| 467 | // Current video delay |
philipel | 9d3ab61 | 2015-12-21 04:12:39 -0800 | [diff] [blame] | 468 | int32_t VideoReceiver::Delay() const { |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 469 | RTC_DCHECK_RUN_ON(&module_thread_); |
philipel | 721d402 | 2016-12-15 07:10:57 -0800 | [diff] [blame] | 470 | return _timing->TargetVideoDelay(); |
philipel | 9d3ab61 | 2015-12-21 04:12:39 -0800 | [diff] [blame] | 471 | } |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 472 | |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 473 | // Only used by VCMRobustnessTest. |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 474 | int VideoReceiver::SetReceiverRobustnessMode( |
tommi | a5c18d7 | 2017-03-20 10:43:23 -0700 | [diff] [blame] | 475 | VideoCodingModule::ReceiverRobustness robustnessMode, |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 476 | VCMDecodeErrorMode decode_error_mode) { |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 477 | RTC_DCHECK_RUN_ON(&construction_thread_); |
| 478 | RTC_DCHECK(!IsDecoderThreadRunning()); |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 479 | switch (robustnessMode) { |
| 480 | case VideoCodingModule::kNone: |
| 481 | _receiver.SetNackMode(kNoNack, -1, -1); |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 482 | break; |
| 483 | case VideoCodingModule::kHardNack: |
| 484 | // Always wait for retransmissions (except when decoding with errors). |
| 485 | _receiver.SetNackMode(kNack, -1, -1); |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 486 | break; |
tommi | a5c18d7 | 2017-03-20 10:43:23 -0700 | [diff] [blame] | 487 | default: |
| 488 | RTC_NOTREACHED(); |
| 489 | return VCM_PARAMETER_ERROR; |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 490 | } |
| 491 | _receiver.SetDecodeErrorMode(decode_error_mode); |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 492 | return VCM_OK; |
| 493 | } |
| 494 | |
| 495 | void VideoReceiver::SetDecodeErrorMode(VCMDecodeErrorMode decode_error_mode) { |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 496 | RTC_DCHECK_RUN_ON(&construction_thread_); |
| 497 | RTC_DCHECK(!IsDecoderThreadRunning()); |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 498 | _receiver.SetDecodeErrorMode(decode_error_mode); |
| 499 | } |
| 500 | |
| 501 | void VideoReceiver::SetNackSettings(size_t max_nack_list_size, |
| 502 | int max_packet_age_to_nack, |
| 503 | int max_incomplete_time_ms) { |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 504 | RTC_DCHECK_RUN_ON(&construction_thread_); |
| 505 | RTC_DCHECK(!IsDecoderThreadRunning()); |
| 506 | |
| 507 | if (max_nack_list_size != 0) |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 508 | max_nack_list_size_ = max_nack_list_size; |
philipel | 9d3ab61 | 2015-12-21 04:12:39 -0800 | [diff] [blame] | 509 | _receiver.SetNackSettings(max_nack_list_size, max_packet_age_to_nack, |
| 510 | max_incomplete_time_ms); |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 511 | } |
| 512 | |
| 513 | int VideoReceiver::SetMinReceiverDelay(int desired_delay_ms) { |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 514 | RTC_DCHECK_RUN_ON(&construction_thread_); |
| 515 | RTC_DCHECK(!IsDecoderThreadRunning()); |
| 516 | // TODO(tommi): Is the method only used by tests? Maybe could be offered |
| 517 | // via a test only subclass? |
| 518 | // Info from Stefan: If it is indeed only used by tests I think it's just that |
| 519 | // it hasn't been cleaned up when the calling code was cleaned up. |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 520 | return _receiver.SetMinReceiverDelay(desired_delay_ms); |
| 521 | } |
| 522 | |
tommi | e3aa88b | 2017-04-04 03:53:02 -0700 | [diff] [blame] | 523 | bool VideoReceiver::IsDecoderThreadRunning() { |
| 524 | #if RTC_DCHECK_IS_ON |
| 525 | return decoder_thread_is_running_; |
| 526 | #else |
| 527 | return true; |
| 528 | #endif |
| 529 | } |
| 530 | |
andresp@webrtc.org | f7eb75b | 2013-09-14 00:25:28 +0000 | [diff] [blame] | 531 | } // namespace vcm |
| 532 | } // namespace webrtc |