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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
47 class CONTENT_EXPORT VaapiVideoDecodeAccelerator | 47 class CONTENT_EXPORT VaapiVideoDecodeAccelerator |
48 : public media::VideoDecodeAccelerator { | 48 : public media::VideoDecodeAccelerator { |
49 public: | 49 public: |
50 VaapiVideoDecodeAccelerator( | 50 VaapiVideoDecodeAccelerator( |
51 const base::Callback<bool(void)>& make_context_current, | 51 const base::Callback<bool(void)>& make_context_current, |
52 const base::Callback<void(uint32, uint32, scoped_refptr<gfx::GLImage>)>& | 52 const base::Callback<void(uint32, uint32, scoped_refptr<gfx::GLImage>)>& |
53 bind_image); | 53 bind_image); |
54 ~VaapiVideoDecodeAccelerator() override; | 54 ~VaapiVideoDecodeAccelerator() override; |
55 | 55 |
56 // media::VideoDecodeAccelerator implementation. | 56 // media::VideoDecodeAccelerator implementation. |
57 static std::vector<media::VideoDecodeAccelerator::SupportedProfile> | |
wuchengli
2015/03/18 08:02:37
Move it after CanDecodeOnIOThread.
henryhsu
2015/03/18 11:06:09
Done.
| |
58 GetSupportedProfiles(); | |
57 bool Initialize(media::VideoCodecProfile profile, | 59 bool Initialize(media::VideoCodecProfile profile, |
58 Client* client) override; | 60 Client* client) override; |
59 void Decode(const media::BitstreamBuffer& bitstream_buffer) override; | 61 void Decode(const media::BitstreamBuffer& bitstream_buffer) override; |
60 void AssignPictureBuffers( | 62 void AssignPictureBuffers( |
61 const std::vector<media::PictureBuffer>& buffers) override; | 63 const std::vector<media::PictureBuffer>& buffers) override; |
62 void ReusePictureBuffer(int32 picture_buffer_id) override; | 64 void ReusePictureBuffer(int32 picture_buffer_id) override; |
63 void Flush() override; | 65 void Flush() override; |
64 void Reset() override; | 66 void Reset() override; |
65 void Destroy() override; | 67 void Destroy() override; |
66 bool CanDecodeOnIOThread() override; | 68 bool CanDecodeOnIOThread() override; |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
276 | 278 |
277 // The WeakPtrFactory for |weak_this_|. | 279 // The WeakPtrFactory for |weak_this_|. |
278 base::WeakPtrFactory<VaapiVideoDecodeAccelerator> weak_this_factory_; | 280 base::WeakPtrFactory<VaapiVideoDecodeAccelerator> weak_this_factory_; |
279 | 281 |
280 DISALLOW_COPY_AND_ASSIGN(VaapiVideoDecodeAccelerator); | 282 DISALLOW_COPY_AND_ASSIGN(VaapiVideoDecodeAccelerator); |
281 }; | 283 }; |
282 | 284 |
283 } // namespace content | 285 } // namespace content |
284 | 286 |
285 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_DECODE_ACCELERATOR_H_ | 287 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |