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

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

Issue 7361010: Enable fire-and-forget Destroy of HW video decoder, and misc other improvements. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: vrk CR responses. 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 29 matching lines...) Expand all
40 const gfx::Size& dimensions, 40 const gfx::Size& dimensions,
41 media::VideoDecodeAccelerator::MemoryType type) OVERRIDE; 41 media::VideoDecodeAccelerator::MemoryType type) OVERRIDE;
42 virtual void DismissPictureBuffer(int32 picture_buffer_id) OVERRIDE; 42 virtual void DismissPictureBuffer(int32 picture_buffer_id) OVERRIDE;
43 virtual void PictureReady(const media::Picture& picture) OVERRIDE; 43 virtual void PictureReady(const media::Picture& picture) OVERRIDE;
44 virtual void NotifyInitializeDone() OVERRIDE; 44 virtual void NotifyInitializeDone() OVERRIDE;
45 virtual void NotifyEndOfStream() OVERRIDE; 45 virtual void NotifyEndOfStream() OVERRIDE;
46 virtual void NotifyError(media::VideoDecodeAccelerator::Error error) OVERRIDE; 46 virtual void NotifyError(media::VideoDecodeAccelerator::Error error) OVERRIDE;
47 virtual void NotifyEndOfBitstreamBuffer(int32 bitstream_buffer_id) OVERRIDE; 47 virtual void NotifyEndOfBitstreamBuffer(int32 bitstream_buffer_id) OVERRIDE;
48 virtual void NotifyFlushDone() OVERRIDE; 48 virtual void NotifyFlushDone() OVERRIDE;
49 virtual void NotifyResetDone() OVERRIDE; 49 virtual void NotifyResetDone() OVERRIDE;
50 virtual void NotifyDestroyDone() OVERRIDE;
51 50
52 // Function to delegate sending to actual sender. 51 // Function to delegate sending to actual sender.
53 virtual bool Send(IPC::Message* message); 52 virtual bool Send(IPC::Message* message);
54 53
55 // Callback to be fired when the underlying stub receives a new token. 54 // Callback to be fired when the underlying stub receives a new token.
56 void OnSetToken(int32 token); 55 void OnSetToken(int32 token);
57 56
58 // Initialize the accelerator with the given configuration. 57 // Initialize the accelerator with the given configuration.
59 void Initialize(const std::vector<uint32>& configs); 58 void Initialize(const std::vector<uint32>& configs);
60 59
(...skipping 25 matching lines...) Expand all
86 // Route ID to communicate with the host. 85 // Route ID to communicate with the host.
87 int32 host_route_id_; 86 int32 host_route_id_;
88 87
89 // Messages deferred for later processing when their tokens have come to pass. 88 // Messages deferred for later processing when their tokens have come to pass.
90 std::vector<IPC::Message*> deferred_messages_; 89 std::vector<IPC::Message*> deferred_messages_;
91 90
92 // Unowned pointer to the underlying GpuCommandBufferStub. 91 // Unowned pointer to the underlying GpuCommandBufferStub.
93 GpuCommandBufferStub* stub_; 92 GpuCommandBufferStub* stub_;
94 93
95 // Pointer to the underlying VideoDecodeAccelerator. 94 // Pointer to the underlying VideoDecodeAccelerator.
96 scoped_ptr<media::VideoDecodeAccelerator> video_decode_accelerator_; 95 scoped_refptr<media::VideoDecodeAccelerator> video_decode_accelerator_;
97 96
98 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator); 97 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator);
99 }; 98 };
100 99
101 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ 100 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698