| 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 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 936 HandleResolutionChanged(surface_desc.Width, surface_desc.Height); | 936 HandleResolutionChanged(surface_desc.Width, surface_desc.Height); |
| 937 return; | 937 return; |
| 938 } | 938 } |
| 939 | 939 |
| 940 RETURN_AND_NOTIFY_ON_FAILURE( | 940 RETURN_AND_NOTIFY_ON_FAILURE( |
| 941 index->second->CopyOutputSampleDataToPictureBuffer(*this, surface), | 941 index->second->CopyOutputSampleDataToPictureBuffer(*this, surface), |
| 942 "Failed to copy output sample", | 942 "Failed to copy output sample", |
| 943 PLATFORM_FAILURE, ); | 943 PLATFORM_FAILURE, ); |
| 944 | 944 |
| 945 media::Picture output_picture(index->second->id(), | 945 media::Picture output_picture(index->second->id(), |
| 946 sample_info.input_buffer_id); | 946 sample_info.input_buffer_id, |
| 947 index->second->size()); |
| 947 base::MessageLoop::current()->PostTask( | 948 base::MessageLoop::current()->PostTask( |
| 948 FROM_HERE, | 949 FROM_HERE, |
| 949 base::Bind(&DXVAVideoDecodeAccelerator::NotifyPictureReady, | 950 base::Bind(&DXVAVideoDecodeAccelerator::NotifyPictureReady, |
| 950 weak_this_factory_.GetWeakPtr(), | 951 weak_this_factory_.GetWeakPtr(), |
| 951 output_picture)); | 952 output_picture)); |
| 952 | 953 |
| 953 index->second->set_available(false); | 954 index->second->set_available(false); |
| 954 pending_output_samples_.pop_front(); | 955 pending_output_samples_.pop_front(); |
| 955 } | 956 } |
| 956 } | 957 } |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1176 | 1177 |
| 1177 for (index = picture_buffers.begin(); | 1178 for (index = picture_buffers.begin(); |
| 1178 index != picture_buffers.end(); | 1179 index != picture_buffers.end(); |
| 1179 ++index) { | 1180 ++index) { |
| 1180 DVLOG(1) << "Dismissing picture id: " << index->second->id(); | 1181 DVLOG(1) << "Dismissing picture id: " << index->second->id(); |
| 1181 client_->DismissPictureBuffer(index->second->id()); | 1182 client_->DismissPictureBuffer(index->second->id()); |
| 1182 } | 1183 } |
| 1183 } | 1184 } |
| 1184 | 1185 |
| 1185 } // namespace content | 1186 } // namespace content |
| OLD | NEW |