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

Unified Diff: content/common/gpu/media/gpu_video_decode_accelerator.h

Issue 826663002: Support multiple video decoders and encoders (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use callback function for decoders Created 5 years, 12 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 side-by-side diff with in-line comments
Download patch
Index: content/common/gpu/media/gpu_video_decode_accelerator.h
diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.h b/content/common/gpu/media/gpu_video_decode_accelerator.h
index e59a76fb5c35169dd4b0fab8cb448e9bc02a46b3..76ecc62ca567acf72a89f2daf276d14f18667871 100644
--- a/content/common/gpu/media/gpu_video_decode_accelerator.h
+++ b/content/common/gpu/media/gpu_video_decode_accelerator.h
@@ -31,6 +31,9 @@ class GpuVideoDecodeAccelerator
public media::VideoDecodeAccelerator::Client,
public GpuCommandBufferStub::DestructionObserver {
public:
+ typedef base::Callback<scoped_ptr<media::VideoDecodeAccelerator>(void)>
Pawel Osciak 2014/12/31 07:55:59 This could be private?
henryhsu 2014/12/31 08:47:53 Done.
+ CreateVDACb;
+
// Each of the arguments to the constructor must outlive this object.
// |stub->decoder()| will be made current around any operation that touches
// the underlying VDA so that it can make GL calls safely.
@@ -59,14 +62,30 @@ class GpuVideoDecodeAccelerator
// Function to delegate sending to actual sender.
bool Send(IPC::Message* message) override;
- // Initialize the accelerator with the given profile and send the
- // |init_done_msg| when done.
+ // Prepare all appropriate platform-specific VDAs and initialize VDAs with
Pawel Osciak 2014/12/31 07:55:59 The final effect is only one initialized VDA, perh
henryhsu 2014/12/31 08:47:53 Done.
+ // |profile|. Send the |init_done_msg| when done. filter_ is passed to
+ // GpuCommandBufferStube channel only if we can decode on IO thread.
void Initialize(const media::VideoCodecProfile profile,
IPC::Message* init_done_msg);
private:
class MessageFilter;
+ // Create the appropriate platform-specific VDA callback functions.
Pawel Osciak 2014/12/31 07:55:59 Return a set of VDA Create callback functions appl
henryhsu 2014/12/31 08:47:53 Done.
+ std::vector<CreateVDACb> CreateDecoderCbs();
+ // Create DXVA VDA.
Pawel Osciak 2014/12/31 07:55:59 These comments are probably unnecessary, method na
henryhsu 2014/12/31 08:47:53 Done.
+ scoped_ptr<media::VideoDecodeAccelerator> CreateDXVADecoder();
Pawel Osciak 2014/12/31 07:55:59 Could we please s/Decoder/VDA/ everywhere?
henryhsu 2014/12/31 08:47:53 Done.
+ // Create V4L2 VDA.
+ scoped_ptr<media::VideoDecodeAccelerator> CreateV4L2Decoder();
+ // Create Vaapi VDA.
+ scoped_ptr<media::VideoDecodeAccelerator> CreateVaapiDecoder();
+ // Create VT VDA.
+ scoped_ptr<media::VideoDecodeAccelerator> CreateVTDecoder();
+ // Create Android VDA.
+ scoped_ptr<media::VideoDecodeAccelerator> CreateAndroidDecoder();
+ // Create Ozone VDA.
+ scoped_ptr<media::VideoDecodeAccelerator> CreateOzoneDecoder();
+
// We only allow self-delete, from OnWillDestroyStub(), after cleanup there.
~GpuVideoDecodeAccelerator() override;

Powered by Google App Engine
This is Rietveld 408576698