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

Side by Side Diff: content/common/gpu/media/gpu_video_decode_accelerator.h

Issue 7021020: Clean up video frame sizes, types in Video Decode API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: responses to CR Created 9 years, 5 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_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 18 matching lines...) Expand all
29 GpuCommandBufferStub* stub); 29 GpuCommandBufferStub* stub);
30 virtual ~GpuVideoDecodeAccelerator(); 30 virtual ~GpuVideoDecodeAccelerator();
31 31
32 // IPC::Channel::Listener implementation. 32 // IPC::Channel::Listener implementation.
33 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 33 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
34 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; 34 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE;
35 virtual void OnChannelError() OVERRIDE; 35 virtual void OnChannelError() OVERRIDE;
36 36
37 // media::VideoDecodeAccelerator::Client implementation. 37 // media::VideoDecodeAccelerator::Client implementation.
38 virtual void ProvidePictureBuffers( 38 virtual void ProvidePictureBuffers(
39 uint32 requested_num_of_buffers, 39 uint32 requested_num_of_buffers, const gfx::Size& dimensions) OVERRIDE;
40 const gfx::Size& dimensions,
41 media::VideoDecodeAccelerator::MemoryType type) OVERRIDE;
42 virtual void DismissPictureBuffer(int32 picture_buffer_id) OVERRIDE; 40 virtual void DismissPictureBuffer(int32 picture_buffer_id) OVERRIDE;
43 virtual void PictureReady(const media::Picture& picture) OVERRIDE; 41 virtual void PictureReady(const media::Picture& picture) OVERRIDE;
44 virtual void NotifyInitializeDone() OVERRIDE; 42 virtual void NotifyInitializeDone() OVERRIDE;
45 virtual void NotifyEndOfStream() OVERRIDE; 43 virtual void NotifyEndOfStream() OVERRIDE;
46 virtual void NotifyError(media::VideoDecodeAccelerator::Error error) OVERRIDE; 44 virtual void NotifyError(media::VideoDecodeAccelerator::Error error) OVERRIDE;
47 virtual void NotifyEndOfBitstreamBuffer(int32 bitstream_buffer_id) OVERRIDE; 45 virtual void NotifyEndOfBitstreamBuffer(int32 bitstream_buffer_id) OVERRIDE;
48 virtual void NotifyFlushDone() OVERRIDE; 46 virtual void NotifyFlushDone() OVERRIDE;
49 virtual void NotifyResetDone() OVERRIDE; 47 virtual void NotifyResetDone() OVERRIDE;
50 48
51 // Function to delegate sending to actual sender. 49 // Function to delegate sending to actual sender.
52 virtual bool Send(IPC::Message* message); 50 virtual bool Send(IPC::Message* message);
53 51
54 // Callback to be fired when the underlying stub receives a new token. 52 // Callback to be fired when the underlying stub receives a new token.
55 void OnSetToken(int32 token); 53 void OnSetToken(int32 token);
56 54
57 // Initialize the accelerator with the given configuration. 55 // Initialize the accelerator with the given configuration.
58 void Initialize(const std::vector<uint32>& configs); 56 void Initialize(const std::vector<uint32>& configs);
59 57
60 private: 58 private:
61 // Defers |msg| for later processing if it specifies a write token that hasn't 59 // Defers |msg| for later processing if it specifies a write token that hasn't
62 // come to pass yet, and set |*deferred| to true. Return false if the message 60 // come to pass yet, and set |*deferred| to true. Return false if the message
63 // failed to parse. 61 // failed to parse.
64 bool DeferMessageIfNeeded(const IPC::Message& msg, bool* deferred); 62 bool DeferMessageIfNeeded(const IPC::Message& msg, bool* deferred);
65 63
66 // Handlers for IPC messages. 64 // Handlers for IPC messages.
67 void OnDecode( 65 void OnDecode(
68 const gpu::ReadWriteTokens& /* tokens */, 66 const gpu::ReadWriteTokens& /* tokens */,
69 base::SharedMemoryHandle handle, int32 id, int32 size); 67 base::SharedMemoryHandle handle, int32 id, int32 size);
70 void OnAssignGLESBuffers( 68 void OnAssignPictureBuffers(
71 const gpu::ReadWriteTokens& /* tokens */, 69 const gpu::ReadWriteTokens& /* tokens */,
72 const std::vector<int32>& buffer_ids, 70 const std::vector<int32>& buffer_ids,
73 const std::vector<uint32>& texture_ids, 71 const std::vector<uint32>& texture_ids,
74 const std::vector<gfx::Size>& sizes); 72 const std::vector<gfx::Size>& sizes);
75 void OnReusePictureBuffer( 73 void OnReusePictureBuffer(
76 const gpu::ReadWriteTokens& /* tokens */, 74 const gpu::ReadWriteTokens& /* tokens */,
77 int32 picture_buffer_id); 75 int32 picture_buffer_id);
78 void OnFlush(const gpu::ReadWriteTokens& /* tokens */); 76 void OnFlush(const gpu::ReadWriteTokens& /* tokens */);
79 void OnReset(const gpu::ReadWriteTokens& /* tokens */); 77 void OnReset(const gpu::ReadWriteTokens& /* tokens */);
80 void OnDestroy(const gpu::ReadWriteTokens& /* tokens */); 78 void OnDestroy(const gpu::ReadWriteTokens& /* tokens */);
(...skipping 10 matching lines...) Expand all
91 // Unowned pointer to the underlying GpuCommandBufferStub. 89 // Unowned pointer to the underlying GpuCommandBufferStub.
92 GpuCommandBufferStub* stub_; 90 GpuCommandBufferStub* stub_;
93 91
94 // Pointer to the underlying VideoDecodeAccelerator. 92 // Pointer to the underlying VideoDecodeAccelerator.
95 scoped_refptr<media::VideoDecodeAccelerator> video_decode_accelerator_; 93 scoped_refptr<media::VideoDecodeAccelerator> video_decode_accelerator_;
96 94
97 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator); 95 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator);
98 }; 96 };
99 97
100 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ 98 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_messages.h ('k') | content/common/gpu/media/gpu_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698