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

Side by Side Diff: media/filters/gpu_video_decoder.h

Issue 9639005: HW video decode support for --enable-threaded-compositing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR response. Created 8 years, 9 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ 5 #ifndef MEDIA_FILTERS_GPU_VIDEO_DECODER_H_
6 #define MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ 6 #define MEDIA_FILTERS_GPU_VIDEO_DECODER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // Allocate & return a shared memory segment. Caller is responsible for 47 // Allocate & return a shared memory segment. Caller is responsible for
48 // Close()ing the returned pointer. 48 // Close()ing the returned pointer.
49 virtual base::SharedMemory* CreateSharedMemory(size_t size) = 0; 49 virtual base::SharedMemory* CreateSharedMemory(size_t size) = 0;
50 50
51 protected: 51 protected:
52 friend class base::RefCountedThreadSafe<Factories>; 52 friend class base::RefCountedThreadSafe<Factories>;
53 virtual ~Factories(); 53 virtual ~Factories();
54 }; 54 };
55 55
56 GpuVideoDecoder(MessageLoop* message_loop, 56 GpuVideoDecoder(MessageLoop* message_loop,
57 MessageLoop* vda_loop,
57 const scoped_refptr<Factories>& factories); 58 const scoped_refptr<Factories>& factories);
58 virtual ~GpuVideoDecoder(); 59 virtual ~GpuVideoDecoder();
59 60
60 // Filter implementation. 61 // Filter implementation.
61 virtual void Stop(const base::Closure& callback) OVERRIDE; 62 virtual void Stop(const base::Closure& callback) OVERRIDE;
62 virtual void Seek(base::TimeDelta time, const FilterStatusCB& cb) OVERRIDE; 63 virtual void Seek(base::TimeDelta time, const FilterStatusCB& cb) OVERRIDE;
63 virtual void Pause(const base::Closure& callback) OVERRIDE; 64 virtual void Pause(const base::Closure& callback) OVERRIDE;
64 virtual void Flush(const base::Closure& callback) OVERRIDE; 65 virtual void Flush(const base::Closure& callback) OVERRIDE;
65 66
66 // VideoDecoder implementation. 67 // VideoDecoder implementation.
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 // present. 144 // present.
144 base::TimeDelta config_frame_duration_; 145 base::TimeDelta config_frame_duration_;
145 146
146 // Pointer to the demuxer stream that will feed us compressed buffers. 147 // Pointer to the demuxer stream that will feed us compressed buffers.
147 scoped_refptr<DemuxerStream> demuxer_stream_; 148 scoped_refptr<DemuxerStream> demuxer_stream_;
148 149
149 // MessageLoop on which to fire callbacks and trampoline calls to this class 150 // MessageLoop on which to fire callbacks and trampoline calls to this class
150 // if they arrive on other loops. 151 // if they arrive on other loops.
151 scoped_refptr<base::MessageLoopProxy> gvd_loop_proxy_; 152 scoped_refptr<base::MessageLoopProxy> gvd_loop_proxy_;
152 153
153 // Creation message loop (typically the render thread). All calls to vda_ 154 // Message loop on which to makes all calls to vda_. (beware this loop may be
154 // must be made on this loop (and beware this loop is paused during the 155 // paused during the Pause/Flush/Stop dance PipelineImpl::Stop() goes
155 // Pause/Flush/Stop dance PipelineImpl::Stop() goes through). 156 // through).
156 scoped_refptr<base::MessageLoopProxy> render_loop_proxy_; 157 scoped_refptr<base::MessageLoopProxy> vda_loop_proxy_;
157 158
158 scoped_refptr<Factories> factories_; 159 scoped_refptr<Factories> factories_;
159 160
160 // Populated during Initialize() (on success) and unchanged thereafter. 161 // Populated during Initialize() (on success) and unchanged thereafter.
161 scoped_refptr<VideoDecodeAccelerator> vda_; 162 scoped_refptr<VideoDecodeAccelerator> vda_;
162 163
163 // Callbacks that are !is_null() only during their respective operation being 164 // Callbacks that are !is_null() only during their respective operation being
164 // asynchronously executed. 165 // asynchronously executed.
165 ReadCB pending_read_cb_; 166 ReadCB pending_read_cb_;
166 base::Closure pending_reset_cb_; 167 base::Closure pending_reset_cb_;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 // Indicates PrepareForShutdownHack()'s been called. Makes further calls to 207 // Indicates PrepareForShutdownHack()'s been called. Makes further calls to
207 // this class not require the render thread's loop to be processing. 208 // this class not require the render thread's loop to be processing.
208 bool shutting_down_; 209 bool shutting_down_;
209 210
210 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder); 211 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder);
211 }; 212 };
212 213
213 } // namespace media 214 } // namespace media
214 215
215 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ 216 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698