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

Side by Side Diff: media/gpu/ipc/service/gpu_video_decode_accelerator.cc

Issue 2058113002: Add 'cbcs' encryption scheme support in Android media. (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 (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/gpu/ipc/service/gpu_video_decode_accelerator.h" 5 #include "media/gpu/ipc/service/gpu_video_decode_accelerator.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 LOG(ERROR) << "Failed creating the VDA factory"; 352 LOG(ERROR) << "Failed creating the VDA factory";
353 return false; 353 return false;
354 } 354 }
355 355
356 const gpu::GpuPreferences& gpu_preferences = 356 const gpu::GpuPreferences& gpu_preferences =
357 stub_->channel()->gpu_channel_manager()->gpu_preferences(); 357 stub_->channel()->gpu_channel_manager()->gpu_preferences();
358 video_decode_accelerator_ = 358 video_decode_accelerator_ =
359 vda_factory->CreateVDA(this, config, gpu_preferences); 359 vda_factory->CreateVDA(this, config, gpu_preferences);
360 if (!video_decode_accelerator_) { 360 if (!video_decode_accelerator_) {
361 LOG(ERROR) << "HW video decode not available for profile " << config.profile 361 LOG(ERROR) << "HW video decode not available for profile " << config.profile
362 << (config.is_encrypted ? " with encryption" : ""); 362 << (config.is_encrypted() ? " with encryption" : "");
363 return false; 363 return false;
364 } 364 }
365 365
366 // Attempt to set up performing decoding tasks on IO thread, if supported by 366 // Attempt to set up performing decoding tasks on IO thread, if supported by
367 // the VDA. 367 // the VDA.
368 if (video_decode_accelerator_->TryToSetupDecodeOnSeparateThread( 368 if (video_decode_accelerator_->TryToSetupDecodeOnSeparateThread(
369 weak_factory_for_io_.GetWeakPtr(), io_task_runner_)) { 369 weak_factory_for_io_.GetWeakPtr(), io_task_runner_)) {
370 filter_ = new MessageFilter(this, host_route_id_); 370 filter_ = new MessageFilter(this, host_route_id_);
371 stub_->channel()->AddFilter(filter_.get()); 371 stub_->channel()->AddFilter(filter_.get());
372 } 372 }
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 GLenum target = texture_ref->texture()->target(); 511 GLenum target = texture_ref->texture()->target();
512 gpu::gles2::TextureManager* texture_manager = 512 gpu::gles2::TextureManager* texture_manager =
513 stub_->decoder()->GetContextGroup()->texture_manager(); 513 stub_->decoder()->GetContextGroup()->texture_manager();
514 DCHECK(!texture_ref->texture()->IsLevelCleared(target, 0)); 514 DCHECK(!texture_ref->texture()->IsLevelCleared(target, 0));
515 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true); 515 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true);
516 } 516 }
517 uncleared_textures_.erase(it); 517 uncleared_textures_.erase(it);
518 } 518 }
519 519
520 } // namespace media 520 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698