| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 | 10 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 | 54 |
| 55 VCMDecodeErrorMode decode_error_mode = enable_nack ? kNoErrors : kWithErrors; | 55 VCMDecodeErrorMode decode_error_mode = enable_nack ? kNoErrors : kWithErrors; |
| 56 video_receiver_->SetVideoProtection(video_protection, true); | 56 video_receiver_->SetVideoProtection(video_protection, true); |
| 57 video_receiver_->SetDecodeErrorMode(decode_error_mode); | 57 video_receiver_->SetDecodeErrorMode(decode_error_mode); |
| 58 VCMPacketRequestCallback* packet_request_callback = | 58 VCMPacketRequestCallback* packet_request_callback = |
| 59 enable_nack ? vcm_packet_request_callback : nullptr; | 59 enable_nack ? vcm_packet_request_callback : nullptr; |
| 60 video_receiver_->RegisterPacketRequestCallback(packet_request_callback); | 60 video_receiver_->RegisterPacketRequestCallback(packet_request_callback); |
| 61 } | 61 } |
| 62 | 62 |
| 63 VideoStreamDecoder::~VideoStreamDecoder() { | 63 VideoStreamDecoder::~VideoStreamDecoder() { |
| 64 // Note: There's an assumption at this point that the decoder thread is |
| 65 // *not* running. If it was, then there could be a race for each of these |
| 66 // callbacks. |
| 67 |
| 64 // Unset all the callback pointers that we set in the ctor. | 68 // Unset all the callback pointers that we set in the ctor. |
| 65 video_receiver_->RegisterPacketRequestCallback(nullptr); | 69 video_receiver_->RegisterPacketRequestCallback(nullptr); |
| 66 video_receiver_->RegisterDecoderTimingCallback(nullptr); | 70 video_receiver_->RegisterDecoderTimingCallback(nullptr); |
| 67 video_receiver_->RegisterReceiveStatisticsCallback(nullptr); | 71 video_receiver_->RegisterReceiveStatisticsCallback(nullptr); |
| 68 video_receiver_->RegisterFrameTypeCallback(nullptr); | 72 video_receiver_->RegisterFrameTypeCallback(nullptr); |
| 69 video_receiver_->RegisterReceiveCallback(nullptr); | 73 video_receiver_->RegisterReceiveCallback(nullptr); |
| 70 } | 74 } |
| 71 | 75 |
| 72 // Do not acquire the lock of |video_receiver_| in this function. Decode | 76 // Do not acquire the lock of |video_receiver_| in this function. Decode |
| 73 // callback won't necessarily be called from the decoding thread. The decoding | 77 // callback won't necessarily be called from the decoding thread. The decoding |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 | 131 |
| 128 void VideoStreamDecoder::OnCompleteFrame(bool is_keyframe, size_t size_bytes) {} | 132 void VideoStreamDecoder::OnCompleteFrame(bool is_keyframe, size_t size_bytes) {} |
| 129 | 133 |
| 130 void VideoStreamDecoder::OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) { | 134 void VideoStreamDecoder::OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) { |
| 131 video_receiver_->SetReceiveChannelParameters(max_rtt_ms); | 135 video_receiver_->SetReceiveChannelParameters(max_rtt_ms); |
| 132 | 136 |
| 133 rtc::CritScope lock(&crit_); | 137 rtc::CritScope lock(&crit_); |
| 134 last_rtt_ms_ = avg_rtt_ms; | 138 last_rtt_ms_ = avg_rtt_ms; |
| 135 } | 139 } |
| 136 } // namespace webrtc | 140 } // namespace webrtc |
| OLD | NEW |