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

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: rebase Created 4 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 (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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 } 364 }
365 365
366 const gpu::GpuDriverBugWorkarounds& gpu_workarounds = 366 const gpu::GpuDriverBugWorkarounds& gpu_workarounds =
367 stub_->channel()->gpu_channel_manager()->gpu_driver_bug_workarounds(); 367 stub_->channel()->gpu_channel_manager()->gpu_driver_bug_workarounds();
368 const gpu::GpuPreferences& gpu_preferences = 368 const gpu::GpuPreferences& gpu_preferences =
369 stub_->channel()->gpu_channel_manager()->gpu_preferences(); 369 stub_->channel()->gpu_channel_manager()->gpu_preferences();
370 video_decode_accelerator_ = 370 video_decode_accelerator_ =
371 vda_factory->CreateVDA(this, config, gpu_workarounds, gpu_preferences); 371 vda_factory->CreateVDA(this, config, gpu_workarounds, gpu_preferences);
372 if (!video_decode_accelerator_) { 372 if (!video_decode_accelerator_) {
373 LOG(ERROR) << "HW video decode not available for profile " << config.profile 373 LOG(ERROR) << "HW video decode not available for profile " << config.profile
374 << (config.is_encrypted ? " with encryption" : ""); 374 << (config.is_encrypted() ? " with encryption" : "");
375 return false; 375 return false;
376 } 376 }
377 377
378 // Attempt to set up performing decoding tasks on IO thread, if supported by 378 // Attempt to set up performing decoding tasks on IO thread, if supported by
379 // the VDA. 379 // the VDA.
380 if (video_decode_accelerator_->TryToSetupDecodeOnSeparateThread( 380 if (video_decode_accelerator_->TryToSetupDecodeOnSeparateThread(
381 weak_factory_for_io_.GetWeakPtr(), io_task_runner_)) { 381 weak_factory_for_io_.GetWeakPtr(), io_task_runner_)) {
382 filter_ = new MessageFilter(this, host_route_id_); 382 filter_ = new MessageFilter(this, host_route_id_);
383 stub_->channel()->AddFilter(filter_.get()); 383 stub_->channel()->AddFilter(filter_.get());
384 } 384 }
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 for (auto texture_ref : it->second) { 526 for (auto texture_ref : it->second) {
527 GLenum target = texture_ref->texture()->target(); 527 GLenum target = texture_ref->texture()->target();
528 gpu::gles2::TextureManager* texture_manager = 528 gpu::gles2::TextureManager* texture_manager =
529 stub_->decoder()->GetContextGroup()->texture_manager(); 529 stub_->decoder()->GetContextGroup()->texture_manager();
530 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true); 530 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true);
531 } 531 }
532 uncleared_textures_.erase(it); 532 uncleared_textures_.erase(it);
533 } 533 }
534 534
535 } // namespace media 535 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698