| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 void AssignPictureBuffers( | 91 void AssignPictureBuffers( |
| 92 const std::vector<media::PictureBuffer>& buffers) override; | 92 const std::vector<media::PictureBuffer>& buffers) override; |
| 93 void ReusePictureBuffer(int32_t picture_buffer_id) override; | 93 void ReusePictureBuffer(int32_t picture_buffer_id) override; |
| 94 void Flush() override; | 94 void Flush() override; |
| 95 void Reset() override; | 95 void Reset() override; |
| 96 void Destroy() override; | 96 void Destroy() override; |
| 97 bool TryToSetupDecodeOnSeparateThread( | 97 bool TryToSetupDecodeOnSeparateThread( |
| 98 const base::WeakPtr<Client>& decode_client, | 98 const base::WeakPtr<Client>& decode_client, |
| 99 const scoped_refptr<base::SingleThreadTaskRunner>& decode_task_runner) | 99 const scoped_refptr<base::SingleThreadTaskRunner>& decode_task_runner) |
| 100 override; | 100 override; |
| 101 media::VideoPixelFormat GetOutputFormat() const override; |
| 101 | 102 |
| 102 static media::VideoDecodeAccelerator::SupportedProfiles | 103 static media::VideoDecodeAccelerator::SupportedProfiles |
| 103 GetSupportedProfiles(); | 104 GetSupportedProfiles(); |
| 104 | 105 |
| 105 private: | 106 private: |
| 106 // These are rather subjectively tuned. | 107 // These are rather subjectively tuned. |
| 107 enum { | 108 enum { |
| 108 kInputBufferCount = 8, | 109 kInputBufferCount = 8, |
| 109 // TODO(posciak): determine input buffer size based on level limits. | 110 // TODO(posciak): determine input buffer size based on level limits. |
| 110 // See http://crbug.com/255116. | 111 // See http://crbug.com/255116. |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 | 459 |
| 459 // The WeakPtrFactory for |weak_this_|. | 460 // The WeakPtrFactory for |weak_this_|. |
| 460 base::WeakPtrFactory<V4L2VideoDecodeAccelerator> weak_this_factory_; | 461 base::WeakPtrFactory<V4L2VideoDecodeAccelerator> weak_this_factory_; |
| 461 | 462 |
| 462 DISALLOW_COPY_AND_ASSIGN(V4L2VideoDecodeAccelerator); | 463 DISALLOW_COPY_AND_ASSIGN(V4L2VideoDecodeAccelerator); |
| 463 }; | 464 }; |
| 464 | 465 |
| 465 } // namespace content | 466 } // namespace content |
| 466 | 467 |
| 467 #endif // CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DECODE_ACCELERATOR_H_ | 468 #endif // CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DECODE_ACCELERATOR_H_ |
| OLD | NEW |