| 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 #ifndef CONTENT_COMMON_GPU_MEDIA_VT_VIDEO_DECODE_ACCELERATOR_H_ | 5 #ifndef CONTENT_COMMON_GPU_MEDIA_VT_VIDEO_DECODE_ACCELERATOR_H_ |
| 6 #define CONTENT_COMMON_GPU_MEDIA_VT_VIDEO_DECODE_ACCELERATOR_H_ | 6 #define CONTENT_COMMON_GPU_MEDIA_VT_VIDEO_DECODE_ACCELERATOR_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 // interface for Mac OS X (currently limited to 10.9+). | 33 // interface for Mac OS X (currently limited to 10.9+). |
| 34 class VTVideoDecodeAccelerator : public media::VideoDecodeAccelerator { | 34 class VTVideoDecodeAccelerator : public media::VideoDecodeAccelerator { |
| 35 public: | 35 public: |
| 36 explicit VTVideoDecodeAccelerator( | 36 explicit VTVideoDecodeAccelerator( |
| 37 const base::Callback<bool(void)>& make_context_current, | 37 const base::Callback<bool(void)>& make_context_current, |
| 38 const base::Callback<void(uint32, uint32, scoped_refptr<gl::GLImage>)>& | 38 const base::Callback<void(uint32, uint32, scoped_refptr<gl::GLImage>)>& |
| 39 bind_image); | 39 bind_image); |
| 40 ~VTVideoDecodeAccelerator() override; | 40 ~VTVideoDecodeAccelerator() override; |
| 41 | 41 |
| 42 // VideoDecodeAccelerator implementation. | 42 // VideoDecodeAccelerator implementation. |
| 43 bool Initialize(media::VideoCodecProfile profile, Client* client) override; | 43 bool Initialize(const StreamParameters& params, Client* client) override; |
| 44 void Decode(const media::BitstreamBuffer& bitstream) override; | 44 void Decode(const media::BitstreamBuffer& bitstream) override; |
| 45 void AssignPictureBuffers( | 45 void AssignPictureBuffers( |
| 46 const std::vector<media::PictureBuffer>& pictures) override; | 46 const std::vector<media::PictureBuffer>& pictures) override; |
| 47 void ReusePictureBuffer(int32_t picture_id) override; | 47 void ReusePictureBuffer(int32_t picture_id) override; |
| 48 void Flush() override; | 48 void Flush() override; |
| 49 void Reset() override; | 49 void Reset() override; |
| 50 void Destroy() override; | 50 void Destroy() override; |
| 51 bool CanDecodeOnIOThread() override; | 51 bool CanDecodeOnIOThread() override; |
| 52 | 52 |
| 53 // Called by OutputThunk() when VideoToolbox finishes decoding a frame. | 53 // Called by OutputThunk() when VideoToolbox finishes decoding a frame. |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 // Declared last to ensure that all weak pointers are invalidated before | 260 // Declared last to ensure that all weak pointers are invalidated before |
| 261 // other destructors run. | 261 // other destructors run. |
| 262 base::WeakPtrFactory<VTVideoDecodeAccelerator> weak_this_factory_; | 262 base::WeakPtrFactory<VTVideoDecodeAccelerator> weak_this_factory_; |
| 263 | 263 |
| 264 DISALLOW_COPY_AND_ASSIGN(VTVideoDecodeAccelerator); | 264 DISALLOW_COPY_AND_ASSIGN(VTVideoDecodeAccelerator); |
| 265 }; | 265 }; |
| 266 | 266 |
| 267 } // namespace content | 267 } // namespace content |
| 268 | 268 |
| 269 #endif // CONTENT_COMMON_GPU_MEDIA_VT_VIDEO_DECODE_ACCELERATOR_H_ | 269 #endif // CONTENT_COMMON_GPU_MEDIA_VT_VIDEO_DECODE_ACCELERATOR_H_ |
| OLD | NEW |