OLD | NEW |
---|---|
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 #ifndef MEDIA_BASE_PIPELINE_H_ | 5 #ifndef MEDIA_BASE_PIPELINE_H_ |
6 #define MEDIA_BASE_PIPELINE_H_ | 6 #define MEDIA_BASE_PIPELINE_H_ |
7 | 7 |
8 #include "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
238 void SetState(State next_state); | 238 void SetState(State next_state); |
239 | 239 |
240 static const char* GetStateString(State state); | 240 static const char* GetStateString(State state); |
241 State GetNextState() const; | 241 State GetNextState() const; |
242 | 242 |
243 // Helper method that runs & resets |seek_cb_| and resets |seek_timestamp_| | 243 // Helper method that runs & resets |seek_cb_| and resets |seek_timestamp_| |
244 // and |seek_pending_|. | 244 // and |seek_pending_|. |
245 void FinishSeek(); | 245 void FinishSeek(); |
246 | 246 |
247 // DemuxerHost implementaion. | 247 // DemuxerHost implementaion. |
248 void AddBufferedTimeRange(base::TimeDelta start, | 248 void OnBufferedTimeRangesChanged( |
249 base::TimeDelta end) override; | 249 const Ranges<base::TimeDelta>& ranges) override; |
250 void SetDuration(base::TimeDelta duration) override; | 250 void SetDuration(base::TimeDelta duration) override; |
251 void OnDemuxerError(PipelineStatus error) override; | 251 void OnDemuxerError(PipelineStatus error) override; |
252 void AddTextStream(DemuxerStream* text_stream, | 252 void AddTextStream(DemuxerStream* text_stream, |
253 const TextTrackConfig& config) override; | 253 const TextTrackConfig& config) override; |
254 void RemoveTextStream(DemuxerStream* text_stream) override; | 254 void RemoveTextStream(DemuxerStream* text_stream) override; |
255 | 255 |
256 // Callback executed when a rendering error happened, initiating the teardown | 256 // Callback executed when a rendering error happened, initiating the teardown |
257 // sequence. | 257 // sequence. |
258 void OnError(PipelineStatus error); | 258 void OnError(PipelineStatus error); |
259 | 259 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
342 | 342 |
343 // Lock used to serialize access for the following data members. | 343 // Lock used to serialize access for the following data members. |
344 mutable base::Lock lock_; | 344 mutable base::Lock lock_; |
345 | 345 |
346 // Whether or not the pipeline is running. | 346 // Whether or not the pipeline is running. |
347 bool running_; | 347 bool running_; |
348 | 348 |
349 // Amount of available buffered data as reported by |demuxer_|. | 349 // Amount of available buffered data as reported by |demuxer_|. |
350 Ranges<base::TimeDelta> buffered_time_ranges_; | 350 Ranges<base::TimeDelta> buffered_time_ranges_; |
351 | 351 |
352 // True when AddBufferedTimeRange() has been called more recently than | 352 // True when OnBufferedTimeRangesChanged() has been called more recently than |
353 // DidLoadingProgress(). | 353 // DidLoadingProgress(). |
wolenetz
2016/01/06 19:28:41
I'm not sure this has the same semantic meaning. I
servolk
2016/01/06 21:05:05
I assumed that the HTMLMediaElement 'progress' eve
wolenetz
2016/01/14 19:25:53
Hmm. The spec also is more clear about when 'progr
| |
354 bool did_loading_progress_; | 354 bool did_loading_progress_; |
355 | 355 |
356 // Current volume level (from 0.0f to 1.0f). This value is set immediately | 356 // Current volume level (from 0.0f to 1.0f). This value is set immediately |
357 // via SetVolume() and a task is dispatched on the task runner to notify the | 357 // via SetVolume() and a task is dispatched on the task runner to notify the |
358 // filters. | 358 // filters. |
359 float volume_; | 359 float volume_; |
360 | 360 |
361 // Current playback rate (>= 0.0). This value is set immediately via | 361 // Current playback rate (>= 0.0). This value is set immediately via |
362 // SetPlaybackRate() and a task is dispatched on the task runner to notify | 362 // SetPlaybackRate() and a task is dispatched on the task runner to notify |
363 // the filters. | 363 // the filters. |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
429 | 429 |
430 // NOTE: Weak pointers must be invalidated before all other member variables. | 430 // NOTE: Weak pointers must be invalidated before all other member variables. |
431 base::WeakPtrFactory<Pipeline> weak_factory_; | 431 base::WeakPtrFactory<Pipeline> weak_factory_; |
432 | 432 |
433 DISALLOW_COPY_AND_ASSIGN(Pipeline); | 433 DISALLOW_COPY_AND_ASSIGN(Pipeline); |
434 }; | 434 }; |
435 | 435 |
436 } // namespace media | 436 } // namespace media |
437 | 437 |
438 #endif // MEDIA_BASE_PIPELINE_H_ | 438 #endif // MEDIA_BASE_PIPELINE_H_ |
OLD | NEW |