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

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

Issue 1526303004: Fix buffered range updates in media::Pipeline (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android buildfix Created 4 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
« no previous file with comments | « media/base/mock_demuxer_host.h ('k') | media/base/pipeline.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 void SetState(State next_state); 239 void SetState(State next_state);
240 240
241 static const char* GetStateString(State state); 241 static const char* GetStateString(State state);
242 State GetNextState() const; 242 State GetNextState() const;
243 243
244 // Helper method that runs & resets |seek_cb_| and resets |seek_timestamp_| 244 // Helper method that runs & resets |seek_cb_| and resets |seek_timestamp_|
245 // and |seek_pending_|. 245 // and |seek_pending_|.
246 void FinishSeek(); 246 void FinishSeek();
247 247
248 // DemuxerHost implementaion. 248 // DemuxerHost implementaion.
249 void AddBufferedTimeRange(base::TimeDelta start, 249 void OnBufferedTimeRangesChanged(
250 base::TimeDelta end) override; 250 const Ranges<base::TimeDelta>& ranges) override;
251 void SetDuration(base::TimeDelta duration) override; 251 void SetDuration(base::TimeDelta duration) override;
252 void OnDemuxerError(PipelineStatus error) override; 252 void OnDemuxerError(PipelineStatus error) override;
253 void AddTextStream(DemuxerStream* text_stream, 253 void AddTextStream(DemuxerStream* text_stream,
254 const TextTrackConfig& config) override; 254 const TextTrackConfig& config) override;
255 void RemoveTextStream(DemuxerStream* text_stream) override; 255 void RemoveTextStream(DemuxerStream* text_stream) override;
256 256
257 // Callback executed when a rendering error happened, initiating the teardown 257 // Callback executed when a rendering error happened, initiating the teardown
258 // sequence. 258 // sequence.
259 void OnError(PipelineStatus error); 259 void OnError(PipelineStatus error);
260 260
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 343
344 // Lock used to serialize access for the following data members. 344 // Lock used to serialize access for the following data members.
345 mutable base::Lock lock_; 345 mutable base::Lock lock_;
346 346
347 // Whether or not the pipeline is running. 347 // Whether or not the pipeline is running.
348 bool running_; 348 bool running_;
349 349
350 // Amount of available buffered data as reported by |demuxer_|. 350 // Amount of available buffered data as reported by |demuxer_|.
351 Ranges<base::TimeDelta> buffered_time_ranges_; 351 Ranges<base::TimeDelta> buffered_time_ranges_;
352 352
353 // True when AddBufferedTimeRange() has been called more recently than 353 // True when OnBufferedTimeRangesChanged() has been called more recently than
354 // DidLoadingProgress(). 354 // DidLoadingProgress().
355 bool did_loading_progress_; 355 bool did_loading_progress_;
356 356
357 // Current volume level (from 0.0f to 1.0f). This value is set immediately 357 // Current volume level (from 0.0f to 1.0f). This value is set immediately
358 // via SetVolume() and a task is dispatched on the task runner to notify the 358 // via SetVolume() and a task is dispatched on the task runner to notify the
359 // filters. 359 // filters.
360 float volume_; 360 float volume_;
361 361
362 // Current playback rate (>= 0.0). This value is set immediately via 362 // Current playback rate (>= 0.0). This value is set immediately via
363 // SetPlaybackRate() and a task is dispatched on the task runner to notify 363 // SetPlaybackRate() and a task is dispatched on the task runner to notify
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 430
431 // NOTE: Weak pointers must be invalidated before all other member variables. 431 // NOTE: Weak pointers must be invalidated before all other member variables.
432 base::WeakPtrFactory<Pipeline> weak_factory_; 432 base::WeakPtrFactory<Pipeline> weak_factory_;
433 433
434 DISALLOW_COPY_AND_ASSIGN(Pipeline); 434 DISALLOW_COPY_AND_ASSIGN(Pipeline);
435 }; 435 };
436 436
437 } // namespace media 437 } // namespace media
438 438
439 #endif // MEDIA_BASE_PIPELINE_H_ 439 #endif // MEDIA_BASE_PIPELINE_H_
OLDNEW
« no previous file with comments | « media/base/mock_demuxer_host.h ('k') | media/base/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698