| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 SHMBuffer* GetSHM(size_t min_size); | 159 SHMBuffer* GetSHM(size_t min_size); |
| 160 | 160 |
| 161 // Return a shared-memory segment to the available pool. | 161 // Return a shared-memory segment to the available pool. |
| 162 void PutSHM(SHMBuffer* shm_buffer); | 162 void PutSHM(SHMBuffer* shm_buffer); |
| 163 | 163 |
| 164 void DestroyTextures(); | 164 void DestroyTextures(); |
| 165 | 165 |
| 166 StatisticsCB statistics_cb_; | 166 StatisticsCB statistics_cb_; |
| 167 | 167 |
| 168 // Pointer to the demuxer stream that will feed us compressed buffers. | 168 // Pointer to the demuxer stream that will feed us compressed buffers. |
| 169 scoped_refptr<DemuxerStream> demuxer_stream_; | 169 DemuxerStream* demuxer_stream_; |
| 170 | 170 |
| 171 // Message loop on which to fire callbacks and trampoline calls to this class | 171 // Message loop on which to fire callbacks and trampoline calls to this class |
| 172 // if they arrive on other loops. | 172 // if they arrive on other loops. |
| 173 scoped_refptr<base::MessageLoopProxy> gvd_loop_proxy_; | 173 scoped_refptr<base::MessageLoopProxy> gvd_loop_proxy_; |
| 174 base::WeakPtrFactory<GpuVideoDecoder> weak_factory_; | 174 base::WeakPtrFactory<GpuVideoDecoder> weak_factory_; |
| 175 base::WeakPtr<GpuVideoDecoder> weak_this_; | 175 base::WeakPtr<GpuVideoDecoder> weak_this_; |
| 176 | 176 |
| 177 // Message loop on which to makes all calls to vda_. (beware this loop may be | 177 // Message loop on which to makes all calls to vda_. (beware this loop may be |
| 178 // paused during the Pause/Flush/Stop dance PipelineImpl::Stop() goes | 178 // paused during the Pause/Flush/Stop dance PipelineImpl::Stop() goes |
| 179 // through). | 179 // through). |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 // Set during ProvidePictureBuffers(), used for checking and implementing | 239 // Set during ProvidePictureBuffers(), used for checking and implementing |
| 240 // HasAvailableOutputFrames(). | 240 // HasAvailableOutputFrames(). |
| 241 int available_pictures_; | 241 int available_pictures_; |
| 242 | 242 |
| 243 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder); | 243 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder); |
| 244 }; | 244 }; |
| 245 | 245 |
| 246 } // namespace media | 246 } // namespace media |
| 247 | 247 |
| 248 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ | 248 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ |
| OLD | NEW |