| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef WEBKIT_FILEAPI_MEDIA_PICASA_PMP_CONSTANTS_H_ |
| 6 #define WEBKIT_FILEAPI_MEDIA_PICASA_PMP_CONSTANTS_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 |
| 10 namespace fileapi { |
| 11 |
| 12 // PMP file format. |
| 13 // Info derived from: http://sbktech.blogspot.com/2011/12/picasa-pmp-format.html |
| 14 |
| 15 // values look "flipped" because serialized as little-endian |
| 16 |
| 17 // Total header size: 4+2+2+4+2+2+4 = 20 bytes |
| 18 const size_t kPmpHeaderSize = 20; |
| 19 |
| 20 // [0] - 4 Bytes - cd cc cc 3f |
| 21 const uint8 kPmpMagicO0S4[] = { 0xcd, 0xcc, 0xcc, 0x3f }; |
| 22 |
| 23 // [4] - 2 Bytes - Field type |
| 24 const int kPmpFieldTypeFirstOffset = 4; |
| 25 |
| 26 // [6] - 2 Bytes - 32 13 |
| 27 const uint8 kPmpMagicO6S2[] = { 0x32, 0x13 }; |
| 28 |
| 29 // [8] - 4 Bytes - 02 00 00 00 |
| 30 const uint8 kPmpMagicO8S4[] = { 0x02, 0x00, 0x00, 0x00 }; |
| 31 |
| 32 // [12] - 2 bytes - Field type. Same as above. |
| 33 const int kPmpFieldTypeSecondOffset = 12; |
| 34 |
| 35 // [14] - 2 bytes - 32 13 |
| 36 const uint8 kPmpMagicO14S2[] = { 0x32, 0x13 }; |
| 37 |
| 38 // [16] - 4 bytes - Row count as uint32. |
| 39 const int kPmpRowCountOffset = 16; |
| 40 |
| 41 // [20] - * bytes - Rest of the entries. |
| 42 |
| 43 // Field types: |
| 44 // 0x00 - cstrings |
| 45 // 0x01 - uint32 |
| 46 // 0x02 - double (Microsoft variant time) |
| 47 // 0x03 - uint8 |
| 48 // 0x04 - uint64 |
| 49 // 0x05 - uint16 |
| 50 // 0x06 - cstrings |
| 51 // 0x07 - uint32 |
| 52 |
| 53 } // namespace fileapi |
| 54 |
| 55 #endif // WEBKIT_FILEAPI_MEDIA_PICASA_PMP_CONSTANTS_H_ |
| OLD | NEW |