| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 SERVICES_MEDIA_AUDIO_AUDIO_PIPE_H_ | 5 #ifndef SERVICES_MEDIA_AUDIO_AUDIO_PIPE_H_ |
| 6 #define SERVICES_MEDIA_AUDIO_AUDIO_PIPE_H_ | 6 #define SERVICES_MEDIA_AUDIO_AUDIO_PIPE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 std::vector<Region> regions_; | 74 std::vector<Region> regions_; |
| 75 int64_t start_pts_; | 75 int64_t start_pts_; |
| 76 int64_t end_pts_; | 76 int64_t end_pts_; |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 AudioPipe(AudioTrackImpl* owner, AudioServerImpl* server); | 79 AudioPipe(AudioTrackImpl* owner, AudioServerImpl* server); |
| 80 ~AudioPipe() override; | 80 ~AudioPipe() override; |
| 81 | 81 |
| 82 protected: | 82 protected: |
| 83 void OnPacketReceived(MediaPacketStatePtr state) override; | 83 void OnPacketReceived(MediaPacketStatePtr state) override; |
| 84 void OnPrimeRequested(const PrimeCallback& cbk) override; |
| 84 bool OnFlushRequested(const FlushCallback& cbk) override; | 85 bool OnFlushRequested(const FlushCallback& cbk) override; |
| 85 | 86 |
| 86 private: | 87 private: |
| 87 AudioTrackImpl* owner_; | 88 AudioTrackImpl* owner_; |
| 88 AudioServerImpl* server_; | 89 AudioServerImpl* server_; |
| 89 | 90 |
| 90 // State used for timestamp interpolation | 91 // State used for timestamp interpolation |
| 91 bool next_pts_known_ = 0; | 92 bool next_pts_known_ = 0; |
| 92 int64_t next_pts_; | 93 int64_t next_pts_; |
| 94 |
| 95 PrimeCallback prime_callback_; |
| 93 }; | 96 }; |
| 94 | 97 |
| 95 } // namespace audio | 98 } // namespace audio |
| 96 } // namespace media | 99 } // namespace media |
| 97 } // namespace mojo | 100 } // namespace mojo |
| 98 | 101 |
| 99 #endif // SERVICES_MEDIA_AUDIO_AUDIO_PIPE_H_ | 102 #endif // SERVICES_MEDIA_AUDIO_AUDIO_PIPE_H_ |
| OLD | NEW |