OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/renderer/gpu_video_service_host.h" | 5 #include "content/renderer/gpu_video_service_host.h" |
6 | 6 |
7 #include "content/common/gpu/gpu_messages.h" | 7 #include "content/common/gpu/gpu_messages.h" |
8 #include "content/renderer/gpu_video_decode_accelerator_host.h" | 8 #include "content/renderer/gpu_video_decode_accelerator_host.h" |
9 #include "content/renderer/render_thread.h" | 9 #include "content/renderer/render_thread.h" |
10 #include "media/video/video_decode_accelerator.h" | 10 #include "media/video/video_decode_accelerator.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 void GpuVideoServiceHost::OnChannelClosing() { | 36 void GpuVideoServiceHost::OnChannelClosing() { |
37 // TODO(hclam): Implement. | 37 // TODO(hclam): Implement. |
38 } | 38 } |
39 | 39 |
40 bool GpuVideoServiceHost::OnMessageReceived(const IPC::Message& msg) { | 40 bool GpuVideoServiceHost::OnMessageReceived(const IPC::Message& msg) { |
41 switch (msg.type()) { | 41 switch (msg.type()) { |
42 case AcceleratedVideoDecoderHostMsg_BitstreamBufferProcessed::ID: | 42 case AcceleratedVideoDecoderHostMsg_BitstreamBufferProcessed::ID: |
43 case AcceleratedVideoDecoderHostMsg_ProvidePictureBuffers::ID: | 43 case AcceleratedVideoDecoderHostMsg_ProvidePictureBuffers::ID: |
44 case AcceleratedVideoDecoderHostMsg_CreateDone::ID: | 44 case AcceleratedVideoDecoderHostMsg_CreateDone::ID: |
| 45 case AcceleratedVideoDecoderHostMsg_InitializeDone::ID: |
45 case AcceleratedVideoDecoderHostMsg_DismissPictureBuffer::ID: | 46 case AcceleratedVideoDecoderHostMsg_DismissPictureBuffer::ID: |
46 case AcceleratedVideoDecoderHostMsg_PictureReady::ID: | 47 case AcceleratedVideoDecoderHostMsg_PictureReady::ID: |
47 case AcceleratedVideoDecoderHostMsg_FlushDone::ID: | 48 case AcceleratedVideoDecoderHostMsg_FlushDone::ID: |
48 case AcceleratedVideoDecoderHostMsg_AbortDone::ID: | 49 case AcceleratedVideoDecoderHostMsg_AbortDone::ID: |
49 case AcceleratedVideoDecoderHostMsg_EndOfStream::ID: | 50 case AcceleratedVideoDecoderHostMsg_EndOfStream::ID: |
50 case AcceleratedVideoDecoderHostMsg_ErrorNotification::ID: | 51 case AcceleratedVideoDecoderHostMsg_ErrorNotification::ID: |
51 if (router_.RouteMessage(msg)) | 52 if (router_.RouteMessage(msg)) |
52 return true; | 53 return true; |
53 LOG(ERROR) << "AcceleratedVideoDecoderHostMsg cannot be dispatched."; | 54 LOG(ERROR) << "AcceleratedVideoDecoderHostMsg cannot be dispatched."; |
54 default: | 55 default: |
(...skipping 20 matching lines...) Expand all Loading... |
75 return NULL; | 76 return NULL; |
76 } | 77 } |
77 | 78 |
78 GpuVideoDecodeAcceleratorHost* GpuVideoServiceHost::CreateVideoAccelerator( | 79 GpuVideoDecodeAcceleratorHost* GpuVideoServiceHost::CreateVideoAccelerator( |
79 media::VideoDecodeAccelerator::Client* client) { | 80 media::VideoDecodeAccelerator::Client* client) { |
80 base::AutoLock auto_lock(lock_); | 81 base::AutoLock auto_lock(lock_); |
81 DCHECK(channel_); | 82 DCHECK(channel_); |
82 return new GpuVideoDecodeAcceleratorHost( | 83 return new GpuVideoDecodeAcceleratorHost( |
83 &router_, channel_, next_decoder_host_id_++, client); | 84 &router_, channel_, next_decoder_host_id_++, client); |
84 } | 85 } |
OLD | NEW |