OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 5 #ifndef CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
6 #define CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 6 #define CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 virtual void NotifyResetDone() OVERRIDE; | 40 virtual void NotifyResetDone() OVERRIDE; |
41 | 41 |
42 // Function to delegate sending to actual sender. | 42 // Function to delegate sending to actual sender. |
43 virtual bool Send(IPC::Message* message) OVERRIDE; | 43 virtual bool Send(IPC::Message* message) OVERRIDE; |
44 | 44 |
45 // Initialize the accelerator with the given profile and send the | 45 // Initialize the accelerator with the given profile and send the |
46 // |init_done_msg| when done. | 46 // |init_done_msg| when done. |
47 // The renderer process handle is valid as long as we have a channel between | 47 // The renderer process handle is valid as long as we have a channel between |
48 // GPU process and the renderer. | 48 // GPU process and the renderer. |
49 void Initialize(const media::VideoCodecProfile profile, | 49 void Initialize(const media::VideoCodecProfile profile, |
50 IPC::Message* init_done_msg); | 50 IPC::Message* init_done_msg, |
| 51 base::ProcessHandle renderer_process); |
51 | 52 |
52 private: | 53 private: |
53 | 54 |
54 // Handlers for IPC messages. | 55 // Handlers for IPC messages. |
55 void OnDecode(base::SharedMemoryHandle handle, int32 id, int32 size); | 56 void OnDecode(base::SharedMemoryHandle handle, int32 id, int32 size); |
56 void OnAssignPictureBuffers( | 57 void OnAssignPictureBuffers( |
57 const std::vector<int32>& buffer_ids, | 58 const std::vector<int32>& buffer_ids, |
58 const std::vector<uint32>& texture_ids, | 59 const std::vector<uint32>& texture_ids, |
59 const std::vector<gfx::Size>& sizes); | 60 const std::vector<gfx::Size>& sizes); |
60 void OnReusePictureBuffer( | 61 void OnReusePictureBuffer( |
(...skipping 16 matching lines...) Expand all Loading... |
77 // Unowned pointer to the underlying GpuCommandBufferStub. | 78 // Unowned pointer to the underlying GpuCommandBufferStub. |
78 GpuCommandBufferStub* stub_; | 79 GpuCommandBufferStub* stub_; |
79 | 80 |
80 // Pointer to the underlying VideoDecodeAccelerator. | 81 // Pointer to the underlying VideoDecodeAccelerator. |
81 scoped_refptr<media::VideoDecodeAccelerator> video_decode_accelerator_; | 82 scoped_refptr<media::VideoDecodeAccelerator> video_decode_accelerator_; |
82 | 83 |
83 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator); | 84 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator); |
84 }; | 85 }; |
85 | 86 |
86 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 87 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |