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

Side by Side Diff: content/renderer/pepper/video_decoder_shim.cc

Issue 2345123002: Attach color space information to hardware decoded NV12 video frames. (Closed)
Patch Set: minor bugfix Created 4 years, 2 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
« no previous file with comments | « no previous file | media/filters/gpu_video_decoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "content/renderer/pepper/video_decoder_shim.h" 5 #include "content/renderer/pepper/video_decoder_shim.h"
6 6
7 #include <GLES2/gl2.h> 7 #include <GLES2/gl2.h>
8 #include <GLES2/gl2ext.h> 8 #include <GLES2/gl2ext.h>
9 #include <GLES2/gl2extchromium.h> 9 #include <GLES2/gl2extchromium.h>
10 #include <utility> 10 #include <utility>
(...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after
1057 TextureIdSet::iterator it = available_textures_.begin(); 1057 TextureIdSet::iterator it = available_textures_.begin();
1058 uint32_t texture_id = *it; 1058 uint32_t texture_id = *it;
1059 available_textures_.erase(it); 1059 available_textures_.erase(it);
1060 1060
1061 uint32_t local_texture_id = texture_id_map_[texture_id]; 1061 uint32_t local_texture_id = texture_id_map_[texture_id];
1062 1062
1063 yuv_converter_->Convert(frame->video_frame, local_texture_id); 1063 yuv_converter_->Convert(frame->video_frame, local_texture_id);
1064 1064
1065 host_->PictureReady(media::Picture(texture_id, frame->decode_id, 1065 host_->PictureReady(media::Picture(texture_id, frame->decode_id,
1066 frame->video_frame->visible_rect(), 1066 frame->video_frame->visible_rect(),
1067 false)); 1067 gfx::ColorSpace(), false));
1068 pending_frames_.pop(); 1068 pending_frames_.pop();
1069 } 1069 }
1070 1070
1071 FlushCommandBuffer(); 1071 FlushCommandBuffer();
1072 1072
1073 if (pending_frames_.empty()) { 1073 if (pending_frames_.empty()) {
1074 // If frames aren't backing up, notify the host of any completed decodes so 1074 // If frames aren't backing up, notify the host of any completed decodes so
1075 // it can send more buffers. 1075 // it can send more buffers.
1076 NotifyCompletedDecodes(); 1076 NotifyCompletedDecodes();
1077 1077
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 void VideoDecoderShim::DeleteTexture(uint32_t texture_id) { 1117 void VideoDecoderShim::DeleteTexture(uint32_t texture_id) {
1118 gpu::gles2::GLES2Interface* gles2 = context_provider_->ContextGL(); 1118 gpu::gles2::GLES2Interface* gles2 = context_provider_->ContextGL();
1119 gles2->DeleteTextures(1, &texture_id); 1119 gles2->DeleteTextures(1, &texture_id);
1120 } 1120 }
1121 1121
1122 void VideoDecoderShim::FlushCommandBuffer() { 1122 void VideoDecoderShim::FlushCommandBuffer() {
1123 context_provider_->ContextGL()->Flush(); 1123 context_provider_->ContextGL()->Flush();
1124 } 1124 }
1125 1125
1126 } // namespace content 1126 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | media/filters/gpu_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698