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

Side by Side Diff: content/renderer/video_decode_accelerator_host.h

Issue 6901036: Update VideoDecode PPAPI structs to be consistent with media structures, part 1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make try bots happy Created 9 years, 7 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 | Annotate | Revision Log
OLDNEW
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_RENDERER_VIDEO_DECODE_ACCELERATOR_HOST_H_ 5 #ifndef CONTENT_RENDERER_VIDEO_DECODE_ACCELERATOR_HOST_H_
6 #define CONTENT_RENDERER_VIDEO_DECODE_ACCELERATOR_HOST_H_ 6 #define CONTENT_RENDERER_VIDEO_DECODE_ACCELERATOR_HOST_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 10 matching lines...) Expand all
21 public media::VideoDecodeAccelerator { 21 public media::VideoDecodeAccelerator {
22 public: 22 public:
23 // |router| is used to dispatch IPC messages to this object. 23 // |router| is used to dispatch IPC messages to this object.
24 // |ipc_sender| is used to send IPC messages to GPU process. 24 // |ipc_sender| is used to send IPC messages to GPU process.
25 VideoDecodeAcceleratorHost(MessageRouter* router, 25 VideoDecodeAcceleratorHost(MessageRouter* router,
26 IPC::Message::Sender* ipc_sender, 26 IPC::Message::Sender* ipc_sender,
27 int32 decoder_host_id); 27 int32 decoder_host_id);
28 virtual ~VideoDecodeAcceleratorHost(); 28 virtual ~VideoDecodeAcceleratorHost();
29 29
30 // IPC::Channel::Listener implementation. 30 // IPC::Channel::Listener implementation.
31 virtual void OnChannelConnected(int32 peer_pid); 31 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE;
32 virtual void OnChannelError(); 32 virtual void OnChannelError() OVERRIDE;
33 virtual bool OnMessageReceived(const IPC::Message& message); 33 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
34 34
35 // media::VideoDecodeAccelerator implementation. 35 // media::VideoDecodeAccelerator implementation.
36 virtual const std::vector<uint32>& GetConfig( 36 virtual void GetConfigs(
37 const std::vector<uint32>& prototype_config); 37 const std::vector<uint32>& requested_configs,
38 virtual bool Initialize(const std::vector<uint32>& config); 38 std::vector<uint32>* matched_configs) OVERRIDE;
39 virtual bool Decode(media::BitstreamBuffer* bitstream_buffer, 39 virtual bool Initialize(
40 media::VideoDecodeAcceleratorCallback* callback); 40 const std::vector<uint32>& config) OVERRIDE;
41 virtual void AssignPictureBuffer( 41 virtual bool Decode(
42 std::vector<PictureBuffer*> picture_buffers); 42 const media::BitstreamBuffer& bitstream_buffer,
43 virtual void ReusePictureBuffer(PictureBuffer* picture_buffer); 43 media::VideoDecodeAcceleratorCallback* callback) OVERRIDE;
44 virtual bool Flush(media::VideoDecodeAcceleratorCallback* callback); 44 virtual void AssignGLESBuffers(
45 virtual bool Abort(media::VideoDecodeAcceleratorCallback* callback); 45 const std::vector<media::GLESBuffer>& buffers) OVERRIDE;
46 virtual void AssignSysmemBuffers(
47 const std::vector<media::SysmemBuffer>& buffers) OVERRIDE;
48 virtual void ReusePictureBuffer(uint32 picture_buffer_id) OVERRIDE;
49 virtual bool Flush(media::VideoDecodeAcceleratorCallback* callback) OVERRIDE;
50 virtual bool Abort(media::VideoDecodeAcceleratorCallback* callback) OVERRIDE;
46 51
47 private: 52 private:
48 // Message loop that this object runs on. 53 // Message loop that this object runs on.
49 MessageLoop* message_loop_; 54 MessageLoop* message_loop_;
50 55
51 // A router used to send us IPC messages. 56 // A router used to send us IPC messages.
52 MessageRouter* router_; 57 MessageRouter* router_;
53 58
54 // Sends IPC messages to the GPU process. 59 // Sends IPC messages to the GPU process.
55 IPC::Message::Sender* ipc_sender_; 60 IPC::Message::Sender* ipc_sender_;
56 61
57 // Route ID of the GLES2 context in the GPU process. 62 // Route ID of the GLES2 context in the GPU process.
58 int context_route_id_; 63 int context_route_id_;
59 64
60 // ID of this VideoDecodeAcceleratorHost. 65 // ID of this VideoDecodeAcceleratorHost.
61 int32 decoder_host_id_; 66 int32 decoder_host_id_;
62 67
63 // ID of VideoDecodeAccelerator in the GPU process. 68 // ID of VideoDecodeAccelerator in the GPU process.
64 int32 decoder_id_; 69 int32 decoder_id_;
65 70
66 // Transfer buffers for both input and output. 71 // Transfer buffers for both input and output.
67 // TODO(vmr): move into plugin provided IPC buffers. 72 // TODO(vmr): move into plugin provided IPC buffers.
68 scoped_ptr<base::SharedMemory> input_transfer_buffer_; 73 scoped_ptr<base::SharedMemory> input_transfer_buffer_;
69 74
70 std::vector<uint32> configs_;
71
72 DISALLOW_COPY_AND_ASSIGN(VideoDecodeAcceleratorHost); 75 DISALLOW_COPY_AND_ASSIGN(VideoDecodeAcceleratorHost);
73 }; 76 };
74 77
75 #endif // CONTENT_RENDERER_VIDEO_DECODE_ACCELERATOR_HOST_H_ 78 #endif // CONTENT_RENDERER_VIDEO_DECODE_ACCELERATOR_HOST_H_
OLDNEW
« no previous file with comments | « content/renderer/pepper_plugin_delegate_impl.cc ('k') | content/renderer/video_decode_accelerator_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698