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

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

Issue 10248002: Report VideoDecoder status through ReadCB instead of through FilterHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename VideoDecoder::Status to VideoDecoder::DecoderStatus since Status has been polluted by Xlib.h. Created 8 years, 8 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/capture_video_decoder_unittest.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "content/renderer/media/video_capture_impl_manager.h" 9 #include "content/renderer/media/video_capture_impl_manager.h"
10 #include "media/base/filter_host.h" 10 #include "media/base/filter_host.h"
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 buffer += uv_width * uv_height; 272 buffer += uv_width * uv_height;
273 CopyVPlane(buffer, uv_width, uv_height, video_frame); 273 CopyVPlane(buffer, uv_width, uv_height, video_frame);
274 274
275 DeliverFrame(video_frame); 275 DeliverFrame(video_frame);
276 capture->FeedBuffer(buf); 276 capture->FeedBuffer(buf);
277 } 277 }
278 278
279 void CaptureVideoDecoder::DeliverFrame( 279 void CaptureVideoDecoder::DeliverFrame(
280 const scoped_refptr<media::VideoFrame>& video_frame) { 280 const scoped_refptr<media::VideoFrame>& video_frame) {
281 // Reset the callback before running to protect against reentrancy. 281 // Reset the callback before running to protect against reentrancy.
282 ReadCB read_cb = read_cb_; 282 base::ResetAndReturn(&read_cb_).Run(kOk, video_frame);
283 read_cb_.Reset();
284 read_cb.Run(video_frame);
285 } 283 }
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/capture_video_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698