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

Side by Side Diff: chrome/gpu/arc_gpu_video_decode_accelerator.cc

Issue 2151183002: Skip posting DecodeTask of resolution changing while resetting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Enable VP9 decoding Created 4 years, 4 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 | chrome/gpu/arc_video_accelerator.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "chrome/gpu/arc_gpu_video_decode_accelerator.h" 5 #include "chrome/gpu/arc_gpu_video_decode_accelerator.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/numerics/safe_math.h" 9 #include "base/numerics/safe_math.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 input_buffer_info_.resize(config.num_input_buffers); 95 input_buffer_info_.resize(config.num_input_buffers);
96 96
97 media::VideoDecodeAccelerator::Config vda_config; 97 media::VideoDecodeAccelerator::Config vda_config;
98 switch (config.input_pixel_format) { 98 switch (config.input_pixel_format) {
99 case HAL_PIXEL_FORMAT_H264: 99 case HAL_PIXEL_FORMAT_H264:
100 vda_config.profile = media::H264PROFILE_MAIN; 100 vda_config.profile = media::H264PROFILE_MAIN;
101 break; 101 break;
102 case HAL_PIXEL_FORMAT_VP8: 102 case HAL_PIXEL_FORMAT_VP8:
103 vda_config.profile = media::VP8PROFILE_ANY; 103 vda_config.profile = media::VP8PROFILE_ANY;
104 break; 104 break;
105 case HAL_PIXEL_FORMAT_VP9:
106 vda_config.profile = media::VP9PROFILE_PROFILE0;
107 break;
105 default: 108 default:
106 DLOG(ERROR) << "Unsupported input format: " << config.input_pixel_format; 109 DLOG(ERROR) << "Unsupported input format: " << config.input_pixel_format;
107 return INVALID_ARGUMENT; 110 return INVALID_ARGUMENT;
108 } 111 }
109 vda_config.output_mode = 112 vda_config.output_mode =
110 media::VideoDecodeAccelerator::Config::OutputMode::IMPORT; 113 media::VideoDecodeAccelerator::Config::OutputMode::IMPORT;
111 114
112 std::unique_ptr<content::GpuVideoDecodeAcceleratorFactory> vda_factory = 115 std::unique_ptr<content::GpuVideoDecodeAcceleratorFactory> vda_factory =
113 content::GpuVideoDecodeAcceleratorFactory::CreateWithNoGL(); 116 content::GpuVideoDecodeAcceleratorFactory::CreateWithNoGL();
114 vda_ = vda_factory->CreateVDA(this, vda_config); 117 vda_ = vda_factory->CreateVDA(this, vda_config);
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 } 494 }
492 return true; 495 return true;
493 default: 496 default:
494 DLOG(ERROR) << "Invalid port: " << port; 497 DLOG(ERROR) << "Invalid port: " << port;
495 return false; 498 return false;
496 } 499 }
497 } 500 }
498 501
499 } // namespace arc 502 } // namespace arc
500 } // namespace chromeos 503 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/gpu/arc_video_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698