Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: webkit/fileapi/media/picasa/pmp_constants.h

Issue 12704024: Simple PMP reader to parse Picasa's metadata (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused constant. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 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 <string>
9
10 #include "base/basictypes.h"
11
12 namespace fileapi {
13
14 // PMP file format.
15 // Info derived from: http://sbktech.blogspot.com/2011/12/picasa-pmp-format.html
16
17 const std::string kPmpExtension = "pmp";
18
19 const size_t kPmpHeaderSize = 20;
20
21 const int kPmpMagic1Offset = 0;
22 const int kPmpMagic2Offset = 6;
23 const int kPmpMagic3Offset = 8;
24 const int kPmpMagic4Offset = 14;
25
26 const uint32 kPmpMagic1 = 0x3fcccccd;
27 const uint16 kPmpMagic2 = 0x1332;
28 const uint32 kPmpMagic3 = 0x00000002;
29 const uint16 kPmpMagic4 = 0x1332;
30
31 const int kPmpFieldType1Offset = 4;
32 const int kPmpFieldType2Offset = 12;
33 const int kPmpRowCountOffset = 16;
34
35 const uint16 kPmpFieldTypeString = 0x00;
vandebo (ex-Chrome) 2013/03/29 21:35:07 It might clean up some interfaces if you make this
tommycli 2013/04/01 22:19:18 For now, I want the types of field types to be uin
vandebo (ex-Chrome) 2013/04/02 18:10:55 It will be a bit of extra code to convert what com
tommycli 2013/04/02 21:12:36 Done.
36 const uint16 kPmpFieldTypeUInt32 = 0x01;
37 const uint16 kPmpFieldTypeDouble64 = 0x02;
38 const uint16 kPmpFieldTypeUInt8 = 0x03;
39 const uint16 kPmpFieldTypeUInt64 = 0x04;
40 const uint16 kPmpFieldTypeInvalid = 0xff;
41
42 } // namespace fileapi
43
44 #endif // WEBKIT_FILEAPI_MEDIA_PICASA_PMP_CONSTANTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698