| 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 #ifndef CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ | 5 #ifndef CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ |
| 6 #define CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ | 6 #define CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ |
| 7 | 7 |
| 8 #include <d3d9.h> | 8 #include <d3d9.h> |
| 9 #include <dxva2api.h> | 9 #include <dxva2api.h> |
| 10 #include <list> | 10 #include <list> |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 enum State { | 36 enum State { |
| 37 kUninitialized, // un-initialized. | 37 kUninitialized, // un-initialized. |
| 38 kNormal, // normal playing state. | 38 kNormal, // normal playing state. |
| 39 kResetting, // upon received Reset(), before ResetDone() | 39 kResetting, // upon received Reset(), before ResetDone() |
| 40 kStopped, // upon output EOS received. | 40 kStopped, // upon output EOS received. |
| 41 kFlushing, // upon flush request received. | 41 kFlushing, // upon flush request received. |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 // Does not take ownership of |client| which must outlive |*this|. | 44 // Does not take ownership of |client| which must outlive |*this|. |
| 45 explicit DXVAVideoDecodeAccelerator( | 45 explicit DXVAVideoDecodeAccelerator( |
| 46 media::VideoDecodeAccelerator::Client* client, | |
| 47 const base::Callback<bool(void)>& make_context_current); | 46 const base::Callback<bool(void)>& make_context_current); |
| 48 virtual ~DXVAVideoDecodeAccelerator(); | 47 virtual ~DXVAVideoDecodeAccelerator(); |
| 49 | 48 |
| 50 // media::VideoDecodeAccelerator implementation. | 49 // media::VideoDecodeAccelerator implementation. |
| 51 virtual bool Initialize(media::VideoCodecProfile profile) OVERRIDE; | 50 virtual bool Initialize(Client* client, |
| 51 media::VideoCodecProfile profile) OVERRIDE; |
| 52 virtual void Decode(const media::BitstreamBuffer& bitstream_buffer) OVERRIDE; | 52 virtual void Decode(const media::BitstreamBuffer& bitstream_buffer) OVERRIDE; |
| 53 virtual void AssignPictureBuffers( | 53 virtual void AssignPictureBuffers( |
| 54 const std::vector<media::PictureBuffer>& buffers) OVERRIDE; | 54 const std::vector<media::PictureBuffer>& buffers) OVERRIDE; |
| 55 virtual void ReusePictureBuffer(int32 picture_buffer_id) OVERRIDE; | 55 virtual void ReusePictureBuffer(int32 picture_buffer_id) OVERRIDE; |
| 56 virtual void Flush() OVERRIDE; | 56 virtual void Flush() OVERRIDE; |
| 57 virtual void Reset() OVERRIDE; | 57 virtual void Reset() OVERRIDE; |
| 58 virtual void Destroy() OVERRIDE; | 58 virtual void Destroy() OVERRIDE; |
| 59 | 59 |
| 60 private: | 60 private: |
| 61 typedef void* EGLConfig; | 61 typedef void* EGLConfig; |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 typedef std::list<base::win::ScopedComPtr<IMFSample>> PendingInputs; | 204 typedef std::list<base::win::ScopedComPtr<IMFSample>> PendingInputs; |
| 205 PendingInputs pending_input_buffers_; | 205 PendingInputs pending_input_buffers_; |
| 206 | 206 |
| 207 // Callback to set the correct gl context. | 207 // Callback to set the correct gl context. |
| 208 base::Callback<bool(void)> make_context_current_; | 208 base::Callback<bool(void)> make_context_current_; |
| 209 }; | 209 }; |
| 210 | 210 |
| 211 } // namespace content | 211 } // namespace content |
| 212 | 212 |
| 213 #endif // CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ | 213 #endif // CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ |
| OLD | NEW |