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

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

Issue 826663002: Support multiple video decoders and encoders (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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_encode_accelerator.h
diff --git a/content/common/gpu/media/gpu_video_encode_accelerator.h b/content/common/gpu/media/gpu_video_encode_accelerator.h
index ca60f6f1c8dcac639a5424a3bc66867e3acf4666..41cce94f330367e886cd0c785c03d780c6990e61 100644
--- a/content/common/gpu/media/gpu_video_encode_accelerator.h
+++ b/content/common/gpu/media/gpu_video_encode_accelerator.h
@@ -8,6 +8,7 @@
#include <vector>
#include "base/memory/scoped_ptr.h"
+#include "base/memory/scoped_vector.h"
#include "base/memory/weak_ptr.h"
#include "content/common/gpu/gpu_command_buffer_stub.h"
#include "gpu/config/gpu_info.h"
@@ -60,14 +61,16 @@ class GpuVideoEncodeAccelerator
// Static query for supported profiles. This query calls the appropriate
// platform-specific version.
static std::vector<gpu::VideoEncodeAcceleratorSupportedProfile>
- GetSupportedProfiles();
+ GetSupportedProfiles();
static std::vector<gpu::VideoEncodeAcceleratorSupportedProfile>
- ConvertMediaToGpuProfiles(const std::vector<
- media::VideoEncodeAccelerator::SupportedProfile>& media_profiles);
+ ConvertMediaToGpuProfiles(const std::vector<
+ media::VideoEncodeAccelerator::SupportedProfile>& media_profiles);
+ static std::vector<gpu::VideoEncodeAcceleratorSupportedProfile>
+ GetSupportedProfiles_old();
private:
// Create the appropriate platform-specific VEA.
- static scoped_ptr<media::VideoEncodeAccelerator> CreateEncoder();
+ static ScopedVector<media::VideoEncodeAccelerator> CreateEncoder();
// IPC handlers, proxying media::VideoEncodeAccelerator for the renderer
// process.
@@ -97,7 +100,8 @@ class GpuVideoEncodeAccelerator
GpuCommandBufferStub* stub_;
// Owned pointer to the underlying VideoEncodeAccelerator.
- scoped_ptr<media::VideoEncodeAccelerator> encoder_;
+ ScopedVector<media::VideoEncodeAccelerator> encoder_list_;
+ media::VideoEncodeAccelerator* encoder_;
base::Callback<bool(void)> make_context_current_;
// Video encoding parameters.

Powered by Google App Engine
This is Rietveld 408576698