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

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

Issue 5624002: Move more code from headers to implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 10 years 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 // TODO(scherkus): clean up PipelineImpl... too many crazy function names, 5 // TODO(scherkus): clean up PipelineImpl... too many crazy function names,
6 // potential deadlocks, etc... 6 // potential deadlocks, etc...
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/condition_variable.h" 10 #include "base/condition_variable.h"
11 #include "base/stl_util-inl.h" 11 #include "base/stl_util-inl.h"
12 #include "media/base/clock_impl.h" 12 #include "media/base/clock_impl.h"
13 #include "media/base/filter_collection.h" 13 #include "media/base/filter_collection.h"
14 #include "media/base/media_format.h" 14 #include "media/base/media_format.h"
15 #include "media/base/pipeline_impl.h" 15 #include "media/base/pipeline_impl.h"
16 16
17 namespace media { 17 namespace media {
18 18
19 class PipelineImpl::PipelineInitState {
20 public:
21 scoped_refptr<DataSource> data_source_;
22 scoped_refptr<Demuxer> demuxer_;
23 scoped_refptr<AudioDecoder> audio_decoder_;
24 scoped_refptr<VideoDecoder> video_decoder_;
25 };
26
19 PipelineImpl::PipelineImpl(MessageLoop* message_loop) 27 PipelineImpl::PipelineImpl(MessageLoop* message_loop)
20 : message_loop_(message_loop), 28 : message_loop_(message_loop),
21 clock_(new ClockImpl(&base::Time::Now)), 29 clock_(new ClockImpl(&base::Time::Now)),
22 waiting_for_clock_update_(false), 30 waiting_for_clock_update_(false),
23 state_(kCreated), 31 state_(kCreated),
24 remaining_transitions_(0), 32 remaining_transitions_(0),
25 current_bytes_(0) { 33 current_bytes_(0) {
26 ResetState(); 34 ResetState();
27 } 35 }
28 36
(...skipping 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after
1153 this, &PipelineImpl::OnFilterStateTransition)); 1161 this, &PipelineImpl::OnFilterStateTransition));
1154 } 1162 }
1155 } else { 1163 } else {
1156 state_ = kStopped; 1164 state_ = kStopped;
1157 message_loop_->PostTask(FROM_HERE, 1165 message_loop_->PostTask(FROM_HERE,
1158 NewRunnableMethod(this, &PipelineImpl::FinishDestroyingFiltersTask)); 1166 NewRunnableMethod(this, &PipelineImpl::FinishDestroyingFiltersTask));
1159 } 1167 }
1160 } 1168 }
1161 1169
1162 } // namespace media 1170 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698