OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "media/formats/mp4/box_reader.h" | 5 #include "media/formats/mp4/box_reader.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <map> | |
10 #include <set> | 9 #include <set> |
11 | 10 |
12 #include "base/logging.h" | |
13 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
14 #include "media/formats/mp4/box_definitions.h" | 12 #include "media/formats/mp4/box_definitions.h" |
15 #include "media/formats/mp4/rcheck.h" | |
16 | 13 |
17 namespace media { | 14 namespace media { |
18 namespace mp4 { | 15 namespace mp4 { |
19 | 16 |
20 Box::~Box() {} | 17 Box::~Box() {} |
21 | 18 |
22 bool BufferReader::Read1(uint8* v) { | 19 bool BufferReader::Read1(uint8* v) { |
23 RCHECK(HasBytes(1)); | 20 RCHECK(HasBytes(1)); |
24 *v = buf_[pos_++]; | 21 *v = buf_[pos_++]; |
25 return true; | 22 return true; |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 } | 236 } |
240 | 237 |
241 // Note that the pos_ head has advanced to the byte immediately after the | 238 // Note that the pos_ head has advanced to the byte immediately after the |
242 // header, which is where we want it. | 239 // header, which is where we want it. |
243 size_ = size; | 240 size_ = size; |
244 return true; | 241 return true; |
245 } | 242 } |
246 | 243 |
247 } // namespace mp4 | 244 } // namespace mp4 |
248 } // namespace media | 245 } // namespace media |
OLD | NEW |