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 MEDIA_GPU_V4L2_VIDEO_DECODE_ACCELERATOR_H_ | 9 #ifndef MEDIA_GPU_V4L2_VIDEO_DECODE_ACCELERATOR_H_ |
10 #define MEDIA_GPU_V4L2_VIDEO_DECODE_ACCELERATOR_H_ | 10 #define MEDIA_GPU_V4L2_VIDEO_DECODE_ACCELERATOR_H_ |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 void AssignPictureBuffers( | 101 void AssignPictureBuffers( |
102 const std::vector<media::PictureBuffer>& buffers) override; | 102 const std::vector<media::PictureBuffer>& buffers) override; |
103 void ReusePictureBuffer(int32_t picture_buffer_id) override; | 103 void ReusePictureBuffer(int32_t picture_buffer_id) override; |
104 void Flush() override; | 104 void Flush() override; |
105 void Reset() override; | 105 void Reset() override; |
106 void Destroy() override; | 106 void Destroy() override; |
107 bool TryToSetupDecodeOnSeparateThread( | 107 bool TryToSetupDecodeOnSeparateThread( |
108 const base::WeakPtr<Client>& decode_client, | 108 const base::WeakPtr<Client>& decode_client, |
109 const scoped_refptr<base::SingleThreadTaskRunner>& decode_task_runner) | 109 const scoped_refptr<base::SingleThreadTaskRunner>& decode_task_runner) |
110 override; | 110 override; |
111 media::VideoPixelFormat GetOutputFormat() const override; | |
112 | 111 |
113 static media::VideoDecodeAccelerator::SupportedProfiles | 112 static media::VideoDecodeAccelerator::SupportedProfiles |
114 GetSupportedProfiles(); | 113 GetSupportedProfiles(); |
115 | 114 |
116 private: | 115 private: |
117 // These are rather subjectively tuned. | 116 // These are rather subjectively tuned. |
118 enum { | 117 enum { |
119 kInputBufferCount = 8, | 118 kInputBufferCount = 8, |
120 // TODO(posciak): determine input buffer size based on level limits. | 119 // TODO(posciak): determine input buffer size based on level limits. |
121 // See http://crbug.com/255116. | 120 // See http://crbug.com/255116. |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 | 507 |
509 // The WeakPtrFactory for |weak_this_|. | 508 // The WeakPtrFactory for |weak_this_|. |
510 base::WeakPtrFactory<V4L2VideoDecodeAccelerator> weak_this_factory_; | 509 base::WeakPtrFactory<V4L2VideoDecodeAccelerator> weak_this_factory_; |
511 | 510 |
512 DISALLOW_COPY_AND_ASSIGN(V4L2VideoDecodeAccelerator); | 511 DISALLOW_COPY_AND_ASSIGN(V4L2VideoDecodeAccelerator); |
513 }; | 512 }; |
514 | 513 |
515 } // namespace media | 514 } // namespace media |
516 | 515 |
517 #endif // MEDIA_GPU_V4L2_VIDEO_DECODE_ACCELERATOR_H_ | 516 #endif // MEDIA_GPU_V4L2_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |