| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 // can assume |*this| is still alive. See |weak_this_| below for more details. | 42 // can assume |*this| is still alive. See |weak_this_| below for more details. |
| 43 class CONTENT_EXPORT VaapiVideoDecodeAccelerator | 43 class CONTENT_EXPORT VaapiVideoDecodeAccelerator |
| 44 : public media::VideoDecodeAccelerator { | 44 : public media::VideoDecodeAccelerator { |
| 45 public: | 45 public: |
| 46 VaapiVideoDecodeAccelerator( | 46 VaapiVideoDecodeAccelerator( |
| 47 Display* x_display, | 47 Display* x_display, |
| 48 const base::Callback<bool(void)>& make_context_current); | 48 const base::Callback<bool(void)>& make_context_current); |
| 49 virtual ~VaapiVideoDecodeAccelerator(); | 49 virtual ~VaapiVideoDecodeAccelerator(); |
| 50 | 50 |
| 51 // media::VideoDecodeAccelerator implementation. | 51 // media::VideoDecodeAccelerator implementation. |
| 52 static std::vector<media::VideoDecodeAccelerator::SupportedProfile> |
| 53 GetSupportedProfiles(); |
| 52 virtual bool Initialize(media::VideoCodecProfile profile, | 54 virtual bool Initialize(media::VideoCodecProfile profile, |
| 53 Client* client) override; | 55 Client* client) override; |
| 54 virtual void Decode(const media::BitstreamBuffer& bitstream_buffer) override; | 56 virtual void Decode(const media::BitstreamBuffer& bitstream_buffer) override; |
| 55 virtual void AssignPictureBuffers( | 57 virtual void AssignPictureBuffers( |
| 56 const std::vector<media::PictureBuffer>& buffers) override; | 58 const std::vector<media::PictureBuffer>& buffers) override; |
| 57 virtual void ReusePictureBuffer(int32 picture_buffer_id) override; | 59 virtual void ReusePictureBuffer(int32 picture_buffer_id) override; |
| 58 virtual void Flush() override; | 60 virtual void Flush() override; |
| 59 virtual void Reset() override; | 61 virtual void Reset() override; |
| 60 virtual void Destroy() override; | 62 virtual void Destroy() override; |
| 61 virtual bool CanDecodeOnIOThread() override; | 63 virtual bool CanDecodeOnIOThread() override; |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 | 272 |
| 271 // The WeakPtrFactory for |weak_this_|. | 273 // The WeakPtrFactory for |weak_this_|. |
| 272 base::WeakPtrFactory<VaapiVideoDecodeAccelerator> weak_this_factory_; | 274 base::WeakPtrFactory<VaapiVideoDecodeAccelerator> weak_this_factory_; |
| 273 | 275 |
| 274 DISALLOW_COPY_AND_ASSIGN(VaapiVideoDecodeAccelerator); | 276 DISALLOW_COPY_AND_ASSIGN(VaapiVideoDecodeAccelerator); |
| 275 }; | 277 }; |
| 276 | 278 |
| 277 } // namespace content | 279 } // namespace content |
| 278 | 280 |
| 279 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_DECODE_ACCELERATOR_H_ | 281 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_DECODE_ACCELERATOR_H_ |
| OLD | NEW |