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 gfx::Rect(index->second->size())); | |
948 base::MessageLoop::current()->PostTask( | 947 base::MessageLoop::current()->PostTask( |
949 FROM_HERE, | 948 FROM_HERE, |
950 base::Bind(&DXVAVideoDecodeAccelerator::NotifyPictureReady, | 949 base::Bind(&DXVAVideoDecodeAccelerator::NotifyPictureReady, |
951 weak_this_factory_.GetWeakPtr(), | 950 weak_this_factory_.GetWeakPtr(), |
952 output_picture)); | 951 output_picture)); |
953 | 952 |
954 index->second->set_available(false); | 953 index->second->set_available(false); |
955 pending_output_samples_.pop_front(); | 954 pending_output_samples_.pop_front(); |
956 } | 955 } |
957 } | 956 } |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1177 | 1176 |
1178 for (index = picture_buffers.begin(); | 1177 for (index = picture_buffers.begin(); |
1179 index != picture_buffers.end(); | 1178 index != picture_buffers.end(); |
1180 ++index) { | 1179 ++index) { |
1181 DVLOG(1) << "Dismissing picture id: " << index->second->id(); | 1180 DVLOG(1) << "Dismissing picture id: " << index->second->id(); |
1182 client_->DismissPictureBuffer(index->second->id()); | 1181 client_->DismissPictureBuffer(index->second->id()); |
1183 } | 1182 } |
1184 } | 1183 } |
1185 | 1184 |
1186 } // namespace content | 1185 } // namespace content |
OLD | NEW |