OLD | NEW |
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 <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <utility> | 10 #include <utility> |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 | 71 |
72 protected: | 72 protected: |
73 friend class base::RefCountedThreadSafe<Factories>; | 73 friend class base::RefCountedThreadSafe<Factories>; |
74 virtual ~Factories(); | 74 virtual ~Factories(); |
75 }; | 75 }; |
76 | 76 |
77 GpuVideoDecoder(const scoped_refptr<base::MessageLoopProxy>& message_loop, | 77 GpuVideoDecoder(const scoped_refptr<base::MessageLoopProxy>& message_loop, |
78 const scoped_refptr<Factories>& factories); | 78 const scoped_refptr<Factories>& factories); |
79 | 79 |
80 // VideoDecoder implementation. | 80 // VideoDecoder implementation. |
81 virtual void Initialize(const scoped_refptr<DemuxerStream>& stream, | 81 virtual void Initialize(DemuxerStream* stream, |
82 const PipelineStatusCB& status_cb, | 82 const PipelineStatusCB& status_cb, |
83 const StatisticsCB& statistics_cb) OVERRIDE; | 83 const StatisticsCB& statistics_cb) OVERRIDE; |
84 virtual void Read(const ReadCB& read_cb) OVERRIDE; | 84 virtual void Read(const ReadCB& read_cb) OVERRIDE; |
85 virtual void Reset(const base::Closure& closure) OVERRIDE; | 85 virtual void Reset(const base::Closure& closure) OVERRIDE; |
86 virtual void Stop(const base::Closure& closure) OVERRIDE; | 86 virtual void Stop(const base::Closure& closure) OVERRIDE; |
87 virtual bool HasAlpha() const OVERRIDE; | 87 virtual bool HasAlpha() const OVERRIDE; |
88 virtual bool HasOutputFrameAvailable() const OVERRIDE; | 88 virtual bool HasOutputFrameAvailable() const OVERRIDE; |
89 | 89 |
90 // VideoDecodeAccelerator::Client implementation. | 90 // VideoDecodeAccelerator::Client implementation. |
91 virtual void NotifyInitializeDone() OVERRIDE; | 91 virtual void NotifyInitializeDone() OVERRIDE; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 SHMBuffer* GetSHM(size_t min_size); | 163 SHMBuffer* GetSHM(size_t min_size); |
164 | 164 |
165 // Return a shared-memory segment to the available pool. | 165 // Return a shared-memory segment to the available pool. |
166 void PutSHM(SHMBuffer* shm_buffer); | 166 void PutSHM(SHMBuffer* shm_buffer); |
167 | 167 |
168 void DestroyTextures(); | 168 void DestroyTextures(); |
169 | 169 |
170 StatisticsCB statistics_cb_; | 170 StatisticsCB statistics_cb_; |
171 | 171 |
172 // Pointer to the demuxer stream that will feed us compressed buffers. | 172 // Pointer to the demuxer stream that will feed us compressed buffers. |
173 scoped_refptr<DemuxerStream> demuxer_stream_; | 173 DemuxerStream* demuxer_stream_; |
174 | 174 |
175 // MessageLoop on which to fire callbacks and trampoline calls to this class | 175 // MessageLoop on which to fire callbacks and trampoline calls to this class |
176 // if they arrive on other loops. | 176 // if they arrive on other loops. |
177 scoped_refptr<base::MessageLoopProxy> gvd_loop_proxy_; | 177 scoped_refptr<base::MessageLoopProxy> gvd_loop_proxy_; |
178 base::WeakPtrFactory<GpuVideoDecoder> weak_factory_; | 178 base::WeakPtrFactory<GpuVideoDecoder> weak_factory_; |
179 base::WeakPtr<GpuVideoDecoder> weak_this_; | 179 base::WeakPtr<GpuVideoDecoder> weak_this_; |
180 | 180 |
181 // Message loop on which to makes all calls to vda_. (beware this loop may be | 181 // Message loop on which to makes all calls to vda_. (beware this loop may be |
182 // paused during the Pause/Flush/Stop dance PipelineImpl::Stop() goes | 182 // paused during the Pause/Flush/Stop dance PipelineImpl::Stop() goes |
183 // through). | 183 // through). |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 // Set during ProvidePictureBuffers(), used for checking and implementing | 246 // Set during ProvidePictureBuffers(), used for checking and implementing |
247 // HasAvailableOutputFrames(). | 247 // HasAvailableOutputFrames(). |
248 int available_pictures_; | 248 int available_pictures_; |
249 | 249 |
250 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder); | 250 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder); |
251 }; | 251 }; |
252 | 252 |
253 } // namespace media | 253 } // namespace media |
254 | 254 |
255 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ | 255 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ |
OLD | NEW |