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

Side by Side Diff: media/filters/gpu_video_decoder.cc

Issue 2708353004: Propagate color space from the container to the codec. (Closed)
Patch Set: Created 3 years, 10 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 | media/filters/h264_parser.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/filters/gpu_video_decoder.h" 5 #include "media/filters/gpu_video_decoder.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <array> 8 #include <array>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 DCHECK(!init_cb_.is_null()); 354 DCHECK(!init_cb_.is_null());
355 DCHECK(!vda_initialized_); 355 DCHECK(!vda_initialized_);
356 356
357 VideoDecodeAccelerator::Config vda_config; 357 VideoDecodeAccelerator::Config vda_config;
358 vda_config.profile = config_.profile(); 358 vda_config.profile = config_.profile();
359 vda_config.cdm_id = cdm_id_; 359 vda_config.cdm_id = cdm_id_;
360 vda_config.surface_id = surface_id; 360 vda_config.surface_id = surface_id;
361 vda_config.encryption_scheme = config_.encryption_scheme(); 361 vda_config.encryption_scheme = config_.encryption_scheme();
362 vda_config.is_deferred_initialization_allowed = true; 362 vda_config.is_deferred_initialization_allowed = true;
363 vda_config.initial_expected_coded_size = config_.coded_size(); 363 vda_config.initial_expected_coded_size = config_.coded_size();
364 vda_config.color_space = config_.color_space_info();
364 365
365 #if defined(OS_ANDROID) && BUILDFLAG(USE_PROPRIETARY_CODECS) 366 #if defined(OS_ANDROID) && BUILDFLAG(USE_PROPRIETARY_CODECS)
366 // We pass the SPS and PPS on Android because it lets us initialize 367 // We pass the SPS and PPS on Android because it lets us initialize
367 // MediaCodec more reliably (http://crbug.com/649185). 368 // MediaCodec more reliably (http://crbug.com/649185).
368 if (config_.codec() == kCodecH264) 369 if (config_.codec() == kCodecH264)
369 ExtractSpsAndPps(config_.extra_data(), &vda_config.sps, &vda_config.pps); 370 ExtractSpsAndPps(config_.extra_data(), &vda_config.sps, &vda_config.pps);
370 #endif 371 #endif
371 372
372 vda_initialized_ = true; 373 vda_initialized_ = true;
373 if (!vda_->Initialize(vda_config, this)) { 374 if (!vda_->Initialize(vda_config, this)) {
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 } 909 }
909 return false; 910 return false;
910 } 911 }
911 912
912 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() 913 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent()
913 const { 914 const {
914 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); 915 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread());
915 } 916 }
916 917
917 } // namespace media 918 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/filters/h264_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698