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

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

Issue 7474006: PPB_VideoDecoder_Dev::Initialize is now synchronous! (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: vrk CR update. Created 9 years, 4 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 25 matching lines...) Expand all
36 virtual void NotifyInitializeDone() OVERRIDE; 36 virtual void NotifyInitializeDone() OVERRIDE;
37 virtual void NotifyEndOfStream() OVERRIDE; 37 virtual void NotifyEndOfStream() OVERRIDE;
38 virtual void NotifyError(media::VideoDecodeAccelerator::Error error) OVERRIDE; 38 virtual void NotifyError(media::VideoDecodeAccelerator::Error error) OVERRIDE;
39 virtual void NotifyEndOfBitstreamBuffer(int32 bitstream_buffer_id) OVERRIDE; 39 virtual void NotifyEndOfBitstreamBuffer(int32 bitstream_buffer_id) OVERRIDE;
40 virtual void NotifyFlushDone() OVERRIDE; 40 virtual void NotifyFlushDone() OVERRIDE;
41 virtual void NotifyResetDone() OVERRIDE; 41 virtual void NotifyResetDone() OVERRIDE;
42 42
43 // Function to delegate sending to actual sender. 43 // Function to delegate sending to actual sender.
44 virtual bool Send(IPC::Message* message); 44 virtual bool Send(IPC::Message* message);
45 45
46 // Initialize the accelerator with the given configuration. 46 // Initialize the accelerator with the given configuration and send the
47 void Initialize(const std::vector<uint32>& configs); 47 // |init_done_msg| when done.
48 void Initialize(const std::vector<uint32>& configs,
49 IPC::Message* init_done_msg);
48 50
49 private: 51 private:
50 52
51 // Handlers for IPC messages. 53 // Handlers for IPC messages.
52 void OnDecode(base::SharedMemoryHandle handle, int32 id, int32 size); 54 void OnDecode(base::SharedMemoryHandle handle, int32 id, int32 size);
53 void OnAssignPictureBuffers( 55 void OnAssignPictureBuffers(
54 const std::vector<int32>& buffer_ids, 56 const std::vector<int32>& buffer_ids,
55 const std::vector<uint32>& texture_ids, 57 const std::vector<uint32>& texture_ids,
56 const std::vector<gfx::Size>& sizes); 58 const std::vector<gfx::Size>& sizes);
57 void OnReusePictureBuffer( 59 void OnReusePictureBuffer(
58 int32 picture_buffer_id); 60 int32 picture_buffer_id);
59 void OnFlush(); 61 void OnFlush();
60 void OnReset(); 62 void OnReset();
61 void OnDestroy(); 63 void OnDestroy();
62 64
63 // Pointer to the IPC message sender. 65 // Pointer to the IPC message sender.
64 IPC::Message::Sender* sender_; 66 IPC::Message::Sender* sender_;
65 67
68 // Message to Send() when initialization is done. Is only non-NULL during
69 // initialization and is owned by the IPC channel underlying the
70 // GpuCommandBufferStub.
71 IPC::Message* init_done_msg_;
72
66 // Route ID to communicate with the host. 73 // Route ID to communicate with the host.
67 int32 host_route_id_; 74 int32 host_route_id_;
68 75
69 // Unowned pointer to the underlying GpuCommandBufferStub. 76 // Unowned pointer to the underlying GpuCommandBufferStub.
70 GpuCommandBufferStub* stub_; 77 GpuCommandBufferStub* stub_;
71 78
72 // Pointer to the underlying VideoDecodeAccelerator. 79 // Pointer to the underlying VideoDecodeAccelerator.
73 scoped_refptr<media::VideoDecodeAccelerator> video_decode_accelerator_; 80 scoped_refptr<media::VideoDecodeAccelerator> video_decode_accelerator_;
74 81
75 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator); 82 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator);
76 }; 83 };
77 84
78 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ 85 #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