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

Side by Side Diff: media/base/filters.cc

Issue 9718013: Merge FilterStatusCB into PipelineStatusCB. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Keep ResetAndRunCB in filters.h. Created 8 years, 9 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
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 "media/base/filters.h" 5 #include "media/base/filters.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace media { 9 namespace media {
10 10
11 void ResetAndRunCB(FilterStatusCB* cb, PipelineStatus status) { 11 void ResetAndRunCB(PipelineStatusCB* cb, PipelineStatus status) {
12 DCHECK(!cb->is_null()); 12 DCHECK(!cb->is_null());
13 FilterStatusCB tmp_cb(*cb); 13 PipelineStatusCB tmp_cb(*cb);
14 cb->Reset(); 14 cb->Reset();
15 tmp_cb.Run(status); 15 tmp_cb.Run(status);
16 } 16 }
17 17
18 void ResetAndRunCB(base::Closure* cb) { 18 void ResetAndRunCB(base::Closure* cb) {
19 DCHECK(!cb->is_null()); 19 DCHECK(!cb->is_null());
20 base::Closure tmp_cb(*cb); 20 base::Closure tmp_cb(*cb);
21 cb->Reset(); 21 cb->Reset();
22 tmp_cb.Run(); 22 tmp_cb.Run();
23 } 23 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 callback.Run(); 56 callback.Run();
57 } 57 }
58 58
59 void Filter::Stop(const base::Closure& callback) { 59 void Filter::Stop(const base::Closure& callback) {
60 DCHECK(!callback.is_null()); 60 DCHECK(!callback.is_null());
61 callback.Run(); 61 callback.Run();
62 } 62 }
63 63
64 void Filter::SetPlaybackRate(float playback_rate) {} 64 void Filter::SetPlaybackRate(float playback_rate) {}
65 65
66 void Filter::Seek(base::TimeDelta time, const FilterStatusCB& callback) { 66 void Filter::Seek(base::TimeDelta time, const PipelineStatusCB& callback) {
67 DCHECK(!callback.is_null()); 67 DCHECK(!callback.is_null());
68 callback.Run(PIPELINE_OK); 68 callback.Run(PIPELINE_OK);
69 } 69 }
70 70
71 void Filter::OnAudioRendererDisabled() { 71 void Filter::OnAudioRendererDisabled() {
72 } 72 }
73 73
74 VideoDecoder::VideoDecoder() {} 74 VideoDecoder::VideoDecoder() {}
75 75
76 VideoDecoder::~VideoDecoder() {} 76 VideoDecoder::~VideoDecoder() {}
77 77
78 bool VideoDecoder::HasAlpha() const { 78 bool VideoDecoder::HasAlpha() const {
79 return false; 79 return false;
80 } 80 }
81 81
82 void VideoDecoder::PrepareForShutdownHack() {} 82 void VideoDecoder::PrepareForShutdownHack() {}
83 83
84 } // namespace media 84 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698