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

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

Issue 137023008: Add support for Tegra V4L2 VDA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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 "content/common/gpu/media/gpu_video_decode_accelerator.h" 5 #include "content/common/gpu/media/gpu_video_decode_accelerator.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 #if defined(OS_WIN) 266 #if defined(OS_WIN)
267 if (base::win::GetVersion() < base::win::VERSION_WIN7) { 267 if (base::win::GetVersion() < base::win::VERSION_WIN7) {
268 NOTIMPLEMENTED() << "HW video decode acceleration not available."; 268 NOTIMPLEMENTED() << "HW video decode acceleration not available.";
269 NotifyError(media::VideoDecodeAccelerator::PLATFORM_FAILURE); 269 NotifyError(media::VideoDecodeAccelerator::PLATFORM_FAILURE);
270 return; 270 return;
271 } 271 }
272 DVLOG(0) << "Initializing DXVA HW decoder for windows."; 272 DVLOG(0) << "Initializing DXVA HW decoder for windows.";
273 video_decode_accelerator_.reset(new DXVAVideoDecodeAccelerator( 273 video_decode_accelerator_.reset(new DXVAVideoDecodeAccelerator(
274 this, make_context_current_)); 274 this, make_context_current_));
275 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) && defined(USE_X11) 275 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) && defined(USE_X11)
276 scoped_ptr<V4L2Device> device = V4L2Device::Create(); 276 scoped_ptr<V4L2Device> device =
277 V4L2Device::Create(stub_->decoder()->GetGLContext()->GetHandle());
277 if (!device.get()) { 278 if (!device.get()) {
278 NotifyError(media::VideoDecodeAccelerator::PLATFORM_FAILURE); 279 NotifyError(media::VideoDecodeAccelerator::PLATFORM_FAILURE);
279 return; 280 return;
280 } 281 }
281 video_decode_accelerator_.reset( 282 video_decode_accelerator_.reset(
282 new V4L2VideoDecodeAccelerator(gfx::GLSurfaceEGL::GetHardwareDisplay(), 283 new V4L2VideoDecodeAccelerator(gfx::GLSurfaceEGL::GetHardwareDisplay(),
283 this, 284 this,
284 weak_factory_for_io_.GetWeakPtr(), 285 weak_factory_for_io_.GetWeakPtr(),
285 make_context_current_, 286 make_context_current_,
286 device.Pass(), 287 device.Pass(),
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 scoped_refptr<gpu::gles2::TextureRef> texture_ref = it->second; 511 scoped_refptr<gpu::gles2::TextureRef> texture_ref = it->second;
511 GLenum target = texture_ref->texture()->target(); 512 GLenum target = texture_ref->texture()->target();
512 gpu::gles2::TextureManager* texture_manager = 513 gpu::gles2::TextureManager* texture_manager =
513 stub_->decoder()->GetContextGroup()->texture_manager(); 514 stub_->decoder()->GetContextGroup()->texture_manager();
514 DCHECK(!texture_ref->texture()->IsLevelCleared(target, 0)); 515 DCHECK(!texture_ref->texture()->IsLevelCleared(target, 0));
515 texture_manager->SetLevelCleared(texture_ref, target, 0, true); 516 texture_manager->SetLevelCleared(texture_ref, target, 0, true);
516 uncleared_textures_.erase(it); 517 uncleared_textures_.erase(it);
517 } 518 }
518 519
519 } // namespace content 520 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698