| 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 // This file contains an implementation of VideoDecoderAccelerator | 5 // This file contains an implementation of VideoDecoderAccelerator |
| 6 // that utilizes hardware video decoder present on Intel CPUs. | 6 // that utilizes hardware video decoder present on Intel CPUs. |
| 7 | 7 |
| 8 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_DECODE_ACCELERATOR_H_ | 8 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_DECODE_ACCELERATOR_H_ |
| 9 #define CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_DECODE_ACCELERATOR_H_ | 9 #define CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_DECODE_ACCELERATOR_H_ |
| 10 | 10 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 Client* client) override; | 53 Client* client) override; |
| 54 virtual void Decode(const media::BitstreamBuffer& bitstream_buffer) override; | 54 virtual void Decode(const media::BitstreamBuffer& bitstream_buffer) override; |
| 55 virtual void AssignPictureBuffers( | 55 virtual void AssignPictureBuffers( |
| 56 const std::vector<media::PictureBuffer>& buffers) override; | 56 const std::vector<media::PictureBuffer>& buffers) override; |
| 57 virtual void ReusePictureBuffer(int32 picture_buffer_id) override; | 57 virtual void ReusePictureBuffer(int32 picture_buffer_id) override; |
| 58 virtual void Flush() override; | 58 virtual void Flush() override; |
| 59 virtual void Reset() override; | 59 virtual void Reset() override; |
| 60 virtual void Destroy() override; | 60 virtual void Destroy() override; |
| 61 virtual bool CanDecodeOnIOThread() override; | 61 virtual bool CanDecodeOnIOThread() override; |
| 62 | 62 |
| 63 // Get the minimum and maximum supported decode resolution. |
| 64 static media::VideoDecodeAccelerator::SupportedResolution |
| 65 GetSupportedResolution(); |
| 66 |
| 63 private: | 67 private: |
| 64 // Notify the client that an error has occurred and decoding cannot continue. | 68 // Notify the client that an error has occurred and decoding cannot continue. |
| 65 void NotifyError(Error error); | 69 void NotifyError(Error error); |
| 66 | 70 |
| 67 // Map the received input buffer into this process' address space and | 71 // Map the received input buffer into this process' address space and |
| 68 // queue it for decode. | 72 // queue it for decode. |
| 69 void MapAndQueueNewInputBuffer( | 73 void MapAndQueueNewInputBuffer( |
| 70 const media::BitstreamBuffer& bitstream_buffer); | 74 const media::BitstreamBuffer& bitstream_buffer); |
| 71 | 75 |
| 72 // Get a new input buffer from the queue and set it up in decoder. This will | 76 // Get a new input buffer from the queue and set it up in decoder. This will |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 | 274 |
| 271 // The WeakPtrFactory for |weak_this_|. | 275 // The WeakPtrFactory for |weak_this_|. |
| 272 base::WeakPtrFactory<VaapiVideoDecodeAccelerator> weak_this_factory_; | 276 base::WeakPtrFactory<VaapiVideoDecodeAccelerator> weak_this_factory_; |
| 273 | 277 |
| 274 DISALLOW_COPY_AND_ASSIGN(VaapiVideoDecodeAccelerator); | 278 DISALLOW_COPY_AND_ASSIGN(VaapiVideoDecodeAccelerator); |
| 275 }; | 279 }; |
| 276 | 280 |
| 277 } // namespace content | 281 } // namespace content |
| 278 | 282 |
| 279 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_DECODE_ACCELERATOR_H_ | 283 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_DECODE_ACCELERATOR_H_ |
| OLD | NEW |