| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <algorithm> | 5 #include <algorithm> |
| 6 | 6 |
| 7 #include <CoreVideo/CoreVideo.h> | 7 #include <CoreVideo/CoreVideo.h> |
| 8 #include <OpenGL/CGLIOSurface.h> | 8 #include <OpenGL/CGLIOSurface.h> |
| 9 #include <OpenGL/gl.h> | 9 #include <OpenGL/gl.h> |
| 10 #include <stddef.h> | 10 #include <stddef.h> |
| (...skipping 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1084 picture_info->cv_image = frame.image; | 1084 picture_info->cv_image = frame.image; |
| 1085 available_picture_ids_.pop_back(); | 1085 available_picture_ids_.pop_back(); |
| 1086 | 1086 |
| 1087 // TODO(sandersd): Currently, the size got from | 1087 // TODO(sandersd): Currently, the size got from |
| 1088 // CMVideoFormatDescriptionGetDimensions is visible size. We pass it to | 1088 // CMVideoFormatDescriptionGetDimensions is visible size. We pass it to |
| 1089 // GpuVideoDecoder so that GpuVideoDecoder can use correct visible size in | 1089 // GpuVideoDecoder so that GpuVideoDecoder can use correct visible size in |
| 1090 // resolution changed. We should find the correct API to get the real | 1090 // resolution changed. We should find the correct API to get the real |
| 1091 // coded size and fix it. | 1091 // coded size and fix it. |
| 1092 client_->PictureReady(media::Picture(picture_id, frame.bitstream_id, | 1092 client_->PictureReady(media::Picture(picture_id, frame.bitstream_id, |
| 1093 gfx::Rect(frame.coded_size), | 1093 gfx::Rect(frame.coded_size), |
| 1094 allow_overlay)); | 1094 allow_overlay, false)); |
| 1095 return true; | 1095 return true; |
| 1096 } | 1096 } |
| 1097 | 1097 |
| 1098 void VTVideoDecodeAccelerator::NotifyError( | 1098 void VTVideoDecodeAccelerator::NotifyError( |
| 1099 Error vda_error_type, | 1099 Error vda_error_type, |
| 1100 VTVDASessionFailureType session_failure_type) { | 1100 VTVDASessionFailureType session_failure_type) { |
| 1101 DCHECK_LT(session_failure_type, SFT_MAX + 1); | 1101 DCHECK_LT(session_failure_type, SFT_MAX + 1); |
| 1102 if (!gpu_thread_checker_.CalledOnValidThread()) { | 1102 if (!gpu_thread_checker_.CalledOnValidThread()) { |
| 1103 gpu_task_runner_->PostTask(FROM_HERE, base::Bind( | 1103 gpu_task_runner_->PostTask(FROM_HERE, base::Bind( |
| 1104 &VTVideoDecodeAccelerator::NotifyError, weak_this_, vda_error_type, | 1104 &VTVideoDecodeAccelerator::NotifyError, weak_this_, vda_error_type, |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1166 SupportedProfile profile; | 1166 SupportedProfile profile; |
| 1167 profile.profile = supported_profile; | 1167 profile.profile = supported_profile; |
| 1168 profile.min_resolution.SetSize(16, 16); | 1168 profile.min_resolution.SetSize(16, 16); |
| 1169 profile.max_resolution.SetSize(4096, 2160); | 1169 profile.max_resolution.SetSize(4096, 2160); |
| 1170 profiles.push_back(profile); | 1170 profiles.push_back(profile); |
| 1171 } | 1171 } |
| 1172 return profiles; | 1172 return profiles; |
| 1173 } | 1173 } |
| 1174 | 1174 |
| 1175 } // namespace content | 1175 } // namespace content |
| OLD | NEW |