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

Side by Side Diff: content/renderer/media/rtc_video_decoder.cc

Issue 1412943003: Update VideoFrameType to FrameType in RTC coders. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | content/renderer/media/rtc_video_encoder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/media/rtc_video_decoder.h" 5 #include "content/renderer/media/rtc_video_decoder.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 // internally. Platforms whose VDAs fail to support mid-stream resolution 186 // internally. Platforms whose VDAs fail to support mid-stream resolution
187 // change gracefully need to have their clients cover for them, and we do that 187 // change gracefully need to have their clients cover for them, and we do that
188 // here. 188 // here.
189 #ifdef ANDROID 189 #ifdef ANDROID
190 const bool kVDACanHandleMidstreamResize = false; 190 const bool kVDACanHandleMidstreamResize = false;
191 #else 191 #else
192 const bool kVDACanHandleMidstreamResize = true; 192 const bool kVDACanHandleMidstreamResize = true;
193 #endif 193 #endif
194 194
195 bool need_to_reset_for_midstream_resize = false; 195 bool need_to_reset_for_midstream_resize = false;
196 if (inputImage._frameType == webrtc::kKeyFrame) { 196 if (inputImage._frameType == webrtc::kVideoFrameKey) {
mcasas 2015/10/19 17:47:04 nit: I'd call it |kKeyVideoFrame|.
197 gfx::Size new_frame_size(inputImage._encodedWidth, 197 gfx::Size new_frame_size(inputImage._encodedWidth,
198 inputImage._encodedHeight); 198 inputImage._encodedHeight);
199 DVLOG(2) << "Got key frame. size=" << new_frame_size.ToString(); 199 DVLOG(2) << "Got key frame. size=" << new_frame_size.ToString();
200 200
201 if (new_frame_size.width() > max_resolution_.width() || 201 if (new_frame_size.width() > max_resolution_.width() ||
202 new_frame_size.width() < min_resolution_.width() || 202 new_frame_size.width() < min_resolution_.width() ||
203 new_frame_size.height() > max_resolution_.height() || 203 new_frame_size.height() > max_resolution_.height() ||
204 new_frame_size.height() < min_resolution_.height()) { 204 new_frame_size.height() < min_resolution_.height()) {
205 DVLOG(1) << "Resolution unsupported, falling back to software decode"; 205 DVLOG(1) << "Resolution unsupported, falling back to software decode";
206 return WEBRTC_VIDEO_CODEC_FALLBACK_SOFTWARE; 206 return WEBRTC_VIDEO_CODEC_FALLBACK_SOFTWARE;
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 for (std::deque<std::pair<webrtc::EncodedImage, BufferData>>::iterator it = 826 for (std::deque<std::pair<webrtc::EncodedImage, BufferData>>::iterator it =
827 pending_buffers_.begin(); 827 pending_buffers_.begin();
828 it != pending_buffers_.end(); ++it) { 828 it != pending_buffers_.end(); ++it) {
829 delete[] it->first._buffer; 829 delete[] it->first._buffer;
830 } 830 }
831 831
832 pending_buffers_.clear(); 832 pending_buffers_.clear();
833 } 833 }
834 834
835 } // namespace content 835 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/rtc_video_encoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698