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/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
48 virtual void OnWillDestroyStub() OVERRIDE; | 48 virtual void OnWillDestroyStub() OVERRIDE; |
49 | 49 |
50 // Function to delegate sending to actual sender. | 50 // Function to delegate sending to actual sender. |
51 virtual bool Send(IPC::Message* message) OVERRIDE; | 51 virtual bool Send(IPC::Message* message) OVERRIDE; |
52 | 52 |
53 // Initialize the accelerator with the given profile and send the | 53 // Initialize the accelerator with the given profile and send the |
54 // |init_done_msg| when done. | 54 // |init_done_msg| when done. |
55 // The renderer process handle is valid as long as we have a channel between | 55 // The renderer process handle is valid as long as we have a channel between |
56 // GPU process and the renderer. | 56 // GPU process and the renderer. |
57 void Initialize(const media::VideoCodecProfile profile, | 57 void Initialize(const media::VideoCodecProfile profile, |
58 IPC::Message* init_done_msg); | 58 IPC::Message* init_done_msg, |
59 const scoped_refptr<base::MessageLoopProxy>& io_message_loop); | |
59 | 60 |
60 private: | 61 private: |
62 class GvdaMessageFilter; | |
Ami GONE FROM CHROMIUM
2013/08/26 17:20:03
Since this is scoped inside the class no need for
wuchengli
2013/08/27 12:32:24
Done.
| |
63 | |
61 // Handlers for IPC messages. | 64 // Handlers for IPC messages. |
62 void OnDecode(base::SharedMemoryHandle handle, int32 id, uint32 size); | 65 void OnDecode(base::SharedMemoryHandle handle, int32 id, uint32 size); |
63 void OnAssignPictureBuffers( | 66 void OnAssignPictureBuffers( |
64 const std::vector<int32>& buffer_ids, | 67 const std::vector<int32>& buffer_ids, |
65 const std::vector<uint32>& texture_ids, | 68 const std::vector<uint32>& texture_ids, |
66 const std::vector<gfx::Size>& sizes); | 69 const std::vector<gfx::Size>& sizes); |
67 void OnReusePictureBuffer( | 70 void OnReusePictureBuffer( |
68 int32 picture_buffer_id); | 71 int32 picture_buffer_id); |
69 void OnFlush(); | 72 void OnFlush(); |
70 void OnReset(); | 73 void OnReset(); |
(...skipping 13 matching lines...) Expand all Loading... | |
84 // The underlying VideoDecodeAccelerator. | 87 // The underlying VideoDecodeAccelerator. |
85 scoped_ptr<media::VideoDecodeAccelerator> video_decode_accelerator_; | 88 scoped_ptr<media::VideoDecodeAccelerator> video_decode_accelerator_; |
86 | 89 |
87 // Callback for making the relevant context current for GL calls. | 90 // Callback for making the relevant context current for GL calls. |
88 // Returns false if failed. | 91 // Returns false if failed. |
89 base::Callback<bool(void)> make_context_current_; | 92 base::Callback<bool(void)> make_context_current_; |
90 | 93 |
91 // The texture target as requested by ProvidePictureBuffers(). | 94 // The texture target as requested by ProvidePictureBuffers(). |
92 uint32 texture_target_; | 95 uint32 texture_target_; |
93 | 96 |
97 scoped_ptr<GvdaMessageFilter> filter_; | |
98 | |
94 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator); | 99 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator); |
95 }; | 100 }; |
96 | 101 |
97 } // namespace content | 102 } // namespace content |
98 | 103 |
99 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 104 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |