Chromium Code Reviews| 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 #ifndef CONTENT_GPU_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 5 #ifndef CONTENT_GPU_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
| 6 #define CONTENT_GPU_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 6 #define CONTENT_GPU_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
|
vmr
2011/05/24 07:16:08
NIT: Fix header guard.
Also, it is a bit unclear
| |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/shared_memory.h" | 11 #include "base/shared_memory.h" |
| 12 #include "ipc/ipc_channel.h" | 12 #include "ipc/ipc_channel.h" |
| 13 #include "ipc/ipc_message.h" | 13 #include "ipc/ipc_message.h" |
| 14 #include "media/video/video_decode_accelerator.h" | 14 #include "media/video/video_decode_accelerator.h" |
| 15 | 15 |
| 16 class GpuVideoDecodeAccelerator | 16 class GpuVideoDecodeAccelerator |
| 17 : public base::RefCountedThreadSafe<GpuVideoDecodeAccelerator>, | 17 : public base::RefCountedThreadSafe<GpuVideoDecodeAccelerator>, |
| 18 public IPC::Channel::Listener, | 18 public IPC::Channel::Listener, |
| 19 public IPC::Message::Sender, | 19 public IPC::Message::Sender, |
| 20 public media::VideoDecodeAccelerator::Client { | 20 public media::VideoDecodeAccelerator::Client { |
| 21 public: | 21 public: |
| 22 GpuVideoDecodeAccelerator(IPC::Message::Sender* sender, int32 host_route_id); | 22 GpuVideoDecodeAccelerator(IPC::Message::Sender* sender, int32 host_route_id); |
| 23 virtual ~GpuVideoDecodeAccelerator(); | 23 virtual ~GpuVideoDecodeAccelerator(); |
| 24 | 24 |
| 25 // IPC::Channel::Listener implementation. | 25 // IPC::Channel::Listener implementation. |
| 26 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 26 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 27 | 27 |
| 28 // media::VideoDecodeAccelerator::Client implementation. | 28 // media::VideoDecodeAccelerator::Client implementation. |
| 29 virtual void ProvidePictureBuffers( | 29 virtual void ProvidePictureBuffers( |
| 30 uint32 requested_num_of_buffers, const gfx::Size& dimensions) OVERRIDE; | 30 uint32 requested_num_of_buffers, const gfx::Size& dimensions) OVERRIDE; |
| 31 virtual void DismissPictureBuffer(int32 picture_buffer_id) OVERRIDE; | 31 virtual void DismissPictureBuffer(int32 picture_buffer_id) OVERRIDE; |
| 32 virtual void PictureReady(const media::Picture& picture) OVERRIDE; | 32 virtual void PictureReady(const media::Picture& picture) OVERRIDE; |
| 33 virtual void NotifyInitializeDone() OVERRIDE; | |
| 33 virtual void NotifyEndOfStream() OVERRIDE; | 34 virtual void NotifyEndOfStream() OVERRIDE; |
| 34 virtual void NotifyError(media::VideoDecodeAccelerator::Error error) OVERRIDE; | 35 virtual void NotifyError(media::VideoDecodeAccelerator::Error error) OVERRIDE; |
| 35 virtual void NotifyEndOfBitstreamBuffer(int32 bitstream_buffer_id) OVERRIDE; | 36 virtual void NotifyEndOfBitstreamBuffer(int32 bitstream_buffer_id) OVERRIDE; |
| 36 virtual void NotifyFlushDone() OVERRIDE; | 37 virtual void NotifyFlushDone() OVERRIDE; |
| 37 virtual void NotifyAbortDone() OVERRIDE; | 38 virtual void NotifyAbortDone() OVERRIDE; |
| 38 | 39 |
| 39 // Function to delegate sending to actual sender. | 40 // Function to delegate sending to actual sender. |
| 40 virtual bool Send(IPC::Message* message); | 41 virtual bool Send(IPC::Message* message); |
| 41 | 42 |
| 42 void set_video_decode_accelerator( | 43 void set_video_decode_accelerator( |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 67 // Route ID to communicate with the host. | 68 // Route ID to communicate with the host. |
| 68 int32 route_id_; | 69 int32 route_id_; |
| 69 | 70 |
| 70 // Pointer to the underlying VideoDecodeAccelerator. | 71 // Pointer to the underlying VideoDecodeAccelerator. |
| 71 scoped_ptr<media::VideoDecodeAccelerator> video_decode_accelerator_; | 72 scoped_ptr<media::VideoDecodeAccelerator> video_decode_accelerator_; |
| 72 | 73 |
| 73 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator); | 74 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator); |
| 74 }; | 75 }; |
| 75 | 76 |
| 76 #endif // CONTENT_GPU_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 77 #endif // CONTENT_GPU_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
| OLD | NEW |