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

Side by Side Diff: webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_encoder.mm

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
« no previous file with comments | « webrtc/modules/video_coding/generic_encoder.cc ('k') | webrtc/test/frame_generator.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) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 return ResetCompressionSession(); 373 return ResetCompressionSession();
374 } 374 }
375 375
376 int H264VideoToolboxEncoder::Encode( 376 int H264VideoToolboxEncoder::Encode(
377 const VideoFrame& frame, 377 const VideoFrame& frame,
378 const CodecSpecificInfo* codec_specific_info, 378 const CodecSpecificInfo* codec_specific_info,
379 const std::vector<FrameType>* frame_types) { 379 const std::vector<FrameType>* frame_types) {
380 // |input_frame| size should always match codec settings. 380 // |input_frame| size should always match codec settings.
381 RTC_DCHECK_EQ(frame.width(), width_); 381 RTC_DCHECK_EQ(frame.width(), width_);
382 RTC_DCHECK_EQ(frame.height(), height_); 382 RTC_DCHECK_EQ(frame.height(), height_);
383 RTC_DCHECK(!frame.IsZeroSize());
384 if (!callback_ || !compression_session_) { 383 if (!callback_ || !compression_session_) {
385 return WEBRTC_VIDEO_CODEC_UNINITIALIZED; 384 return WEBRTC_VIDEO_CODEC_UNINITIALIZED;
386 } 385 }
387 #if defined(WEBRTC_IOS) 386 #if defined(WEBRTC_IOS)
388 if (!RTCIsUIApplicationActive()) { 387 if (!RTCIsUIApplicationActive()) {
389 // Ignore all encode requests when app isn't active. In this state, the 388 // Ignore all encode requests when app isn't active. In this state, the
390 // hardware encoder has been invalidated by the OS. 389 // hardware encoder has been invalidated by the OS.
391 return WEBRTC_VIDEO_CODEC_OK; 390 return WEBRTC_VIDEO_CODEC_OK;
392 } 391 }
393 #endif 392 #endif
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 } 729 }
731 bitrate_adjuster_.Update(frame._size); 730 bitrate_adjuster_.Update(frame._size);
732 } 731 }
733 732
734 VideoEncoder::ScalingSettings H264VideoToolboxEncoder::GetScalingSettings() 733 VideoEncoder::ScalingSettings H264VideoToolboxEncoder::GetScalingSettings()
735 const { 734 const {
736 return VideoEncoder::ScalingSettings(true, internal::kLowH264QpThreshold, 735 return VideoEncoder::ScalingSettings(true, internal::kLowH264QpThreshold,
737 internal::kHighH264QpThreshold); 736 internal::kHighH264QpThreshold);
738 } 737 }
739 } // namespace webrtc 738 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/generic_encoder.cc ('k') | webrtc/test/frame_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698