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

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: change Android version probing Created 4 years, 2 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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 } 361 }
362 362
363 const gpu::GpuDriverBugWorkarounds& gpu_workarounds = 363 const gpu::GpuDriverBugWorkarounds& gpu_workarounds =
364 stub_->channel()->gpu_channel_manager()->gpu_driver_bug_workarounds(); 364 stub_->channel()->gpu_channel_manager()->gpu_driver_bug_workarounds();
365 const gpu::GpuPreferences& gpu_preferences = 365 const gpu::GpuPreferences& gpu_preferences =
366 stub_->channel()->gpu_channel_manager()->gpu_preferences(); 366 stub_->channel()->gpu_channel_manager()->gpu_preferences();
367 video_decode_accelerator_ = 367 video_decode_accelerator_ =
368 vda_factory->CreateVDA(this, config, gpu_workarounds, gpu_preferences); 368 vda_factory->CreateVDA(this, config, gpu_workarounds, gpu_preferences);
369 if (!video_decode_accelerator_) { 369 if (!video_decode_accelerator_) {
370 LOG(ERROR) << "HW video decode not available for profile " << config.profile 370 LOG(ERROR) << "HW video decode not available for profile " << config.profile
371 << (config.is_encrypted ? " with encryption" : ""); 371 << (config.is_encrypted() ? " with encryption" : "");
372 return false; 372 return false;
373 } 373 }
374 374
375 // Attempt to set up performing decoding tasks on IO thread, if supported by 375 // Attempt to set up performing decoding tasks on IO thread, if supported by
376 // the VDA. 376 // the VDA.
377 if (video_decode_accelerator_->TryToSetupDecodeOnSeparateThread( 377 if (video_decode_accelerator_->TryToSetupDecodeOnSeparateThread(
378 weak_factory_for_io_.GetWeakPtr(), io_task_runner_)) { 378 weak_factory_for_io_.GetWeakPtr(), io_task_runner_)) {
379 filter_ = new MessageFilter(this, host_route_id_); 379 filter_ = new MessageFilter(this, host_route_id_);
380 stub_->channel()->AddFilter(filter_.get()); 380 stub_->channel()->AddFilter(filter_.get());
381 } 381 }
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 GLenum target = texture_ref->texture()->target(); 519 GLenum target = texture_ref->texture()->target();
520 gpu::gles2::TextureManager* texture_manager = 520 gpu::gles2::TextureManager* texture_manager =
521 stub_->decoder()->GetContextGroup()->texture_manager(); 521 stub_->decoder()->GetContextGroup()->texture_manager();
522 DCHECK(!texture_ref->texture()->IsLevelCleared(target, 0)); 522 DCHECK(!texture_ref->texture()->IsLevelCleared(target, 0));
523 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true); 523 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true);
524 } 524 }
525 uncleared_textures_.erase(it); 525 uncleared_textures_.erase(it);
526 } 526 }
527 527
528 } // namespace media 528 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698