| 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/webm/webm_parser.h" | 5 #include "media/formats/webm/webm_parser.h" |
| 6 | 6 |
| 7 // This file contains code to parse WebM file elements. It was created | 7 // This file contains code to parse WebM file elements. It was created |
| 8 // from information in the Matroska spec. | 8 // from information in the Matroska spec. |
| 9 // http://www.matroska.org/technical/specs/index.html | 9 // http://www.matroska.org/technical/specs/index.html |
| 10 // This file contains code for encrypted WebM. Current WebM | 10 // This file contains code for encrypted WebM. Current WebM |
| 11 // encrypted request for comments specification is here | 11 // encrypted request for comments specification is here |
| 12 // http://wiki.webmproject.org/encryption/webm-encryption-rfc | 12 // http://wiki.webmproject.org/encryption/webm-encryption-rfc |
| 13 | 13 |
| 14 #include <stddef.h> |
| 15 |
| 14 #include <iomanip> | 16 #include <iomanip> |
| 15 #include <limits> | 17 #include <limits> |
| 16 | 18 |
| 17 #include "base/logging.h" | 19 #include "base/logging.h" |
| 20 #include "base/macros.h" |
| 18 #include "base/numerics/safe_conversions.h" | 21 #include "base/numerics/safe_conversions.h" |
| 19 #include "media/formats/webm/webm_constants.h" | 22 #include "media/formats/webm/webm_constants.h" |
| 20 | 23 |
| 21 namespace media { | 24 namespace media { |
| 22 | 25 |
| 23 enum ElementType { | 26 enum ElementType { |
| 24 UNKNOWN, | 27 UNKNOWN, |
| 25 LIST, // Referred to as Master Element in the Matroska spec. | 28 LIST, // Referred to as Master Element in the Matroska spec. |
| 26 UINT, | 29 UINT, |
| 27 FLOAT, | 30 FLOAT, |
| (...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 963 if (kSegmentIds[i].id_ == id_b) | 966 if (kSegmentIds[i].id_ == id_b) |
| 964 return true; | 967 return true; |
| 965 } | 968 } |
| 966 } | 969 } |
| 967 | 970 |
| 968 // kWebMIdSegment siblings. | 971 // kWebMIdSegment siblings. |
| 969 return ((id_b == kWebMIdSegment) || (id_b == kWebMIdEBMLHeader)); | 972 return ((id_b == kWebMIdSegment) || (id_b == kWebMIdEBMLHeader)); |
| 970 } | 973 } |
| 971 | 974 |
| 972 } // namespace media | 975 } // namespace media |
| OLD | NEW |