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

Side by Side Diff: services/media/audio/audio_pipe.h

Issue 1836953002: Motown: Delay audio track completion of Prime requests until a packet arrives. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | services/media/audio/audio_pipe.cc » ('j') | services/media/audio/audio_pipe.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « no previous file | services/media/audio/audio_pipe.cc » ('j') | services/media/audio/audio_pipe.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698