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

Side by Side Diff: webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc

Issue 2541863002: Delete VideoFrame default constructor, and IsZeroSize method. (Closed)
Patch Set: Initialize pixel data in VideoBroadcasterTest.OnFrame test. 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 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 const uint32_t min_intra_size = 300; 479 const uint32_t min_intra_size = 300;
480 return (target_pct < min_intra_size) ? min_intra_size : target_pct; 480 return (target_pct < min_intra_size) ? min_intra_size : target_pct;
481 } 481 }
482 482
483 int VP9EncoderImpl::Encode(const VideoFrame& input_image, 483 int VP9EncoderImpl::Encode(const VideoFrame& input_image,
484 const CodecSpecificInfo* codec_specific_info, 484 const CodecSpecificInfo* codec_specific_info,
485 const std::vector<FrameType>* frame_types) { 485 const std::vector<FrameType>* frame_types) {
486 if (!inited_) { 486 if (!inited_) {
487 return WEBRTC_VIDEO_CODEC_UNINITIALIZED; 487 return WEBRTC_VIDEO_CODEC_UNINITIALIZED;
488 } 488 }
489 if (input_image.IsZeroSize()) {
490 return WEBRTC_VIDEO_CODEC_ERR_PARAMETER;
491 }
492 if (encoded_complete_callback_ == NULL) { 489 if (encoded_complete_callback_ == NULL) {
493 return WEBRTC_VIDEO_CODEC_UNINITIALIZED; 490 return WEBRTC_VIDEO_CODEC_UNINITIALIZED;
494 } 491 }
495 FrameType frame_type = kVideoFrameDelta; 492 FrameType frame_type = kVideoFrameDelta;
496 // We only support one stream at the moment. 493 // We only support one stream at the moment.
497 if (frame_types && frame_types->size() > 0) { 494 if (frame_types && frame_types->size() > 0) {
498 frame_type = (*frame_types)[0]; 495 frame_type = (*frame_types)[0];
499 } 496 }
500 RTC_DCHECK_EQ(input_image.width(), raw_->d_w); 497 RTC_DCHECK_EQ(input_image.width(), raw_->d_w);
501 RTC_DCHECK_EQ(input_image.height(), raw_->d_h); 498 RTC_DCHECK_EQ(input_image.height(), raw_->d_h);
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 frame_buffer_pool_.ClearPool(); 996 frame_buffer_pool_.ClearPool();
1000 inited_ = false; 997 inited_ = false;
1001 return WEBRTC_VIDEO_CODEC_OK; 998 return WEBRTC_VIDEO_CODEC_OK;
1002 } 999 }
1003 1000
1004 const char* VP9DecoderImpl::ImplementationName() const { 1001 const char* VP9DecoderImpl::ImplementationName() const {
1005 return "libvpx"; 1002 return "libvpx";
1006 } 1003 }
1007 1004
1008 } // namespace webrtc 1005 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc ('k') | webrtc/modules/video_coding/generic_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698