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

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: compile fix 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 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 // Assign the new image(s) to the the picture info. 1098 // Assign the new image(s) to the the picture info.
1099 picture_info->gl_image = gl_image; 1099 picture_info->gl_image = gl_image;
1100 picture_info->cv_image = frame.image; 1100 picture_info->cv_image = frame.image;
1101 available_picture_ids_.pop_back(); 1101 available_picture_ids_.pop_back();
1102 1102
1103 // TODO(sandersd): Currently, the size got from 1103 // TODO(sandersd): Currently, the size got from
1104 // CMVideoFormatDescriptionGetDimensions is visible size. We pass it to 1104 // CMVideoFormatDescriptionGetDimensions is visible size. We pass it to
1105 // GpuVideoDecoder so that GpuVideoDecoder can use correct visible size in 1105 // GpuVideoDecoder so that GpuVideoDecoder can use correct visible size in
1106 // resolution changed. We should find the correct API to get the real 1106 // resolution changed. We should find the correct API to get the real
1107 // coded size and fix it. 1107 // coded size and fix it.
1108 // TODO(hubbe): Use the correct color space. http://crbug.com/647725
1108 client_->PictureReady(Picture(picture_id, frame.bitstream_id, 1109 client_->PictureReady(Picture(picture_id, frame.bitstream_id,
1109 gfx::Rect(frame.coded_size), true)); 1110 gfx::Rect(frame.coded_size), gfx::ColorSpace(),
1111 true));
1110 return true; 1112 return true;
1111 } 1113 }
1112 1114
1113 void VTVideoDecodeAccelerator::NotifyError( 1115 void VTVideoDecodeAccelerator::NotifyError(
1114 Error vda_error_type, 1116 Error vda_error_type,
1115 VTVDASessionFailureType session_failure_type) { 1117 VTVDASessionFailureType session_failure_type) {
1116 DCHECK_LT(session_failure_type, SFT_MAX + 1); 1118 DCHECK_LT(session_failure_type, SFT_MAX + 1);
1117 if (!gpu_thread_checker_.CalledOnValidThread()) { 1119 if (!gpu_thread_checker_.CalledOnValidThread()) {
1118 gpu_task_runner_->PostTask( 1120 gpu_task_runner_->PostTask(
1119 FROM_HERE, 1121 FROM_HERE,
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
1186 SupportedProfile profile; 1188 SupportedProfile profile;
1187 profile.profile = supported_profile; 1189 profile.profile = supported_profile;
1188 profile.min_resolution.SetSize(16, 16); 1190 profile.min_resolution.SetSize(16, 16);
1189 profile.max_resolution.SetSize(4096, 2160); 1191 profile.max_resolution.SetSize(4096, 2160);
1190 profiles.push_back(profile); 1192 profiles.push_back(profile);
1191 } 1193 }
1192 return profiles; 1194 return profiles;
1193 } 1195 }
1194 1196
1195 } // namespace media 1197 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698