OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_ |
6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_ | 6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 int64_t renderTimeMs = -1) override; | 75 int64_t renderTimeMs = -1) override; |
76 // Called on WebRTC DecodingThread. | 76 // Called on WebRTC DecodingThread. |
77 int32_t RegisterDecodeCompleteCallback( | 77 int32_t RegisterDecodeCompleteCallback( |
78 webrtc::DecodedImageCallback* callback) override; | 78 webrtc::DecodedImageCallback* callback) override; |
79 // Called on Chrome_libJingle_WorkerThread. The child thread is blocked while | 79 // Called on Chrome_libJingle_WorkerThread. The child thread is blocked while |
80 // this runs. | 80 // this runs. |
81 int32_t Release() override; | 81 int32_t Release() override; |
82 | 82 |
83 // VideoDecodeAccelerator::Client implementation. | 83 // VideoDecodeAccelerator::Client implementation. |
84 void ProvidePictureBuffers(uint32_t count, | 84 void ProvidePictureBuffers(uint32_t count, |
| 85 media::VideoPixelFormat format, |
85 uint32_t textures_per_buffer, | 86 uint32_t textures_per_buffer, |
86 const gfx::Size& size, | 87 const gfx::Size& size, |
87 uint32_t texture_target) override; | 88 uint32_t texture_target) override; |
88 void DismissPictureBuffer(int32_t id) override; | 89 void DismissPictureBuffer(int32_t id) override; |
89 void PictureReady(const media::Picture& picture) override; | 90 void PictureReady(const media::Picture& picture) override; |
90 void NotifyEndOfBitstreamBuffer(int32_t id) override; | 91 void NotifyEndOfBitstreamBuffer(int32_t id) override; |
91 void NotifyFlushDone() override; | 92 void NotifyFlushDone() override; |
92 void NotifyResetDone() override; | 93 void NotifyResetDone() override; |
93 void NotifyError(media::VideoDecodeAccelerator::Error error) override; | 94 void NotifyError(media::VideoDecodeAccelerator::Error error) override; |
94 | 95 |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 const webrtc::VideoCodecType video_codec_type_; | 227 const webrtc::VideoCodecType video_codec_type_; |
227 | 228 |
228 // The size of the incoming video frames. | 229 // The size of the incoming video frames. |
229 gfx::Size frame_size_; | 230 gfx::Size frame_size_; |
230 | 231 |
231 media::GpuVideoAcceleratorFactories* const factories_; | 232 media::GpuVideoAcceleratorFactories* const factories_; |
232 | 233 |
233 // The texture target used for decoded pictures. | 234 // The texture target used for decoded pictures. |
234 uint32_t decoder_texture_target_; | 235 uint32_t decoder_texture_target_; |
235 | 236 |
| 237 // The format of the decoded pictures. |
| 238 media::VideoPixelFormat pixel_format_; |
| 239 |
236 // Metadata of the buffers that have been sent for decode. | 240 // Metadata of the buffers that have been sent for decode. |
237 std::list<BufferData> input_buffer_data_; | 241 std::list<BufferData> input_buffer_data_; |
238 | 242 |
239 // A map from bitstream buffer IDs to bitstream buffers that are being | 243 // A map from bitstream buffer IDs to bitstream buffers that are being |
240 // processed by VDA. The map owns SHM buffers. | 244 // processed by VDA. The map owns SHM buffers. |
241 std::map<int32_t, base::SharedMemory*> bitstream_buffers_in_decoder_; | 245 std::map<int32_t, base::SharedMemory*> bitstream_buffers_in_decoder_; |
242 | 246 |
243 // A map from picture buffer IDs to texture-backed picture buffers. | 247 // A map from picture buffer IDs to texture-backed picture buffers. |
244 std::map<int32_t, media::PictureBuffer> assigned_picture_buffers_; | 248 std::map<int32_t, media::PictureBuffer> assigned_picture_buffers_; |
245 | 249 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 // Must be destroyed, or invalidated, on |vda_loop_proxy_| | 300 // Must be destroyed, or invalidated, on |vda_loop_proxy_| |
297 // NOTE: Weak pointers must be invalidated before all other member variables. | 301 // NOTE: Weak pointers must be invalidated before all other member variables. |
298 base::WeakPtrFactory<RTCVideoDecoder> weak_factory_; | 302 base::WeakPtrFactory<RTCVideoDecoder> weak_factory_; |
299 | 303 |
300 DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoder); | 304 DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoder); |
301 }; | 305 }; |
302 | 306 |
303 } // namespace content | 307 } // namespace content |
304 | 308 |
305 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_ | 309 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_ |
OLD | NEW |