OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // This file contains an implementation of VideoDecodeAccelerator | 5 // This file contains an implementation of VideoDecodeAccelerator |
6 // that utilizes hardware video decoders, which expose Video4Linux 2 API | 6 // that utilizes hardware video decoders, which expose Video4Linux 2 API |
7 // (http://linuxtv.org/downloads/v4l-dvb-apis/). | 7 // (http://linuxtv.org/downloads/v4l-dvb-apis/). |
8 | 8 |
9 #ifndef CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DECODE_ACCELERATOR_H_ | 9 #ifndef CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DECODE_ACCELERATOR_H_ |
10 #define CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DECODE_ACCELERATOR_H_ | 10 #define CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DECODE_ACCELERATOR_H_ |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 EGLContext egl_context, | 77 EGLContext egl_context, |
78 const base::WeakPtr<Client>& io_client_, | 78 const base::WeakPtr<Client>& io_client_, |
79 const base::Callback<bool(void)>& make_context_current, | 79 const base::Callback<bool(void)>& make_context_current, |
80 const scoped_refptr<V4L2Device>& device, | 80 const scoped_refptr<V4L2Device>& device, |
81 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner); | 81 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner); |
82 ~V4L2VideoDecodeAccelerator() override; | 82 ~V4L2VideoDecodeAccelerator() override; |
83 | 83 |
84 // media::VideoDecodeAccelerator implementation. | 84 // media::VideoDecodeAccelerator implementation. |
85 // Note: Initialize() and Destroy() are synchronous. | 85 // Note: Initialize() and Destroy() are synchronous. |
86 bool Initialize(media::VideoCodecProfile profile, | 86 bool Initialize(media::VideoCodecProfile profile, |
| 87 uint32 min_picture_count, |
87 Client* client) override; | 88 Client* client) override; |
88 void Decode(const media::BitstreamBuffer& bitstream_buffer) override; | 89 void Decode(const media::BitstreamBuffer& bitstream_buffer) override; |
89 void AssignPictureBuffers( | 90 void AssignPictureBuffers( |
90 const std::vector<media::PictureBuffer>& buffers) override; | 91 const std::vector<media::PictureBuffer>& buffers) override; |
91 void ReusePictureBuffer(int32 picture_buffer_id) override; | 92 void ReusePictureBuffer(int32 picture_buffer_id) override; |
92 void Flush() override; | 93 void Flush() override; |
93 void Reset() override; | 94 void Reset() override; |
94 void Destroy() override; | 95 void Destroy() override; |
95 bool CanDecodeOnIOThread() override; | 96 bool CanDecodeOnIOThread() override; |
96 | 97 |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 | 445 |
445 // EGL state | 446 // EGL state |
446 EGLDisplay egl_display_; | 447 EGLDisplay egl_display_; |
447 EGLContext egl_context_; | 448 EGLContext egl_context_; |
448 | 449 |
449 // The codec we'll be decoding for. | 450 // The codec we'll be decoding for. |
450 media::VideoCodecProfile video_profile_; | 451 media::VideoCodecProfile video_profile_; |
451 // Chosen output format. | 452 // Chosen output format. |
452 uint32_t output_format_fourcc_; | 453 uint32_t output_format_fourcc_; |
453 | 454 |
| 455 // The minimum number of picture buffers to allocate. |
| 456 uint32_t min_picture_count_; |
| 457 |
454 // The WeakPtrFactory for |weak_this_|. | 458 // The WeakPtrFactory for |weak_this_|. |
455 base::WeakPtrFactory<V4L2VideoDecodeAccelerator> weak_this_factory_; | 459 base::WeakPtrFactory<V4L2VideoDecodeAccelerator> weak_this_factory_; |
456 | 460 |
457 DISALLOW_COPY_AND_ASSIGN(V4L2VideoDecodeAccelerator); | 461 DISALLOW_COPY_AND_ASSIGN(V4L2VideoDecodeAccelerator); |
458 }; | 462 }; |
459 | 463 |
460 } // namespace content | 464 } // namespace content |
461 | 465 |
462 #endif // CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DECODE_ACCELERATOR_H_ | 466 #endif // CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |