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

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

Issue 6625059: Implementing preload=metadata for video (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup defer strategy, fix logic bug Created 9 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) 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 // The pipeline is the public API clients use for playing back media. Clients 5 // The pipeline is the public API clients use for playing back media. Clients
6 // provide a filter collection containing the filters they want the pipeline to 6 // provide a filter collection containing the filters they want the pipeline to
7 // use to render media. 7 // use to render media.
8 8
9 #ifndef MEDIA_BASE_PIPELINE_H_ 9 #ifndef MEDIA_BASE_PIPELINE_H_
10 #define MEDIA_BASE_PIPELINE_H_ 10 #define MEDIA_BASE_PIPELINE_H_
11 11
12 #include <string> 12 #include <string>
13 13
14 #include "base/callback.h" 14 #include "base/callback.h"
15 #include "media/base/filters.h"
acolwell GONE FROM CHROMIUM 2011/03/25 04:35:28 It is unfortunate that we have to expose filters.h
vrk (LEFT CHROMIUM) 2011/03/25 21:33:32 OK! For now I've kept it in the same place, but ye
15 #include "media/base/pipeline_status.h" 16 #include "media/base/pipeline_status.h"
16 17
17 namespace base { 18 namespace base {
18 class TimeDelta; 19 class TimeDelta;
19 } 20 }
20 21
21 namespace media { 22 namespace media {
22 23
23 struct PipelineStatistics { 24 struct PipelineStatistics {
24 PipelineStatistics() : 25 PipelineStatistics() :
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 // Gets the current volume setting being used by the audio renderer. When 118 // Gets the current volume setting being used by the audio renderer. When
118 // the pipeline is started, this value will be 1.0f. Valid values range 119 // the pipeline is started, this value will be 1.0f. Valid values range
119 // from 0.0f to 1.0f. 120 // from 0.0f to 1.0f.
120 virtual float GetVolume() const = 0; 121 virtual float GetVolume() const = 0;
121 122
122 // Attempt to set the volume of the audio renderer. Valid values for volume 123 // Attempt to set the volume of the audio renderer. Valid values for volume
123 // range from 0.0f (muted) to 1.0f (full volume). This value affects all 124 // range from 0.0f (muted) to 1.0f (full volume). This value affects all
124 // channels proportionately for multi-channel audio streams. 125 // channels proportionately for multi-channel audio streams.
125 virtual void SetVolume(float volume) = 0; 126 virtual void SetVolume(float volume) = 0;
126 127
128 // Set the preload value for the pipeline.
129 virtual void SetPreload(Preload preload) = 0;
130
127 // Gets the current pipeline time. For a pipeline "time" progresses from 0 to 131 // Gets the current pipeline time. For a pipeline "time" progresses from 0 to
128 // the end of the media. 132 // the end of the media.
129 virtual base::TimeDelta GetCurrentTime() const = 0; 133 virtual base::TimeDelta GetCurrentTime() const = 0;
130 134
131 // Get the approximate amount of playable data buffered so far in micro- 135 // Get the approximate amount of playable data buffered so far in micro-
132 // seconds. 136 // seconds.
133 virtual base::TimeDelta GetBufferedTime() = 0; 137 virtual base::TimeDelta GetBufferedTime() = 0;
134 138
135 // Get the duration of the media in microseconds. If the duration has not 139 // Get the duration of the media in microseconds. If the duration has not
136 // been determined yet, then returns 0. 140 // been determined yet, then returns 0.
(...skipping 24 matching lines...) Expand all
161 165
162 protected: 166 protected:
163 // Only allow ourselves to be deleted by reference counting. 167 // Only allow ourselves to be deleted by reference counting.
164 friend class base::RefCountedThreadSafe<Pipeline>; 168 friend class base::RefCountedThreadSafe<Pipeline>;
165 virtual ~Pipeline() {} 169 virtual ~Pipeline() {}
166 }; 170 };
167 171
168 } // namespace media 172 } // namespace media
169 173
170 #endif // MEDIA_BASE_PIPELINE_H_ 174 #endif // MEDIA_BASE_PIPELINE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698