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

Side by Side Diff: chrome/renderer/gpu_video_service_host.cc

Issue 3335014: Added FakeGlVideoDecodeEngine to exercise the IPC protocol for hardware video decoding (Closed)
Patch Set: compile man... Created 10 years, 3 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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/renderer/gpu_video_service_host.h" 5 #include "chrome/renderer/gpu_video_service_host.h"
6 6
7 #include "chrome/common/gpu_messages.h" 7 #include "chrome/common/gpu_messages.h"
8 #include "chrome/renderer/gpu_video_decoder_host.h" 8 #include "chrome/renderer/gpu_video_decoder_host.h"
9 #include "chrome/renderer/render_thread.h" 9 #include "chrome/renderer/render_thread.h"
10 10
(...skipping 24 matching lines...) Expand all
35 35
36 void GpuVideoServiceHost::OnGpuChannelConnected( 36 void GpuVideoServiceHost::OnGpuChannelConnected(
37 GpuChannelHost* channel_host, 37 GpuChannelHost* channel_host,
38 MessageRouter* router, 38 MessageRouter* router,
39 IPC::SyncChannel* channel) { 39 IPC::SyncChannel* channel) {
40 40
41 channel_host_ = channel_host; 41 channel_host_ = channel_host;
42 router_ = router; 42 router_ = router;
43 43
44 // Get the routing_id of video service in GPU process. 44 // Get the routing_id of video service in GPU process.
45 service_info_.service_available_ = 0; 45 service_info_.service_available = 0;
46 if (!channel_host_->Send(new GpuChannelMsg_GetVideoService(&service_info_))) { 46 if (!channel_host_->Send(new GpuChannelMsg_GetVideoService(&service_info_))) {
47 LOG(ERROR) << "GpuChannelMsg_GetVideoService failed"; 47 LOG(ERROR) << "GpuChannelMsg_GetVideoService failed";
48 } 48 }
49 49
50 if (service_info_.service_available_) 50 if (service_info_.service_available)
51 router->AddRoute(service_info_.video_service_host_route_id_, this); 51 router->AddRoute(service_info_.video_service_host_route_id, this);
52 } 52 }
53 53
54 GpuVideoDecoderHost* GpuVideoServiceHost::CreateVideoDecoder( 54 GpuVideoDecoderHost* GpuVideoServiceHost::CreateVideoDecoder(
55 int context_route_id) { 55 int context_route_id) {
56 DCHECK(RenderThread::current()); 56 DCHECK(RenderThread::current());
57 57
58 return new GpuVideoDecoderHost(this, channel_host_, context_route_id); 58 return new GpuVideoDecoderHost(this, channel_host_, context_route_id);
59 } 59 }
60 60
61 void GpuVideoServiceHost::AddRoute(int route_id, 61 void GpuVideoServiceHost::AddRoute(int route_id,
62 GpuVideoDecoderHost* decoder_host) { 62 GpuVideoDecoderHost* decoder_host) {
63 router_->AddRoute(route_id, decoder_host); 63 router_->AddRoute(route_id, decoder_host);
64 } 64 }
65 65
66 void GpuVideoServiceHost::RemoveRoute(int route_id) { 66 void GpuVideoServiceHost::RemoveRoute(int route_id) {
67 router_->RemoveRoute(route_id); 67 router_->RemoveRoute(route_id);
68 } 68 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698