| 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 996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1007 void DXVAVideoDecodeAccelerator::NotifyResetDone() { | 1007 void DXVAVideoDecodeAccelerator::NotifyResetDone() { |
| 1008 if (client_) | 1008 if (client_) |
| 1009 client_->NotifyResetDone(); | 1009 client_->NotifyResetDone(); |
| 1010 } | 1010 } |
| 1011 | 1011 |
| 1012 void DXVAVideoDecodeAccelerator::RequestPictureBuffers(int width, int height) { | 1012 void DXVAVideoDecodeAccelerator::RequestPictureBuffers(int width, int height) { |
| 1013 // This task could execute after the decoder has been torn down. | 1013 // This task could execute after the decoder has been torn down. |
| 1014 // TODO(ananta) | 1014 // TODO(ananta) |
| 1015 // We need to support mid stream resize. | 1015 // We need to support mid stream resize. |
| 1016 if (state_ != kUninitialized && client_) { | 1016 if (state_ != kUninitialized && client_) { |
| 1017 client_->ProvidePictureBuffers(kNumPictureBuffers, | 1017 client_->ProvidePictureBuffers( |
| 1018 gfx::Size(width, height)); | 1018 kNumPictureBuffers, |
| 1019 gfx::Size(width, height), |
| 1020 GL_TEXTURE_2D); |
| 1019 } | 1021 } |
| 1020 } | 1022 } |
| 1021 | 1023 |
| 1022 void DXVAVideoDecodeAccelerator::NotifyPictureReady( | 1024 void DXVAVideoDecodeAccelerator::NotifyPictureReady( |
| 1023 const media::Picture& picture) { | 1025 const media::Picture& picture) { |
| 1024 // This task could execute after the decoder has been torn down. | 1026 // This task could execute after the decoder has been torn down. |
| 1025 if (state_ != kUninitialized && client_) | 1027 if (state_ != kUninitialized && client_) |
| 1026 client_->PictureReady(picture); | 1028 client_->PictureReady(picture); |
| 1027 } | 1029 } |
| OLD | NEW |