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

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

Issue 9015015: Take advantage of the new Pass() machinery on scoped_ptr{,_malloc}. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove the dependency on CL 8968032 and point TODOs at the newly-filed bug. Created 8 years, 11 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) 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 // Implementation of Pipeline & PipelineStatusNotification (an async-to-sync 5 // Implementation of Pipeline & PipelineStatusNotification (an async-to-sync
6 // callback adapter). 6 // callback adapter).
7 7
8 #ifndef MEDIA_BASE_PIPELINE_IMPL_H_ 8 #ifndef MEDIA_BASE_PIPELINE_IMPL_H_
9 #define MEDIA_BASE_PIPELINE_IMPL_H_ 9 #define MEDIA_BASE_PIPELINE_IMPL_H_
10 10
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 : public Pipeline, 100 : public Pipeline,
101 public FilterHost, 101 public FilterHost,
102 public DemuxerHost { 102 public DemuxerHost {
103 public: 103 public:
104 explicit PipelineImpl(MessageLoop* message_loop, MediaLog* media_log); 104 explicit PipelineImpl(MessageLoop* message_loop, MediaLog* media_log);
105 105
106 // Pipeline implementation. 106 // Pipeline implementation.
107 virtual void Init(const PipelineStatusCB& ended_callback, 107 virtual void Init(const PipelineStatusCB& ended_callback,
108 const PipelineStatusCB& error_callback, 108 const PipelineStatusCB& error_callback,
109 const NetworkEventCB& network_callback) OVERRIDE; 109 const NetworkEventCB& network_callback) OVERRIDE;
110 virtual bool Start(FilterCollection* filter_collection, 110 virtual bool Start(scoped_ptr<FilterCollection> filter_collection,
111 const std::string& uri, 111 const std::string& uri,
112 const PipelineStatusCB& start_callback) OVERRIDE; 112 const PipelineStatusCB& start_callback) OVERRIDE;
113 virtual void Stop(const PipelineStatusCB& stop_callback) OVERRIDE; 113 virtual void Stop(const PipelineStatusCB& stop_callback) OVERRIDE;
114 virtual void Seek(base::TimeDelta time, 114 virtual void Seek(base::TimeDelta time,
115 const PipelineStatusCB& seek_callback) OVERRIDE; 115 const PipelineStatusCB& seek_callback) OVERRIDE;
116 virtual bool IsRunning() const OVERRIDE; 116 virtual bool IsRunning() const OVERRIDE;
117 virtual bool IsInitialized() const OVERRIDE; 117 virtual bool IsInitialized() const OVERRIDE;
118 virtual bool HasAudio() const OVERRIDE; 118 virtual bool HasAudio() const OVERRIDE;
119 virtual bool HasVideo() const OVERRIDE; 119 virtual bool HasVideo() const OVERRIDE;
120 virtual float GetPlaybackRate() const OVERRIDE; 120 virtual float GetPlaybackRate() const OVERRIDE;
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 224
225 // Callback executed by filters when completing teardown operations. 225 // Callback executed by filters when completing teardown operations.
226 void OnTeardownStateTransition(); 226 void OnTeardownStateTransition();
227 227
228 // Callback executed by filters to update statistics. 228 // Callback executed by filters to update statistics.
229 void OnUpdateStatistics(const PipelineStatistics& stats); 229 void OnUpdateStatistics(const PipelineStatistics& stats);
230 230
231 // The following "task" methods correspond to the public methods, but these 231 // The following "task" methods correspond to the public methods, but these
232 // methods are run as the result of posting a task to the PipelineInternal's 232 // methods are run as the result of posting a task to the PipelineInternal's
233 // message loop. 233 // message loop.
234 void StartTask(FilterCollection* filter_collection, 234 void StartTask(scoped_ptr<FilterCollection> filter_collection,
235 const std::string& url, 235 const std::string& url,
236 const PipelineStatusCB& start_callback); 236 const PipelineStatusCB& start_callback);
237 237
238 // InitializeTask() performs initialization in multiple passes. It is executed 238 // InitializeTask() performs initialization in multiple passes. It is executed
239 // as a result of calling Start() or InitializationComplete() that advances 239 // as a result of calling Start() or InitializationComplete() that advances
240 // initialization to the next state. It works as a hub of state transition for 240 // initialization to the next state. It works as a hub of state transition for
241 // initialization. One stage communicates its status to the next through 241 // initialization. One stage communicates its status to the next through
242 // |last_stage_status|. 242 // |last_stage_status|.
243 void InitializeTask(PipelineStatus last_stage_status); 243 void InitializeTask(PipelineStatus last_stage_status);
244 244
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 bool is_downloading_data_; 501 bool is_downloading_data_;
502 502
503 FRIEND_TEST_ALL_PREFIXES(PipelineImplTest, GetBufferedTime); 503 FRIEND_TEST_ALL_PREFIXES(PipelineImplTest, GetBufferedTime);
504 504
505 DISALLOW_COPY_AND_ASSIGN(PipelineImpl); 505 DISALLOW_COPY_AND_ASSIGN(PipelineImpl);
506 }; 506 };
507 507
508 } // namespace media 508 } // namespace media
509 509
510 #endif // MEDIA_BASE_PIPELINE_IMPL_H_ 510 #endif // MEDIA_BASE_PIPELINE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698