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

Side by Side Diff: webrtc/video/video_receive_stream.cc

Issue 2729053002: Add location to RegisterModule (Closed)
Patch Set: Format BUILD.gn Created 3 years, 9 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
« no previous file with comments | « webrtc/video/rtp_stream_receiver.cc ('k') | webrtc/video/video_send_stream.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
11 #include "webrtc/video/video_receive_stream.h" 11 #include "webrtc/video/video_receive_stream.h"
12 12
13 #include <stdlib.h> 13 #include <stdlib.h>
14 14
15 #include <set> 15 #include <set>
16 #include <string> 16 #include <string>
17 #include <utility> 17 #include <utility>
18 18
19 #include "webrtc/base/checks.h" 19 #include "webrtc/base/checks.h"
20 #include "webrtc/base/location.h"
20 #include "webrtc/base/logging.h" 21 #include "webrtc/base/logging.h"
21 #include "webrtc/base/optional.h" 22 #include "webrtc/base/optional.h"
22 #include "webrtc/common_video/h264/profile_level_id.h" 23 #include "webrtc/common_video/h264/profile_level_id.h"
23 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" 24 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
24 #include "webrtc/modules/rtp_rtcp/include/rtp_receiver.h" 25 #include "webrtc/modules/rtp_rtcp/include/rtp_receiver.h"
25 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" 26 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h"
26 #include "webrtc/modules/utility/include/process_thread.h" 27 #include "webrtc/modules/utility/include/process_thread.h"
27 #include "webrtc/modules/video_coding/frame_object.h" 28 #include "webrtc/modules/video_coding/frame_object.h"
28 #include "webrtc/modules/video_coding/include/video_coding.h" 29 #include "webrtc/modules/video_coding/include/video_coding.h"
29 #include "webrtc/modules/video_coding/jitter_estimator.h" 30 #include "webrtc/modules/video_coding/jitter_estimator.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 << ") for different decoders."; 221 << ") for different decoders.";
221 decoder_payload_types.insert(decoder.payload_type); 222 decoder_payload_types.insert(decoder.payload_type);
222 } 223 }
223 224
224 video_receiver_.SetRenderDelay(config.render_delay_ms); 225 video_receiver_.SetRenderDelay(config.render_delay_ms);
225 226
226 jitter_estimator_.reset(new VCMJitterEstimator(clock_)); 227 jitter_estimator_.reset(new VCMJitterEstimator(clock_));
227 frame_buffer_.reset(new video_coding::FrameBuffer( 228 frame_buffer_.reset(new video_coding::FrameBuffer(
228 clock_, jitter_estimator_.get(), timing_.get(), &stats_proxy_)); 229 clock_, jitter_estimator_.get(), timing_.get(), &stats_proxy_));
229 230
230 process_thread_->RegisterModule(&video_receiver_); 231 process_thread_->RegisterModule(&video_receiver_, RTC_FROM_HERE);
231 process_thread_->RegisterModule(&rtp_stream_sync_); 232 process_thread_->RegisterModule(&rtp_stream_sync_, RTC_FROM_HERE);
232 } 233 }
233 234
234 VideoReceiveStream::~VideoReceiveStream() { 235 VideoReceiveStream::~VideoReceiveStream() {
235 RTC_DCHECK_RUN_ON(&worker_thread_checker_); 236 RTC_DCHECK_RUN_ON(&worker_thread_checker_);
236 LOG(LS_INFO) << "~VideoReceiveStream: " << config_.ToString(); 237 LOG(LS_INFO) << "~VideoReceiveStream: " << config_.ToString();
237 Stop(); 238 Stop();
238 239
239 process_thread_->DeRegisterModule(&rtp_stream_sync_); 240 process_thread_->DeRegisterModule(&rtp_stream_sync_);
240 process_thread_->DeRegisterModule(&video_receiver_); 241 process_thread_->DeRegisterModule(&video_receiver_);
241 } 242 }
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 rtp_stream_receiver_.FrameDecoded(frame->picture_id); 486 rtp_stream_receiver_.FrameDecoded(frame->picture_id);
486 } else { 487 } else {
487 LOG(LS_WARNING) << "No decodable frame in " << kMaxWaitForFrameMs 488 LOG(LS_WARNING) << "No decodable frame in " << kMaxWaitForFrameMs
488 << " ms, requesting keyframe."; 489 << " ms, requesting keyframe.";
489 RequestKeyFrame(); 490 RequestKeyFrame();
490 } 491 }
491 return true; 492 return true;
492 } 493 }
493 } // namespace internal 494 } // namespace internal
494 } // namespace webrtc 495 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/rtp_stream_receiver.cc ('k') | webrtc/video/video_send_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698