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

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

Issue 1763693002: Move encoder thread to VideoSendStream. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: feedback Created 4 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/vie_encoder.h ('k') | no next file » | 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) 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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 } 337 }
338 338
339 void ViEEncoder::TraceFrameDropEnd() { 339 void ViEEncoder::TraceFrameDropEnd() {
340 // End trace event on first frame after encoder resumes, if frame was dropped. 340 // End trace event on first frame after encoder resumes, if frame was dropped.
341 if (encoder_paused_and_dropped_frame_) { 341 if (encoder_paused_and_dropped_frame_) {
342 TRACE_EVENT_ASYNC_END0("webrtc", "EncoderPaused", this); 342 TRACE_EVENT_ASYNC_END0("webrtc", "EncoderPaused", this);
343 } 343 }
344 encoder_paused_and_dropped_frame_ = false; 344 encoder_paused_and_dropped_frame_ = false;
345 } 345 }
346 346
347 void ViEEncoder::DeliverFrame(VideoFrame video_frame) { 347 void ViEEncoder::EncodeVideoFrame(const VideoFrame& video_frame) {
348 if (!send_payload_router_->active()) { 348 if (!send_payload_router_->active()) {
349 // We've paused or we have no channels attached, don't waste resources on 349 // We've paused or we have no channels attached, don't waste resources on
350 // encoding. 350 // encoding.
351 return; 351 return;
352 } 352 }
353 VideoCodecType codec_type; 353 VideoCodecType codec_type;
354 { 354 {
355 rtc::CritScope lock(&data_cs_); 355 rtc::CritScope lock(&data_cs_);
356 time_of_last_frame_activity_ms_ = TickTime::MillisecondTimestamp(); 356 time_of_last_frame_activity_ms_ = TickTime::MillisecondTimestamp();
357 if (EncoderPaused()) { 357 if (EncoderPaused()) {
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 const uint32_t width, 568 const uint32_t width,
569 const uint32_t height) { 569 const uint32_t height) {
570 return vp_->SetTargetResolution(width, height, frame_rate); 570 return vp_->SetTargetResolution(width, height, frame_rate);
571 } 571 }
572 572
573 void QMVideoSettingsCallback::SetTargetFramerate(int frame_rate) { 573 void QMVideoSettingsCallback::SetTargetFramerate(int frame_rate) {
574 vp_->SetTargetFramerate(frame_rate); 574 vp_->SetTargetFramerate(frame_rate);
575 } 575 }
576 576
577 } // namespace webrtc 577 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/vie_encoder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698