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

Side by Side Diff: chrome/renderer/media/ipc_video_renderer.cc

Issue 3834003: On Windows, create a new TransportDIB::Handle struct which includes the file (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Rebase Created 10 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
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 "chrome/renderer/media/ipc_video_renderer.h" 5 #include "chrome/renderer/media/ipc_video_renderer.h"
6 6
7 #include "chrome/common/render_messages.h" 7 #include "chrome/common/render_messages.h"
8 #include "chrome/renderer/render_thread.h" 8 #include "chrome/renderer/render_thread.h"
9 #include "media/base/video_frame.h" 9 #include "media/base/video_frame.h"
10 #include "media/base/media_format.h" 10 #include "media/base/media_format.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 153
154 PutCurrentFrame(frame); 154 PutCurrentFrame(frame);
155 155
156 // Sanity check! 156 // Sanity check!
157 uint8* expected = reinterpret_cast<uint8*>(transport_dib_->memory()) + 157 uint8* expected = reinterpret_cast<uint8*>(transport_dib_->memory()) +
158 transport_dib_->size(); 158 transport_dib_->size();
159 CHECK(dest == expected); 159 CHECK(dest == expected);
160 160
161 Send(new ViewHostMsg_UpdateVideo(routing_id_, 161 Send(new ViewHostMsg_UpdateVideo(routing_id_,
162 transport_dib_->id(), 162 transport_dib_->id(),
163 transport_dib_->handle(),
163 video_rect_)); 164 video_rect_));
164 } 165 }
165 166
166 void IPCVideoRenderer::DoDestroyVideo(media::FilterCallback* callback) { 167 void IPCVideoRenderer::DoDestroyVideo(media::FilterCallback* callback) {
167 DCHECK(MessageLoop::current() == proxy_->message_loop()); 168 DCHECK(MessageLoop::current() == proxy_->message_loop());
168 169
169 // We shouldn't receive any more messages after the browser receives this. 170 // We shouldn't receive any more messages after the browser receives this.
170 Send(new ViewHostMsg_DestroyVideo(routing_id_)); 171 Send(new ViewHostMsg_DestroyVideo(routing_id_));
171 172
172 // Detach ourselves from the proxy. 173 // Detach ourselves from the proxy.
173 proxy_->SetVideoRenderer(NULL); 174 proxy_->SetVideoRenderer(NULL);
174 proxy_ = NULL; 175 proxy_ = NULL;
175 if (callback) { 176 if (callback) {
176 callback->Run(); 177 callback->Run();
177 delete callback; 178 delete callback;
178 } 179 }
179 } 180 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698