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

Side by Side Diff: media/gpu/android_video_decode_accelerator.cc

Issue 2598313002: Use GetProfileName() for error logs in gpu_video_decode_accelerator.cc (Closed)
Patch Set: Use GetProfileName() to better explain logs displaying VideoCodecProfile. Created 3 years, 11 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 | « media/filters/gpu_video_decoder.cc ('k') | media/gpu/android_video_encode_accelerator.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 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "media/gpu/android_video_decode_accelerator.h" 5 #include "media/gpu/android_video_decode_accelerator.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 codec_config_ = new CodecConfig(); 281 codec_config_ = new CodecConfig();
282 codec_config_->codec = VideoCodecProfileToVideoCodec(config.profile); 282 codec_config_->codec = VideoCodecProfileToVideoCodec(config.profile);
283 codec_config_->initial_expected_coded_size = 283 codec_config_->initial_expected_coded_size =
284 config.initial_expected_coded_size; 284 config.initial_expected_coded_size;
285 285
286 if (codec_config_->codec != kCodecVP8 && codec_config_->codec != kCodecVP9 && 286 if (codec_config_->codec != kCodecVP8 && codec_config_->codec != kCodecVP9 &&
287 #if BUILDFLAG(ENABLE_HEVC_DEMUXING) 287 #if BUILDFLAG(ENABLE_HEVC_DEMUXING)
288 codec_config_->codec != kCodecHEVC && 288 codec_config_->codec != kCodecHEVC &&
289 #endif 289 #endif
290 codec_config_->codec != kCodecH264) { 290 codec_config_->codec != kCodecH264) {
291 DLOG(ERROR) << "Unsupported profile: " << config.profile; 291 DLOG(ERROR) << "Unsupported profile: " << GetProfileName(config.profile);
292 return false; 292 return false;
293 } 293 }
294 294
295 if (codec_config_->codec == kCodecH264) { 295 if (codec_config_->codec == kCodecH264) {
296 codec_config_->csd0 = config.sps; 296 codec_config_->csd0 = config.sps;
297 codec_config_->csd1 = config.pps; 297 codec_config_->csd1 = config.pps;
298 } 298 }
299 299
300 // Only use MediaCodec for VP8/9 if it's likely backed by hardware 300 // Only use MediaCodec for VP8/9 if it's likely backed by hardware
301 // or if the stream is encrypted. 301 // or if the stream is encrypted.
(...skipping 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after
1494 AVDACodecAllocator::Instance()->DeallocateSurface(this, new_surface_id); 1494 AVDACodecAllocator::Instance()->DeallocateSurface(this, new_surface_id);
1495 } 1495 }
1496 1496
1497 // Regardless of whether we succeeded, we no longer own the previous surface. 1497 // Regardless of whether we succeeded, we no longer own the previous surface.
1498 AVDACodecAllocator::Instance()->DeallocateSurface(this, previous_surface_id); 1498 AVDACodecAllocator::Instance()->DeallocateSurface(this, previous_surface_id);
1499 1499
1500 return success; 1500 return success;
1501 } 1501 }
1502 1502
1503 } // namespace media 1503 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/gpu_video_decoder.cc ('k') | media/gpu/android_video_encode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698