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

Side by Side Diff: content/public/gpu/gpu_video_decode_accelerator_factory.cc

Issue 1822983002: Support external buffer import in VDA interface and add a V4L2SVDA impl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_factory_impl.h" 5 #include "content/common/gpu/media/gpu_video_decode_accelerator_factory_impl.h"
6 #include "content/public/gpu/gpu_video_decode_accelerator_factory.h" 6 #include "content/public/gpu/gpu_video_decode_accelerator_factory.h"
7 7
8 namespace content { 8 namespace content {
9 9
10 GpuVideoDecodeAcceleratorFactory::~GpuVideoDecodeAcceleratorFactory() {} 10 GpuVideoDecodeAcceleratorFactory::~GpuVideoDecodeAcceleratorFactory() {}
(...skipping 25 matching lines...) Expand all
36 get_gl_context_cb, make_context_current_cb, bind_image_cb, 36 get_gl_context_cb, make_context_current_cb, bind_image_cb,
37 get_gles2_decoder_cb); 37 get_gles2_decoder_cb);
38 if (!gvdafactory_impl) 38 if (!gvdafactory_impl)
39 return nullptr; 39 return nullptr;
40 40
41 return make_scoped_ptr( 41 return make_scoped_ptr(
42 new GpuVideoDecodeAcceleratorFactory(std::move(gvdafactory_impl))); 42 new GpuVideoDecodeAcceleratorFactory(std::move(gvdafactory_impl)));
43 } 43 }
44 44
45 // static 45 // static
46 scoped_ptr<GpuVideoDecodeAcceleratorFactory>
47 GpuVideoDecodeAcceleratorFactory::CreateWithNoGL() {
48 auto gvdafactory_impl =
49 GpuVideoDecodeAcceleratorFactoryImpl::CreateWithNoGL();
50 if (!gvdafactory_impl)
51 return nullptr;
52
53 return make_scoped_ptr(
54 new GpuVideoDecodeAcceleratorFactory(std::move(gvdafactory_impl)));
55 }
56
57 // static
46 gpu::VideoDecodeAcceleratorCapabilities 58 gpu::VideoDecodeAcceleratorCapabilities
47 GpuVideoDecodeAcceleratorFactory::GetDecoderCapabilities( 59 GpuVideoDecodeAcceleratorFactory::GetDecoderCapabilities(
48 const gpu::GpuPreferences& gpu_preferences) { 60 const gpu::GpuPreferences& gpu_preferences) {
49 return GpuVideoDecodeAcceleratorFactoryImpl::GetDecoderCapabilities( 61 return GpuVideoDecodeAcceleratorFactoryImpl::GetDecoderCapabilities(
50 gpu_preferences); 62 gpu_preferences);
51 } 63 }
52 64
53 scoped_ptr<media::VideoDecodeAccelerator> 65 scoped_ptr<media::VideoDecodeAccelerator>
54 GpuVideoDecodeAcceleratorFactory::CreateVDA( 66 GpuVideoDecodeAcceleratorFactory::CreateVDA(
55 media::VideoDecodeAccelerator::Client* client, 67 media::VideoDecodeAccelerator::Client* client,
56 const media::VideoDecodeAccelerator::Config& config, 68 const media::VideoDecodeAccelerator::Config& config,
57 const gpu::GpuPreferences& gpu_preferences) { 69 const gpu::GpuPreferences& gpu_preferences) {
58 if (!gvdafactory_impl_) 70 if (!gvdafactory_impl_)
59 return nullptr; 71 return nullptr;
60 72
61 return gvdafactory_impl_->CreateVDA(client, config, gpu_preferences); 73 return gvdafactory_impl_->CreateVDA(client, config, gpu_preferences);
62 } 74 }
63 75
64 GpuVideoDecodeAcceleratorFactory::GpuVideoDecodeAcceleratorFactory( 76 GpuVideoDecodeAcceleratorFactory::GpuVideoDecodeAcceleratorFactory(
65 scoped_ptr<GpuVideoDecodeAcceleratorFactoryImpl> gvdafactory_impl) 77 scoped_ptr<GpuVideoDecodeAcceleratorFactoryImpl> gvdafactory_impl)
66 : gvdafactory_impl_(std::move(gvdafactory_impl)) {} 78 : gvdafactory_impl_(std::move(gvdafactory_impl)) {}
67 79
68 } // namespace content 80 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698