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 #include <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 writers.pop_back(); | 58 writers.pop_back(); |
59 return; | 59 return; |
60 } | 60 } |
61 } | 61 } |
62 LOG(FATAL) << "Couldn't find myself in writers!"; | 62 LOG(FATAL) << "Couldn't find myself in writers!"; |
63 } | 63 } |
64 | 64 |
65 MultiBufferBlockId Tell() const override { return pos_; } | 65 MultiBufferBlockId Tell() const override { return pos_; } |
66 | 66 |
67 bool Available() const override { return !fifo_.empty(); } | 67 bool Available() const override { return !fifo_.empty(); } |
| 68 int64_t AvailableBytes() const override { return 0; } |
68 | 69 |
69 scoped_refptr<DataBuffer> Read() override { | 70 scoped_refptr<DataBuffer> Read() override { |
70 DCHECK(Available()); | 71 DCHECK(Available()); |
71 scoped_refptr<DataBuffer> ret = fifo_.front(); | 72 scoped_refptr<DataBuffer> ret = fifo_.front(); |
72 fifo_.pop_front(); | 73 fifo_.pop_front(); |
73 ++pos_; | 74 ++pos_; |
74 return ret; | 75 return ret; |
75 } | 76 } |
76 | 77 |
77 void SetDeferred(bool deferred) override { | 78 void SetDeferred(bool deferred) override { |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 multibuffer_.CheckLRUState(); | 567 multibuffer_.CheckLRUState(); |
567 } | 568 } |
568 multibuffer_.CheckPresentState(); | 569 multibuffer_.CheckPresentState(); |
569 while (!read_helpers.empty()) { | 570 while (!read_helpers.empty()) { |
570 delete read_helpers.back(); | 571 delete read_helpers.back(); |
571 read_helpers.pop_back(); | 572 read_helpers.pop_back(); |
572 } | 573 } |
573 } | 574 } |
574 | 575 |
575 } // namespace media | 576 } // namespace media |
OLD | NEW |