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

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

Issue 2045273005: Have VDA clients inform decoder of supported picture buffer formats (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 default: 105 default:
106 DLOG(ERROR) << "Unsupported input format: " << config.input_pixel_format; 106 DLOG(ERROR) << "Unsupported input format: " << config.input_pixel_format;
107 return INVALID_ARGUMENT; 107 return INVALID_ARGUMENT;
108 } 108 }
109 vda_config.output_mode = 109 vda_config.output_mode =
110 media::VideoDecodeAccelerator::Config::OutputMode::IMPORT; 110 media::VideoDecodeAccelerator::Config::OutputMode::IMPORT;
111 vda_config.supported_output_formats.assign(
112 {media::PIXEL_FORMAT_I420, media::PIXEL_FORMAT_YV12,
113 media::PIXEL_FORMAT_NV12, media::PIXEL_FORMAT_NV21,
114 media::PIXEL_FORMAT_ARGB});
111 115
112 std::unique_ptr<content::GpuVideoDecodeAcceleratorFactory> vda_factory = 116 std::unique_ptr<content::GpuVideoDecodeAcceleratorFactory> vda_factory =
113 content::GpuVideoDecodeAcceleratorFactory::CreateWithNoGL(); 117 content::GpuVideoDecodeAcceleratorFactory::CreateWithNoGL();
114 vda_ = vda_factory->CreateVDA(this, vda_config); 118 vda_ = vda_factory->CreateVDA(this, vda_config);
115 if (!vda_) { 119 if (!vda_) {
116 DLOG(ERROR) << "Failed to create VDA."; 120 DLOG(ERROR) << "Failed to create VDA.";
117 return PLATFORM_FAILURE; 121 return PLATFORM_FAILURE;
118 } 122 }
119 123
120 client_count_++; 124 client_count_++;
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 } 494 }
491 return true; 495 return true;
492 default: 496 default:
493 DLOG(ERROR) << "Invalid port: " << port; 497 DLOG(ERROR) << "Invalid port: " << port;
494 return false; 498 return false;
495 } 499 }
496 } 500 }
497 501
498 } // namespace arc 502 } // namespace arc
499 } // namespace chromeos 503 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/rtc_video_decoder.cc » ('j') | media/video/video_decode_accelerator.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698