Index: media/formats/mp4/box_reader.h |
diff --git a/media/formats/mp4/box_reader.h b/media/formats/mp4/box_reader.h |
index 92e85fc44fade4ce118914b1f47d1d363decf549..6b59361612459d84e29448c3b19b43595ab98cce 100644 |
--- a/media/formats/mp4/box_reader.h |
+++ b/media/formats/mp4/box_reader.h |
@@ -101,14 +101,6 @@ |
int* box_size, |
bool* err) WARN_UNUSED_RESULT; |
- // Create a BoxReader from a buffer. |buf| must be the complete buffer, as |
- // errors are returned when sufficient data is not available. |buf| can start |
- // with any type of box -- it does not have to be IsValidTopLevelBox(). |
- // |
- // |buf| is retained but not owned, and must outlive the BoxReader instance. |
- static BoxReader* ReadConcatentatedBoxes(const uint8* buf, |
- const int buf_size); |
- |
// Returns true if |type| is recognized to be a top-level box, false |
// otherwise. This returns true for some boxes which we do not parse. |
// Helpful in debugging misaligned appends. |
@@ -156,9 +148,7 @@ |
const LogCB& log_cb() const { return log_cb_; } |
private: |
- // Create a BoxReader from |buf|. |is_EOS| should be true if |buf| is |
- // complete stream (i.e. no additional data is expected to be appended). |
- BoxReader(const uint8* buf, const int size, const LogCB& log_cb, bool is_EOS); |
+ BoxReader(const uint8* buf, const int size, const LogCB& log_cb); |
// Must be called immediately after init. If the return is false, this |
// indicates that the box header and its contents were not available in the |
@@ -180,9 +170,6 @@ |
// valid if scanned_ is true. |
ChildMap children_; |
bool scanned_; |
- |
- // True if the buffer provided to the reader is the complete stream. |
- const bool is_EOS_; |
}; |
// Template definitions |
@@ -220,8 +207,8 @@ |
scanned_ = true; |
bool err = false; |
- while (pos_ < size_) { |
- BoxReader child_reader(&buf_[pos_], size_ - pos_, log_cb_, is_EOS_); |
+ while (pos() < size()) { |
+ BoxReader child_reader(&buf_[pos_], size_ - pos_, log_cb_); |
if (!child_reader.ReadHeader(&err)) break; |
T child; |
RCHECK(child.Parse(&child_reader)); |