Chromium Code Reviews| Index: services/media/audio/audio_pipe.cc |
| diff --git a/services/media/audio/audio_pipe.cc b/services/media/audio/audio_pipe.cc |
| index 66ae598186e341de769259f40c5c5618f7d25284..eba55cd3a2b7e30a1bd0721e09b3f81264bb2322 100644 |
| --- a/services/media/audio/audio_pipe.cc |
| +++ b/services/media/audio/audio_pipe.cc |
| @@ -131,6 +131,22 @@ void AudioPipe::OnPacketReceived(MediaPacketStatePtr state) { |
| std::move(regions), |
| start_pts, |
| next_pts_))); |
| + |
| + if (!prime_callback_.is_null()) { |
| + // Prime was requested. Call the callback to indicate priming is complete. |
| + // TODO(dalesat): Don't do this until low water mark is reached. |
|
kulakowski
2016/03/28 20:46:12
For my edification: What is priming? What is a "lo
dalesat
2016/03/28 22:19:56
Priming is getting some initial packets of content
kulakowski
2016/03/30 20:44:55
Gotcha. Couple more questions.
How is seeking dif
dalesat
2016/03/30 21:04:14
Content is typically authored such that the first
kulakowski
2016/03/31 21:32:12
It really does not seem to me that this is a singl
dalesat
2016/03/31 21:45:14
Sure. Is this a concern for this CL?
kulakowski
2016/03/31 22:43:34
Well if you have a TODO about it in the implementa
|
| + prime_callback_.Run(); |
| + prime_callback_.reset(); |
| + } |
| +} |
| + |
| +void AudioPipe::OnPrimeRequested(const PrimeCallback& cbk) { |
| + if (!prime_callback_.is_null()) { |
| + // Prime was already requested. Complete the old one and warn. |
| + LOG(WARNING) << "multiple prime requests received"; |
| + prime_callback_.Run(); |
| + } |
| + prime_callback_ = cbk; |
| } |
| bool AudioPipe::OnFlushRequested(const FlushCallback& cbk) { |