| 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 "media/gpu/vt_video_decode_accelerator_mac.h" | 5 #include "media/gpu/vt_video_decode_accelerator_mac.h" |
| 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 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1098 return false; | 1098 return false; |
| 1099 } | 1099 } |
| 1100 | 1100 |
| 1101 // Assign the new image(s) to the the picture info. | 1101 // Assign the new image(s) to the the picture info. |
| 1102 picture_info->gl_image = gl_image; | 1102 picture_info->gl_image = gl_image; |
| 1103 picture_info->cv_image = frame.image; | 1103 picture_info->cv_image = frame.image; |
| 1104 available_picture_ids_.pop_back(); | 1104 available_picture_ids_.pop_back(); |
| 1105 | 1105 |
| 1106 DVLOG(3) << "PictureReady(picture_id=" << picture_id << ", " | 1106 DVLOG(3) << "PictureReady(picture_id=" << picture_id << ", " |
| 1107 << "bitstream_id=" << frame.bitstream_id << ")"; | 1107 << "bitstream_id=" << frame.bitstream_id << ")"; |
| 1108 // TODO(hubbe): Use the correct color space. http://crbug.com/647725 | |
| 1109 client_->PictureReady(Picture(picture_id, frame.bitstream_id, | 1108 client_->PictureReady(Picture(picture_id, frame.bitstream_id, |
| 1110 gfx::Rect(frame.image_size), gfx::ColorSpace(), | 1109 gfx::Rect(frame.image_size), true)); |
| 1111 true)); | |
| 1112 return true; | 1110 return true; |
| 1113 } | 1111 } |
| 1114 | 1112 |
| 1115 void VTVideoDecodeAccelerator::NotifyError( | 1113 void VTVideoDecodeAccelerator::NotifyError( |
| 1116 Error vda_error_type, | 1114 Error vda_error_type, |
| 1117 VTVDASessionFailureType session_failure_type) { | 1115 VTVDASessionFailureType session_failure_type) { |
| 1118 DCHECK_LT(session_failure_type, SFT_MAX + 1); | 1116 DCHECK_LT(session_failure_type, SFT_MAX + 1); |
| 1119 if (!gpu_task_runner_->BelongsToCurrentThread()) { | 1117 if (!gpu_task_runner_->BelongsToCurrentThread()) { |
| 1120 gpu_task_runner_->PostTask( | 1118 gpu_task_runner_->PostTask( |
| 1121 FROM_HERE, | 1119 FROM_HERE, |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1188 SupportedProfile profile; | 1186 SupportedProfile profile; |
| 1189 profile.profile = supported_profile; | 1187 profile.profile = supported_profile; |
| 1190 profile.min_resolution.SetSize(16, 16); | 1188 profile.min_resolution.SetSize(16, 16); |
| 1191 profile.max_resolution.SetSize(4096, 2160); | 1189 profile.max_resolution.SetSize(4096, 2160); |
| 1192 profiles.push_back(profile); | 1190 profiles.push_back(profile); |
| 1193 } | 1191 } |
| 1194 return profiles; | 1192 return profiles; |
| 1195 } | 1193 } |
| 1196 | 1194 |
| 1197 } // namespace media | 1195 } // namespace media |
| OLD | NEW |