Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Side by Side Diff: webrtc/modules/video_coding/test/vcm_payload_sink_factory.cc

Issue 1736663004: Revert of Remove ignored return code from modules. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « webrtc/modules/video_capture/video_capture_impl.cc ('k') | webrtc/modules/video_coding/video_coding_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698