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

Side by Side Diff: webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.cc

Issue 2574183002: Reland of Delete VideoFrame default constructor, and IsZeroSize method. (Closed)
Patch Set: Use FrameComparison::input_time_ms. Created 4 years 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) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 // matches the destination or the input image is empty (e.g. 293 // matches the destination or the input image is empty (e.g.
294 // a keyframe request for encoders with internal camera 294 // a keyframe request for encoders with internal camera
295 // sources) or the source image has a native handle, pass the image on 295 // sources) or the source image has a native handle, pass the image on
296 // directly. Otherwise, we'll scale it to match what the encoder expects 296 // directly. Otherwise, we'll scale it to match what the encoder expects
297 // (below). 297 // (below).
298 // For texture frames, the underlying encoder is expected to be able to 298 // For texture frames, the underlying encoder is expected to be able to
299 // correctly sample/scale the source texture. 299 // correctly sample/scale the source texture.
300 // TODO(perkj): ensure that works going forward, and figure out how this 300 // TODO(perkj): ensure that works going forward, and figure out how this
301 // affects webrtc:5683. 301 // affects webrtc:5683.
302 if ((dst_width == src_width && dst_height == src_height) || 302 if ((dst_width == src_width && dst_height == src_height) ||
303 input_image.IsZeroSize() ||
304 input_image.video_frame_buffer()->native_handle()) { 303 input_image.video_frame_buffer()->native_handle()) {
305 int ret = streaminfos_[stream_idx].encoder->Encode( 304 int ret = streaminfos_[stream_idx].encoder->Encode(
306 input_image, codec_specific_info, &stream_frame_types); 305 input_image, codec_specific_info, &stream_frame_types);
307 if (ret != WEBRTC_VIDEO_CODEC_OK) { 306 if (ret != WEBRTC_VIDEO_CODEC_OK) {
308 return ret; 307 return ret;
309 } 308 }
310 } else { 309 } else {
311 // Aligning stride values based on width. 310 // Aligning stride values based on width.
312 rtc::scoped_refptr<I420Buffer> dst_buffer = 311 rtc::scoped_refptr<I420Buffer> dst_buffer =
313 I420Buffer::Create(dst_width, dst_height, dst_width, 312 I420Buffer::Create(dst_width, dst_height, dst_width,
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 if (NumberOfStreams(codec_) != 1) 469 if (NumberOfStreams(codec_) != 1)
471 return VideoEncoder::ScalingSettings(false); 470 return VideoEncoder::ScalingSettings(false);
472 return streaminfos_[0].encoder->GetScalingSettings(); 471 return streaminfos_[0].encoder->GetScalingSettings();
473 } 472 }
474 473
475 const char* SimulcastEncoderAdapter::ImplementationName() const { 474 const char* SimulcastEncoderAdapter::ImplementationName() const {
476 return implementation_name_.c_str(); 475 return implementation_name_.c_str();
477 } 476 }
478 477
479 } // namespace webrtc 478 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698