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 #include "content/common/gpu/media/dxva_video_decode_accelerator.h" | 5 #include "content/common/gpu/media/dxva_video_decode_accelerator.h" |
6 | 6 |
7 #if !defined(OS_WIN) | 7 #if !defined(OS_WIN) |
8 #error This file should only be built on Windows. | 8 #error This file should only be built on Windows. |
9 #endif // !defined(OS_WIN) | 9 #endif // !defined(OS_WIN) |
10 | 10 |
(...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1010 void DXVAVideoDecodeAccelerator::NotifyResetDone() { | 1010 void DXVAVideoDecodeAccelerator::NotifyResetDone() { |
1011 if (client_) | 1011 if (client_) |
1012 client_->NotifyResetDone(); | 1012 client_->NotifyResetDone(); |
1013 } | 1013 } |
1014 | 1014 |
1015 void DXVAVideoDecodeAccelerator::RequestPictureBuffers(int width, int height) { | 1015 void DXVAVideoDecodeAccelerator::RequestPictureBuffers(int width, int height) { |
1016 // This task could execute after the decoder has been torn down. | 1016 // This task could execute after the decoder has been torn down. |
1017 // TODO(ananta) | 1017 // TODO(ananta) |
1018 // We need to support mid stream resize. | 1018 // We need to support mid stream resize. |
1019 if (state_ != kUninitialized && client_) { | 1019 if (state_ != kUninitialized && client_) { |
1020 client_->ProvidePictureBuffers(kNumPictureBuffers, | 1020 client_->ProvidePictureBuffers( |
1021 gfx::Size(width, height)); | 1021 kNumPictureBuffers, |
| 1022 gfx::Size(width, height), |
| 1023 media::VideoDecodeAccelerator::TEXTURE_TARGET_2D); |
1022 } | 1024 } |
1023 } | 1025 } |
1024 | 1026 |
1025 void DXVAVideoDecodeAccelerator::NotifyPictureReady( | 1027 void DXVAVideoDecodeAccelerator::NotifyPictureReady( |
1026 const media::Picture& picture) { | 1028 const media::Picture& picture) { |
1027 // This task could execute after the decoder has been torn down. | 1029 // This task could execute after the decoder has been torn down. |
1028 if (state_ != kUninitialized && client_) | 1030 if (state_ != kUninitialized && client_) |
1029 client_->PictureReady(picture); | 1031 client_->PictureReady(picture); |
1030 } | 1032 } |
OLD | NEW |