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

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

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 #ifndef CONTENT_PUBLIC_GPU_GPU_VIDEO_DECODE_ACCELERATOR_FACTORY_H_ 5 #ifndef CONTENT_PUBLIC_GPU_GPU_VIDEO_DECODE_ACCELERATOR_FACTORY_H_
6 #define CONTENT_PUBLIC_GPU_GPU_VIDEO_DECODE_ACCELERATOR_FACTORY_H_ 6 #define CONTENT_PUBLIC_GPU_GPU_VIDEO_DECODE_ACCELERATOR_FACTORY_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 const GetGLContextCallback& get_gl_context_cb, 63 const GetGLContextCallback& get_gl_context_cb,
64 const MakeGLContextCurrentCallback& make_context_current_cb, 64 const MakeGLContextCurrentCallback& make_context_current_cb,
65 const BindGLImageCallback& bind_image_cb); 65 const BindGLImageCallback& bind_image_cb);
66 66
67 static scoped_ptr<GpuVideoDecodeAcceleratorFactory> CreateWithGLES2Decoder( 67 static scoped_ptr<GpuVideoDecodeAcceleratorFactory> CreateWithGLES2Decoder(
68 const GetGLContextCallback& get_gl_context_cb, 68 const GetGLContextCallback& get_gl_context_cb,
69 const MakeGLContextCurrentCallback& make_context_current_cb, 69 const MakeGLContextCurrentCallback& make_context_current_cb,
70 const BindGLImageCallback& bind_image_cb, 70 const BindGLImageCallback& bind_image_cb,
71 const GetGLES2DecoderCallback& get_gles2_decoder_cb); 71 const GetGLES2DecoderCallback& get_gles2_decoder_cb);
72 72
73 // Create a factory capable of producing VDA instances for current platform
74 // with no GL support.
75 // A factory created with this method will only be able to produce VDAs with
76 // no ability to call GL functions/access GL state. This also implies no
77 // ability to decode into textures provided by the client.
78 static scoped_ptr<GpuVideoDecodeAcceleratorFactory> CreateWithNoGL();
79
73 // Return decoder capabilities supported on the current platform. 80 // Return decoder capabilities supported on the current platform.
74 static gpu::VideoDecodeAcceleratorCapabilities GetDecoderCapabilities( 81 static gpu::VideoDecodeAcceleratorCapabilities GetDecoderCapabilities(
75 const gpu::GpuPreferences& gpu_preferences); 82 const gpu::GpuPreferences& gpu_preferences);
76 83
77 // Create a VDA for the current platform for |client| with the given |config| 84 // Create a VDA for the current platform for |client| with the given |config|
78 // and for given |gpu_preferences|. Return nullptr on failure. 85 // and for given |gpu_preferences|. Return nullptr on failure.
79 virtual scoped_ptr<media::VideoDecodeAccelerator> CreateVDA( 86 virtual scoped_ptr<media::VideoDecodeAccelerator> CreateVDA(
80 media::VideoDecodeAccelerator::Client* client, 87 media::VideoDecodeAccelerator::Client* client,
81 const media::VideoDecodeAccelerator::Config& config, 88 const media::VideoDecodeAccelerator::Config& config,
82 const gpu::GpuPreferences& gpu_preferences); 89 const gpu::GpuPreferences& gpu_preferences);
83 90
84 private: 91 private:
85 // TODO(posciak): This is temporary and will not be needed once 92 // TODO(posciak): This is temporary and will not be needed once
86 // GpuVideoDecodeAcceleratorFactoryImpl implements 93 // GpuVideoDecodeAcceleratorFactoryImpl implements
87 // GpuVideoDecodeAcceleratorFactory, see crbug.com/597150 and related. 94 // GpuVideoDecodeAcceleratorFactory, see crbug.com/597150 and related.
88 GpuVideoDecodeAcceleratorFactory( 95 GpuVideoDecodeAcceleratorFactory(
89 scoped_ptr<GpuVideoDecodeAcceleratorFactoryImpl> gvdafactory_impl); 96 scoped_ptr<GpuVideoDecodeAcceleratorFactoryImpl> gvdafactory_impl);
90 97
91 scoped_ptr<GpuVideoDecodeAcceleratorFactoryImpl> gvdafactory_impl_; 98 scoped_ptr<GpuVideoDecodeAcceleratorFactoryImpl> gvdafactory_impl_;
92 }; 99 };
93 100
94 } // namespace content 101 } // namespace content
95 102
96 #endif // CONTENT_PUBLIC_GPU_GPU_VIDEO_DECODE_ACCELERATOR_FACTORY_H_ 103 #endif // CONTENT_PUBLIC_GPU_GPU_VIDEO_DECODE_ACCELERATOR_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698