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: chrome/renderer/media/gles2_video_decode_context.cc

Issue 4113006: Rename UploadToVideoFrame to ConvertToVideoFrame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <GLES2/gl2.h> 5 #include <GLES2/gl2.h>
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "chrome/renderer/ggl/ggl.h" 8 #include "chrome/renderer/ggl/ggl.h"
9 #include "chrome/renderer/media/gles2_video_decode_context.h" 9 #include "chrome/renderer/media/gles2_video_decode_context.h"
10 10
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 for (size_t i = 0; i < frames_.size(); ++i) { 92 for (size_t i = 0; i < frames_.size(); ++i) {
93 for (size_t j = 0; j < frames_[i]->planes(); ++j) { 93 for (size_t j = 0; j < frames_[i]->planes(); ++j) {
94 media::VideoFrame::GlTexture texture = frames_[i]->gl_texture(j); 94 media::VideoFrame::GlTexture texture = frames_[i]->gl_texture(j);
95 glDeleteTextures(1, &texture); 95 glDeleteTextures(1, &texture);
96 } 96 }
97 } 97 }
98 frames_.clear(); 98 frames_.clear();
99 } 99 }
100 100
101 void Gles2VideoDecodeContext::UploadToVideoFrame( 101 void Gles2VideoDecodeContext::ConvertToVideoFrame(
102 void* buffer, scoped_refptr<media::VideoFrame> frame, Task* task) { 102 void* buffer, scoped_refptr<media::VideoFrame> frame, Task* task) {
103 DCHECK(memory_mapped_); 103 DCHECK(memory_mapped_);
104 // TODO(hclam): Implement. 104 // TODO(hclam): Implement.
105 } 105 }
106 106
107 void Gles2VideoDecodeContext::Destroy(Task* task) { 107 void Gles2VideoDecodeContext::Destroy(Task* task) {
108 if (MessageLoop::current() != message_loop_) { 108 if (MessageLoop::current() != message_loop_) {
109 message_loop_->PostTask( 109 message_loop_->PostTask(
110 FROM_HERE, 110 FROM_HERE,
111 NewRunnableMethod(this, &Gles2VideoDecodeContext::Destroy, task)); 111 NewRunnableMethod(this, &Gles2VideoDecodeContext::Destroy, task));
112 return; 112 return;
113 } 113 }
114 114
115 ReleaseAllVideoFrames(); 115 ReleaseAllVideoFrames();
116 DCHECK_EQ(0u, frames_.size()); 116 DCHECK_EQ(0u, frames_.size());
117 117
118 task->Run(); 118 task->Run();
119 delete task; 119 delete task;
120 } 120 }
121 121
122 DISABLE_RUNNABLE_METHOD_REFCOUNT(Gles2VideoDecodeContext); 122 DISABLE_RUNNABLE_METHOD_REFCOUNT(Gles2VideoDecodeContext);
OLDNEW
« no previous file with comments | « chrome/renderer/media/gles2_video_decode_context.h ('k') | media/video/mft_h264_decode_engine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698