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

Side by Side Diff: content/renderer/media/capture_video_decoder.cc

Issue 8036005: Add a flag in StopCapture to allow event handler to choose event notification. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: add missing file Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/renderer/media/video_capture_impl.h » ('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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/media/capture_video_decoder.h" 5 #include "content/renderer/media/capture_video_decoder.h"
6 6
7 #include "content/renderer/media/video_capture_impl_manager.h" 7 #include "content/renderer/media/video_capture_impl_manager.h"
8 #include "media/base/filter_host.h" 8 #include "media/base/filter_host.h"
9 #include "media/base/limits.h" 9 #include "media/base/limits.h"
10 #include "media/base/video_util.h" 10 #include "media/base/video_util.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 DCHECK(message_loop_proxy_->BelongsToCurrentThread()); 163 DCHECK(message_loop_proxy_->BelongsToCurrentThread());
164 state_ = kPaused; 164 state_ = kPaused;
165 media::VideoDecoder::Pause(callback); 165 media::VideoDecoder::Pause(callback);
166 } 166 }
167 167
168 void CaptureVideoDecoder::StopOnDecoderThread(media::FilterCallback* callback) { 168 void CaptureVideoDecoder::StopOnDecoderThread(media::FilterCallback* callback) {
169 VLOG(1) << "StopOnDecoderThread."; 169 VLOG(1) << "StopOnDecoderThread.";
170 DCHECK(message_loop_proxy_->BelongsToCurrentThread()); 170 DCHECK(message_loop_proxy_->BelongsToCurrentThread());
171 pending_stop_cb_ = callback; 171 pending_stop_cb_ = callback;
172 state_ = kStopped; 172 state_ = kStopped;
173 capture_engine_->StopCapture(this); 173 capture_engine_->StopCapture(this, true);
174 } 174 }
175 175
176 void CaptureVideoDecoder::SeekOnDecoderThread(base::TimeDelta time, 176 void CaptureVideoDecoder::SeekOnDecoderThread(base::TimeDelta time,
177 const media::FilterStatusCB& cb) { 177 const media::FilterStatusCB& cb) {
178 VLOG(1) << "SeekOnDecoderThread."; 178 VLOG(1) << "SeekOnDecoderThread.";
179 DCHECK(message_loop_proxy_->BelongsToCurrentThread()); 179 DCHECK(message_loop_proxy_->BelongsToCurrentThread());
180 180
181 state_ = kSeeking; 181 state_ = kSeeking;
182 // Create output buffer pool and pass the frames to renderer 182 // Create output buffer pool and pass the frames to renderer
183 // so that the renderer can complete the seeking 183 // so that the renderer can complete the seeking
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 int uv_height = capability_.height / 2; // YV12 format. 248 int uv_height = capability_.height / 2; // YV12 format.
249 CopyYPlane(buffer, y_width, y_height, video_frame); 249 CopyYPlane(buffer, y_width, y_height, video_frame);
250 buffer += y_width * y_height; 250 buffer += y_width * y_height;
251 CopyUPlane(buffer, uv_width, uv_height, video_frame); 251 CopyUPlane(buffer, uv_width, uv_height, video_frame);
252 buffer += uv_width * uv_height; 252 buffer += uv_width * uv_height;
253 CopyVPlane(buffer, uv_width, uv_height, video_frame); 253 CopyVPlane(buffer, uv_width, uv_height, video_frame);
254 254
255 VideoFrameReady(video_frame); 255 VideoFrameReady(video_frame);
256 capture->FeedBuffer(buf); 256 capture->FeedBuffer(buf);
257 } 257 }
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/video_capture_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698