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