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

Side by Side Diff: content/common/gpu/media/vt_video_decode_accelerator.cc

Issue 1485043002: Passed is_encrypted parameter to the VDA initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Deleted erroneously added files Created 5 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <algorithm> 5 #include <algorithm>
6 6
7 #include <CoreVideo/CoreVideo.h> 7 #include <CoreVideo/CoreVideo.h>
8 #include <OpenGL/CGLIOSurface.h> 8 #include <OpenGL/CGLIOSurface.h>
9 #include <OpenGL/gl.h> 9 #include <OpenGL/gl.h>
10 10
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 callback_.decompressionOutputCallback = OutputThunk; 307 callback_.decompressionOutputCallback = OutputThunk;
308 callback_.decompressionOutputRefCon = this; 308 callback_.decompressionOutputRefCon = this;
309 weak_this_ = weak_this_factory_.GetWeakPtr(); 309 weak_this_ = weak_this_factory_.GetWeakPtr();
310 } 310 }
311 311
312 VTVideoDecodeAccelerator::~VTVideoDecodeAccelerator() { 312 VTVideoDecodeAccelerator::~VTVideoDecodeAccelerator() {
313 DCHECK(gpu_thread_checker_.CalledOnValidThread()); 313 DCHECK(gpu_thread_checker_.CalledOnValidThread());
314 } 314 }
315 315
316 bool VTVideoDecodeAccelerator::Initialize( 316 bool VTVideoDecodeAccelerator::Initialize(
317 media::VideoCodecProfile profile, 317 const media::VideoDecodeAccelerator::InitParams& params,
318 Client* client) { 318 Client* client) {
319 DCHECK(gpu_thread_checker_.CalledOnValidThread()); 319 DCHECK(gpu_thread_checker_.CalledOnValidThread());
320 client_ = client; 320 client_ = client;
321 321
322 if (!InitializeVideoToolbox()) 322 if (!InitializeVideoToolbox())
323 return false; 323 return false;
324 324
325 bool profile_supported = false; 325 bool profile_supported = false;
326 for (const auto& supported_profile : kSupportedProfiles) { 326 for (const auto& supported_profile : kSupportedProfiles) {
327 if (profile == supported_profile) { 327 if (params.profile == supported_profile) {
328 profile_supported = true; 328 profile_supported = true;
329 break; 329 break;
330 } 330 }
331 } 331 }
332 if (!profile_supported) 332 if (!profile_supported)
333 return false; 333 return false;
334 334
335 // Spawn a thread to handle parsing and calling VideoToolbox. 335 // Spawn a thread to handle parsing and calling VideoToolbox.
336 if (!decoder_thread_.Start()) 336 if (!decoder_thread_.Start())
337 return false; 337 return false;
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 SupportedProfile profile; 1130 SupportedProfile profile;
1131 profile.profile = supported_profile; 1131 profile.profile = supported_profile;
1132 profile.min_resolution.SetSize(16, 16); 1132 profile.min_resolution.SetSize(16, 16);
1133 profile.max_resolution.SetSize(4096, 2160); 1133 profile.max_resolution.SetSize(4096, 2160);
1134 profiles.push_back(profile); 1134 profiles.push_back(profile);
1135 } 1135 }
1136 return profiles; 1136 return profiles;
1137 } 1137 }
1138 1138
1139 } // namespace content 1139 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698