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

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

Issue 2273793002: Don't fail on profile changes in GpuVideoDecoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make MSE stop lying. Created 4 years, 3 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.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 (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 <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 DVLOG(1) << "Encrypted stream not supported."; 180 DVLOG(1) << "Encrypted stream not supported.";
181 bound_init_cb.Run(false); 181 bound_init_cb.Run(false);
182 return; 182 return;
183 } 183 }
184 #endif 184 #endif
185 185
186 bool previously_initialized = config_.IsValidConfig(); 186 bool previously_initialized = config_.IsValidConfig();
187 DVLOG(1) << (previously_initialized ? "Reinitializing" : "Initializing") 187 DVLOG(1) << (previously_initialized ? "Reinitializing" : "Initializing")
188 << " GVD with config: " << config.AsHumanReadableString(); 188 << " GVD with config: " << config.AsHumanReadableString();
189 189
190 // TODO(posciak): destroy and create a new VDA on codec/profile change 190 // Disallow codec changes between configuration changes.
191 // (http://crbug.com/260224). 191 if (previously_initialized && config_.codec() != config.codec()) {
192 if (previously_initialized && (config_.profile() != config.profile())) { 192 DVLOG(1) << "Codec changed, cannot reinitialize.";
193 DVLOG(1) << "Codec or profile changed, cannot reinitialize.";
194 bound_init_cb.Run(false); 193 bound_init_cb.Run(false);
195 return; 194 return;
196 } 195 }
197 196
198 // TODO(sandersd): This should be moved to capabilities if we ever have a 197 // TODO(sandersd): This should be moved to capabilities if we ever have a
199 // hardware decoder which supports alpha formats. 198 // hardware decoder which supports alpha formats.
200 if (config.format() == PIXEL_FORMAT_YV12A) { 199 if (config.format() == PIXEL_FORMAT_YV12A) {
201 DVLOG(1) << "Alpha transparency formats are not supported."; 200 DVLOG(1) << "Alpha transparency formats are not supported.";
202 bound_init_cb.Run(false); 201 bound_init_cb.Run(false);
203 return; 202 return;
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 } 824 }
826 return false; 825 return false;
827 } 826 }
828 827
829 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() 828 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent()
830 const { 829 const {
831 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); 830 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread());
832 } 831 }
833 832
834 } // namespace media 833 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/filters/h264_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698