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 | 10 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 if (should_decode) { | 67 if (should_decode) { |
68 if (vcm_->Decode() < 0) { | 68 if (vcm_->Decode() < 0) { |
69 return -1; | 69 return -1; |
70 } | 70 } |
71 } | 71 } |
72 return Process() ? 0 : -1; | 72 return Process() ? 0 : -1; |
73 } | 73 } |
74 | 74 |
75 bool Process() { | 75 bool Process() { |
76 if (vcm_->TimeUntilNextProcess() <= 0) { | 76 if (vcm_->TimeUntilNextProcess() <= 0) { |
77 vcm_->Process(); | 77 if (vcm_->Process() < 0) { |
| 78 return false; |
| 79 } |
78 } | 80 } |
79 return true; | 81 return true; |
80 } | 82 } |
81 | 83 |
82 bool Decode() { | 84 bool Decode() { |
83 vcm_->Decode(10000); | 85 vcm_->Decode(10000); |
84 return true; | 86 return true; |
85 } | 87 } |
86 | 88 |
87 private: | 89 private: |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 void VcmPayloadSinkFactory::Remove(VcmPayloadSink* sink) { | 195 void VcmPayloadSinkFactory::Remove(VcmPayloadSink* sink) { |
194 assert(sink); | 196 assert(sink); |
195 CriticalSectionScoped cs(crit_sect_.get()); | 197 CriticalSectionScoped cs(crit_sect_.get()); |
196 Sinks::iterator it = std::find(sinks_.begin(), sinks_.end(), sink); | 198 Sinks::iterator it = std::find(sinks_.begin(), sinks_.end(), sink); |
197 assert(it != sinks_.end()); | 199 assert(it != sinks_.end()); |
198 sinks_.erase(it); | 200 sinks_.erase(it); |
199 } | 201 } |
200 | 202 |
201 } // namespace rtpplayer | 203 } // namespace rtpplayer |
202 } // namespace webrtc | 204 } // namespace webrtc |
OLD | NEW |