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

Side by Side Diff: media/blink/multibuffer_reader.h

Issue 1509663003: make multibuffer work with layout tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@media_cache.integrate3
Patch Set: merged & formatted Created 5 years 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/blink/multibuffer_data_source_unittest.cc ('k') | media/blink/multibuffer_reader.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 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 MEDIA_BLINK_MULTIBUFFER_READER_H_ 5 #ifndef MEDIA_BLINK_MULTIBUFFER_READER_H_
6 #define MEDIA_BLINK_MULTIBUFFER_READER_H_ 6 #define MEDIA_BLINK_MULTIBUFFER_READER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <limits> 10 #include <limits>
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 // Check if wait operation can complete now. 104 // Check if wait operation can complete now.
105 void CheckWait(); 105 void CheckWait();
106 106
107 // Recalculate preload_pos_ and update our entry in the multibuffer 107 // Recalculate preload_pos_ and update our entry in the multibuffer
108 // reader index. Also call CheckWait(). This function is basically 108 // reader index. Also call CheckWait(). This function is basically
109 // called anything changes, like when we get more data or seek to 109 // called anything changes, like when we get more data or seek to
110 // a new position. 110 // a new position.
111 void UpdateInternalState(); 111 void UpdateInternalState();
112 112
113 // Update end_ if p-1 contains an end-of-stream block.
114 void UpdateEnd(MultiBufferBlockId p);
115
113 // Indirection function used to call callbacks. When we post a callback 116 // Indirection function used to call callbacks. When we post a callback
114 // we indirect it through a weak_ptr and this function to make sure we 117 // we indirect it through a weak_ptr and this function to make sure we
115 // don't call any callbacks after this object has been destroyed. 118 // don't call any callbacks after this object has been destroyed.
116 void Call(const base::Closure& cb) const; 119 void Call(const base::Closure& cb) const;
117 120
118 // The multibuffer we're wrapping, not owned. 121 // The multibuffer we're wrapping, not owned.
119 MultiBuffer* multibuffer_; 122 MultiBuffer* multibuffer_;
120 123
121 // We're not interested in reading past this position. 124 // We're not interested in reading past this position.
122 int64_t end_; 125 int64_t end_;
(...skipping 26 matching lines...) Expand all
149 152
150 // Progress callback. 153 // Progress callback.
151 base::Callback<void(int64_t, int64_t)> progress_callback_; 154 base::Callback<void(int64_t, int64_t)> progress_callback_;
152 155
153 base::WeakPtrFactory<MultiBufferReader> weak_factory_; 156 base::WeakPtrFactory<MultiBufferReader> weak_factory_;
154 }; 157 };
155 158
156 } // namespace media 159 } // namespace media
157 160
158 #endif // MEDIA_BLINK_MULTIBUFFER_READER_H_ 161 #endif // MEDIA_BLINK_MULTIBUFFER_READER_H_
OLDNEW
« no previous file with comments | « media/blink/multibuffer_data_source_unittest.cc ('k') | media/blink/multibuffer_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698