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

Unified Diff: content/common/gpu/client/gpu_channel_host.cc

Issue 20632002: Add media::VideoEncodeAccelerator with WebRTC integration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@git-svn
Patch Set: 9e8f21a0 Comments addressed. Created 7 years, 5 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/client/gpu_channel_host.cc
diff --git a/content/common/gpu/client/gpu_channel_host.cc b/content/common/gpu/client/gpu_channel_host.cc
index 601c06d9dac1073b9af4c16652c61ded8cf3d6e0..7b03793121e7156b780d6ee95c87a32e9aebb2f9 100644
--- a/content/common/gpu/client/gpu_channel_host.cc
+++ b/content/common/gpu/client/gpu_channel_host.cc
@@ -13,6 +13,7 @@
#include "base/posix/eintr_wrapper.h"
#include "base/threading/thread_restrictions.h"
#include "content/common/gpu/client/command_buffer_proxy_impl.h"
+#include "content/common/gpu/client/gpu_video_encode_accelerator_host.h"
#include "content/common/gpu/gpu_messages.h"
#include "gpu/command_buffer/common/mailbox.h"
#include "ipc/ipc_sync_message_filter.h"
@@ -184,6 +185,22 @@ scoped_ptr<media::VideoDecodeAccelerator> GpuChannelHost::CreateVideoDecoder(
return proxy->CreateVideoDecoder(profile, client).Pass();
}
+scoped_ptr<media::VideoEncodeAccelerator> GpuChannelHost::CreateVideoEncoder(
+ media::VideoEncodeAccelerator::Client* client) {
+ TRACE_EVENT0("gpu", "GpuChannelHost::CreateVideoEncoder");
+
+ scoped_ptr<media::VideoEncodeAccelerator> vea;
+ int32 route_id;
+ if (!Send(new GpuChannelMsg_CreateVideoEncoder(&route_id))) {
+ return vea.Pass();
+ }
+ if (route_id == MSG_ROUTING_NONE)
+ return vea.Pass();
+
+ vea.reset(new GpuVideoEncodeAcceleratorHost(client, this, route_id));
+ return vea.Pass();
+}
+
void GpuChannelHost::DestroyCommandBuffer(
CommandBufferProxyImpl* command_buffer) {
TRACE_EVENT0("gpu", "GpuChannelHost::DestroyCommandBuffer");

Powered by Google App Engine
This is Rietveld 408576698