Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: media/gpu/vt_video_decode_accelerator_mac.cc

Issue 2345123002: Attach color space information to hardware decoded NV12 video frames. (Closed)
Patch Set: comments addressed + compile fixes Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after
1065 DLOG(ERROR) << "Failed to bind image"; 1065 DLOG(ERROR) << "Failed to bind image";
1066 NotifyError(PLATFORM_FAILURE, SFT_PLATFORM_ERROR); 1066 NotifyError(PLATFORM_FAILURE, SFT_PLATFORM_ERROR);
1067 return false; 1067 return false;
1068 } 1068 }
1069 1069
1070 // Assign the new image(s) to the the picture info. 1070 // Assign the new image(s) to the the picture info.
1071 picture_info->gl_image = gl_image; 1071 picture_info->gl_image = gl_image;
1072 picture_info->cv_image = frame.image; 1072 picture_info->cv_image = frame.image;
1073 available_picture_ids_.pop_back(); 1073 available_picture_ids_.pop_back();
1074 1074
1075 // TODO(sandersd): Currently, the size got from 1075 // TODO(sandersd): Currently, the size got from
sandersd (OOO until July 31) 2016/09/16 21:54:13 This mess of a TODO with my name on it is botherin
hubbe 2016/09/21 22:04:26 Acknowledged.
1076 // CMVideoFormatDescriptionGetDimensions is visible size. We pass it to 1076 // CMVideoFormatDescriptionGetDimensions is visible size. We pass it to
1077 // GpuVideoDecoder so that GpuVideoDecoder can use correct visible size in 1077 // GpuVideoDecoder so that GpuVideoDecoder can use correct visible size in
1078 // resolution changed. We should find the correct API to get the real 1078 // resolution changed. We should find the correct API to get the real
1079 // coded size and fix it. 1079 // coded size and fix it.
1080 // TODO(hubbe): Use the correct color space. http://crbug.com/647725
1080 client_->PictureReady(Picture(picture_id, frame.bitstream_id, 1081 client_->PictureReady(Picture(picture_id, frame.bitstream_id,
1081 gfx::Rect(frame.coded_size), true)); 1082 gfx::Rect(frame.coded_size), gfx::ColorSpace(),
1083 true));
1082 return true; 1084 return true;
1083 } 1085 }
1084 1086
1085 void VTVideoDecodeAccelerator::NotifyError( 1087 void VTVideoDecodeAccelerator::NotifyError(
1086 Error vda_error_type, 1088 Error vda_error_type,
1087 VTVDASessionFailureType session_failure_type) { 1089 VTVDASessionFailureType session_failure_type) {
1088 DCHECK_LT(session_failure_type, SFT_MAX + 1); 1090 DCHECK_LT(session_failure_type, SFT_MAX + 1);
1089 if (!gpu_thread_checker_.CalledOnValidThread()) { 1091 if (!gpu_thread_checker_.CalledOnValidThread()) {
1090 gpu_task_runner_->PostTask( 1092 gpu_task_runner_->PostTask(
1091 FROM_HERE, 1093 FROM_HERE,
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
1155 SupportedProfile profile; 1157 SupportedProfile profile;
1156 profile.profile = supported_profile; 1158 profile.profile = supported_profile;
1157 profile.min_resolution.SetSize(16, 16); 1159 profile.min_resolution.SetSize(16, 16);
1158 profile.max_resolution.SetSize(4096, 2160); 1160 profile.max_resolution.SetSize(4096, 2160);
1159 profiles.push_back(profile); 1161 profiles.push_back(profile);
1160 } 1162 }
1161 return profiles; 1163 return profiles;
1162 } 1164 }
1163 1165
1164 } // namespace media 1166 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698