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

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

Issue 165163: Merge 21882 - Implemented a proper clock for audio/video synchronization.... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/src/
Patch Set: Created 11 years, 4 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 | « media/base/clock_impl_unittest.cc ('k') | media/base/pipeline_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Modified: svn:mergeinfo
Merged /trunk/src/media/base/pipeline_impl.h:r21882
OLDNEW
1 // Copyright (c) 2008-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008-2009 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. 5 // Implementation of Pipeline.
6 6
7 #ifndef MEDIA_BASE_PIPELINE_IMPL_H_ 7 #ifndef MEDIA_BASE_PIPELINE_IMPL_H_
8 #define MEDIA_BASE_PIPELINE_IMPL_H_ 8 #define MEDIA_BASE_PIPELINE_IMPL_H_
9 9
10 #include <map> 10 #include <map>
11 #include <set> 11 #include <set>
12 #include <string> 12 #include <string>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/message_loop.h" 15 #include "base/message_loop.h"
16 #include "base/ref_counted.h" 16 #include "base/ref_counted.h"
17 #include "base/thread.h" 17 #include "base/thread.h"
18 #include "base/time.h" 18 #include "base/time.h"
19 #include "media/base/clock_impl.h"
19 #include "media/base/filter_host.h" 20 #include "media/base/filter_host.h"
20 #include "media/base/pipeline.h" 21 #include "media/base/pipeline.h"
21 22
22 namespace media { 23 namespace media {
23 24
24 25
25 // PipelineImpl runs the media pipeline. Filters are created and called on the 26 // PipelineImpl runs the media pipeline. Filters are created and called on the
26 // message loop injected into this object. PipelineImpl works like a state 27 // message loop injected into this object. PipelineImpl works like a state
27 // machine to perform asynchronous initialization, pausing, seeking and playing. 28 // machine to perform asynchronous initialization, pausing, seeking and playing.
28 // 29 //
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 // Current volume level (from 0.0f to 1.0f). This value is set immediately 276 // Current volume level (from 0.0f to 1.0f). This value is set immediately
276 // via SetVolume() and a task is dispatched on the message loop to notify the 277 // via SetVolume() and a task is dispatched on the message loop to notify the
277 // filters. 278 // filters.
278 float volume_; 279 float volume_;
279 280
280 // Current playback rate (>= 0.0f). This value is set immediately via 281 // Current playback rate (>= 0.0f). This value is set immediately via
281 // SetPlaybackRate() and a task is dispatched on the message loop to notify 282 // SetPlaybackRate() and a task is dispatched on the message loop to notify
282 // the filters. 283 // the filters.
283 float playback_rate_; 284 float playback_rate_;
284 285
285 // Current playback time. Set by filters. 286 // Reference clock. Keeps track of current playback time. Uses system
286 base::TimeDelta time_; 287 // clock and linear interpolation, but can have its time manually set
288 // by filters.
289 ClockImpl clock_;
287 290
288 // Status of the pipeline. Initialized to PIPELINE_OK which indicates that 291 // Status of the pipeline. Initialized to PIPELINE_OK which indicates that
289 // the pipeline is operating correctly. Any other value indicates that the 292 // the pipeline is operating correctly. Any other value indicates that the
290 // pipeline is stopped or is stopping. Clients can call the Stop() method to 293 // pipeline is stopped or is stopping. Clients can call the Stop() method to
291 // reset the pipeline state, and restore this to PIPELINE_OK. 294 // reset the pipeline state, and restore this to PIPELINE_OK.
292 PipelineError error_; 295 PipelineError error_;
293 296
294 // Vector of major mime types that have been rendered by this pipeline. 297 // Vector of major mime types that have been rendered by this pipeline.
295 typedef std::set<std::string> RenderedMimeTypesSet; 298 typedef std::set<std::string> RenderedMimeTypesSet;
296 RenderedMimeTypesSet rendered_mime_types_; 299 RenderedMimeTypesSet rendered_mime_types_;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 // Vector of threads owned by the pipeline and being used by filters. 336 // Vector of threads owned by the pipeline and being used by filters.
334 typedef std::vector<base::Thread*> FilterThreadVector; 337 typedef std::vector<base::Thread*> FilterThreadVector;
335 FilterThreadVector filter_threads_; 338 FilterThreadVector filter_threads_;
336 339
337 DISALLOW_COPY_AND_ASSIGN(PipelineImpl); 340 DISALLOW_COPY_AND_ASSIGN(PipelineImpl);
338 }; 341 };
339 342
340 } // namespace media 343 } // namespace media
341 344
342 #endif // MEDIA_BASE_PIPELINE_IMPL_H_ 345 #endif // MEDIA_BASE_PIPELINE_IMPL_H_
OLDNEW
« no previous file with comments | « media/base/clock_impl_unittest.cc ('k') | media/base/pipeline_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698