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

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

Issue 284763002: Update AudioRenderer API to fire changes in BufferingState. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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/mock_filters.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 <string> 8 #include <string>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 // TODO(scherkus): Prerolling should be separate from seeking so we can report 302 // TODO(scherkus): Prerolling should be separate from seeking so we can report
303 // finer grained ready states (HAVE_CURRENT_DATA vs. HAVE_FUTURE_DATA) 303 // finer grained ready states (HAVE_CURRENT_DATA vs. HAVE_FUTURE_DATA)
304 // indepentent from seeking. 304 // indepentent from seeking.
305 void DoSeek(base::TimeDelta seek_timestamp, const PipelineStatusCB& done_cb); 305 void DoSeek(base::TimeDelta seek_timestamp, const PipelineStatusCB& done_cb);
306 306
307 // Initiates an asynchronous pause-flush-stop call sequence executing 307 // Initiates an asynchronous pause-flush-stop call sequence executing
308 // |done_cb| when completed. 308 // |done_cb| when completed.
309 void DoStop(const PipelineStatusCB& done_cb); 309 void DoStop(const PipelineStatusCB& done_cb);
310 void OnStopCompleted(PipelineStatus status); 310 void OnStopCompleted(PipelineStatus status);
311 311
312 void OnAudioUnderflow();
313
314 // Collection of callback methods and helpers for tracking changes in 312 // Collection of callback methods and helpers for tracking changes in
315 // buffering state and transition from paused/underflow states and playing 313 // buffering state and transition from paused/underflow states and playing
316 // states. 314 // states.
317 // 315 //
318 // While in the kPlaying state: 316 // While in the kPlaying state:
319 // - A waiting to non-waiting transition indicates preroll has completed 317 // - A waiting to non-waiting transition indicates preroll has completed
320 // and StartPlayback() should be called 318 // and StartPlayback() should be called
321 // - A non-waiting to waiting transition indicates underflow has occurred 319 // - A non-waiting to waiting transition indicates underflow has occurred
322 // and StartWaitingForEnoughData() should be called 320 // and PausePlayback() should be called
323 void BufferingStateChanged(BufferingState* buffering_state, 321 void BufferingStateChanged(BufferingState* buffering_state,
324 BufferingState new_buffering_state); 322 BufferingState new_buffering_state);
325 bool WaitingForEnoughData() const; 323 bool WaitingForEnoughData() const;
326 void StartWaitingForEnoughData(); 324 void PausePlayback();
327 void StartPlayback(); 325 void StartPlayback();
328 326
329 void PauseClockAndStopRendering_Locked(); 327 void PauseClockAndStopRendering_Locked();
330 void StartClockIfWaitingForTimeUpdate_Locked(); 328 void StartClockIfWaitingForTimeUpdate_Locked();
331 329
332 // Task runner used to execute pipeline tasks. 330 // Task runner used to execute pipeline tasks.
333 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 331 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
334 332
335 // MediaLog to which to log events. 333 // MediaLog to which to log events.
336 scoped_refptr<MediaLog> media_log_; 334 scoped_refptr<MediaLog> media_log_;
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 scoped_ptr<SerialRunner> pending_callbacks_; 431 scoped_ptr<SerialRunner> pending_callbacks_;
434 432
435 base::ThreadChecker thread_checker_; 433 base::ThreadChecker thread_checker_;
436 434
437 DISALLOW_COPY_AND_ASSIGN(Pipeline); 435 DISALLOW_COPY_AND_ASSIGN(Pipeline);
438 }; 436 };
439 437
440 } // namespace media 438 } // namespace media
441 439
442 #endif // MEDIA_BASE_PIPELINE_H_ 440 #endif // MEDIA_BASE_PIPELINE_H_
OLDNEW
« no previous file with comments | « media/base/mock_filters.h ('k') | media/base/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698