Chromium Code Reviews| Index: webkit/fileapi/media/picasa/pmp_constants.h |
| diff --git a/webkit/fileapi/media/picasa/pmp_constants.h b/webkit/fileapi/media/picasa/pmp_constants.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..47fc9cae9599a2c7b741a271897341c066605353 |
| --- /dev/null |
| +++ b/webkit/fileapi/media/picasa/pmp_constants.h |
| @@ -0,0 +1,70 @@ |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef WEBKIT_FILEAPI_MEDIA_PICASA_PMP_CONSTANTS_H_ |
| +#define WEBKIT_FILEAPI_MEDIA_PICASA_PMP_CONSTANTS_H_ |
| + |
| +#include "base/basictypes.h" |
| + |
| +namespace fileapi { |
| + |
| +// PMP file format. |
| +// Info derived from: http://sbktech.blogspot.com/2011/12/picasa-pmp-format.html |
| + |
| +// values look "flipped" because serialized as little-endian |
| + |
| +// Total header size: 4+2+2+4+2+2+4 = 20 bytes |
| +const size_t kPmpHeaderSize = 20; |
| + |
| +// [0] - 4 Bytes - cd cc cc 3f |
| +const uint8 kPmpMagicO0S4[] = { 0xcd, 0xcc, 0xcc, 0x3f }; |
|
vandebo (ex-Chrome)
2013/03/27 00:06:19
The 00S4 nomenclature isn't like anything else I'v
tommycli
2013/03/27 19:34:30
Cool that's way better.
|
| + |
| +// [4] - 2 Bytes - Field type |
| +const int kPmpFieldTypeFirstOffset = 4; |
| + |
| +// [6] - 2 Bytes - 32 13 |
| +const uint8 kPmpMagicO6S2[] = { 0x32, 0x13 }; |
| + |
| +// [8] - 4 Bytes - 02 00 00 00 |
| +const uint8 kPmpMagicO8S4[] = { 0x02, 0x00, 0x00, 0x00 }; |
| + |
| +// [12] - 2 bytes - Field type. Same as above. |
| +const int kPmpFieldTypeSecondOffset = 12; |
| + |
| +// [14] - 2 bytes - 32 13 |
| +const uint8 kPmpMagicO14S2[] = { 0x32, 0x13 }; |
| + |
| +// [16] - 4 bytes - Row count as uint32. |
| +const int kPmpRowCountOffset = 16; |
| + |
| +// [20] - * bytes - Rest of the entries. |
| + |
| +// Field types: |
| +// 0x00 - cstrings |
|
vandebo (ex-Chrome)
2013/03/27 00:06:19
Comments below aren't necessary, the code describe
tommycli
2013/03/27 19:34:30
Done.
|
| +const uint16 kPmpFieldTypeString = 0x00; |
| + |
| +// 0x01 - uint32 |
| +const uint16 kPmpFieldTypeUInt32 = 0x01; |
| + |
| +// 0x02 - double (Microsoft variant time) |
| +const uint16 kPmpFieldTypeDouble64 = 0x02; |
| + |
| +// 0x03 - uint8 |
| +const uint16 kPmpFieldTypeUInt8 = 0x03; |
| + |
| +// 0x04 - uint64 |
| +const uint16 kPmpFieldTypeUInt64 = 0x04; |
| + |
| +// 0x05 - uint16 - unhandled |
| +// const uint16 kPmpFieldTypeUInt16 = 0x05; |
| + |
| +// 0x06 - cstrings - unhandled |
| +// const uint16 kPmpFieldTypeString_06 = 0x06; |
| + |
| +// 0x07 - uint32 - unhandled |
| +// const uint16 kPmpFieldTypeUInt32_07 = 0x07; |
| + |
| +} // namespace fileapi |
| + |
| +#endif // WEBKIT_FILEAPI_MEDIA_PICASA_PMP_CONSTANTS_H_ |