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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |