| 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> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/memory/weak_ptr.h" |
| 13 #include "media/base/pipeline_status.h" | 14 #include "media/base/pipeline_status.h" |
| 14 #include "media/base/demuxer_stream.h" | 15 #include "media/base/demuxer_stream.h" |
| 15 #include "media/base/video_decoder.h" | 16 #include "media/base/video_decoder.h" |
| 16 #include "media/video/video_decode_accelerator.h" | 17 #include "media/video/video_decode_accelerator.h" |
| 17 | 18 |
| 18 class MessageLoop; | 19 class MessageLoop; |
| 19 template <class T> class scoped_refptr; | 20 template <class T> class scoped_refptr; |
| 20 namespace base { | 21 namespace base { |
| 21 class MessageLoopProxy; | 22 class MessageLoopProxy; |
| 22 class SharedMemory; | 23 class SharedMemory; |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 void DestroyTextures(); | 157 void DestroyTextures(); |
| 157 | 158 |
| 158 StatisticsCB statistics_cb_; | 159 StatisticsCB statistics_cb_; |
| 159 | 160 |
| 160 // Pointer to the demuxer stream that will feed us compressed buffers. | 161 // Pointer to the demuxer stream that will feed us compressed buffers. |
| 161 scoped_refptr<DemuxerStream> demuxer_stream_; | 162 scoped_refptr<DemuxerStream> demuxer_stream_; |
| 162 | 163 |
| 163 // MessageLoop on which to fire callbacks and trampoline calls to this class | 164 // MessageLoop on which to fire callbacks and trampoline calls to this class |
| 164 // if they arrive on other loops. | 165 // if they arrive on other loops. |
| 165 scoped_refptr<base::MessageLoopProxy> gvd_loop_proxy_; | 166 scoped_refptr<base::MessageLoopProxy> gvd_loop_proxy_; |
| 167 base::WeakPtrFactory<GpuVideoDecoder> weak_factory_; |
| 168 base::WeakPtr<GpuVideoDecoder> weak_this_; |
| 166 | 169 |
| 167 // Message loop on which to makes all calls to vda_. (beware this loop may be | 170 // Message loop on which to makes all calls to vda_. (beware this loop may be |
| 168 // paused during the Pause/Flush/Stop dance PipelineImpl::Stop() goes | 171 // paused during the Pause/Flush/Stop dance PipelineImpl::Stop() goes |
| 169 // through). | 172 // through). |
| 170 scoped_refptr<base::MessageLoopProxy> vda_loop_proxy_; | 173 scoped_refptr<base::MessageLoopProxy> vda_loop_proxy_; |
| 171 | 174 |
| 172 scoped_refptr<Factories> factories_; | 175 scoped_refptr<Factories> factories_; |
| 173 | 176 |
| 174 // Populated during Initialize() via SetVDA() (on success) and unchanged | 177 // Populated during Initialize() via SetVDA() (on success) and unchanged |
| 175 // until an error occurs | 178 // until an error occurs |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 // Set during ProvidePictureBuffers(), used for checking and implementing | 231 // Set during ProvidePictureBuffers(), used for checking and implementing |
| 229 // HasAvailableOutputFrames(). | 232 // HasAvailableOutputFrames(). |
| 230 int available_pictures_; | 233 int available_pictures_; |
| 231 | 234 |
| 232 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder); | 235 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder); |
| 233 }; | 236 }; |
| 234 | 237 |
| 235 } // namespace media | 238 } // namespace media |
| 236 | 239 |
| 237 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ | 240 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ |
| OLD | NEW |