1 ///////////////////////////////////////////////////////////////////////////
3 // Copyright (c) 2004, Industrial Light & Magic, a division of Lucas
6 // All rights reserved.
8 // Redistribution and use in source and binary forms, with or without
9 // modification, are permitted provided that the following conditions are
11 // * Redistributions of source code must retain the above copyright
12 // notice, this list of conditions and the following disclaimer.
13 // * Redistributions in binary form must reproduce the above
14 // copyright notice, this list of conditions and the following disclaimer
15 // in the documentation and/or other materials provided with the
17 // * Neither the name of Industrial Light & Magic nor the names of
18 // its contributors may be used to endorse or promote products derived
19 // from this software without specific prior written permission.
21 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 ///////////////////////////////////////////////////////////////////////////
36 #ifndef INCLUDED_IMF_KEY_CODE_H
37 #define INCLUDED_IMF_KEY_CODE_H
39 //-----------------------------------------------------------------------------
43 // A KeyCode object uniquely identifies a motion picture film frame.
44 // The following fields specifiy film manufacturer, film type, film
45 // roll and the frame's position within the roll:
47 // filmMfcCode film manufacturer code
50 // filmType film type code
53 // prefix prefix to identify film roll
56 // count count, increments once every perfsPerCount
57 // perforations (see below)
60 // perfOffset offset of frame, in perforations from
61 // zero-frame reference mark
64 // perfsPerFrame number of perforations per frame
70 // 3, 4, or 8 for 35mm film
71 // 5, 8 or 15 for 65mm film
73 // perfsPerCount number of perforations per count
80 // 80 or 120 for 65mm film
82 // For more information about the interpretation of those fields see
83 // the following standards and recommended practice publications:
85 // SMPTE 254 Motion-Picture Film (35-mm) - Manufacturer-Printed
86 // Latent Image Identification Information
88 // SMPTE 268M File Format for Digital Moving-Picture Exchange (DPX)
91 // SMPTE 270 Motion-Picture Film (65-mm) - Manufacturer- Printed
92 // Latent Image Identification Information
94 // SMPTE 271 Motion-Picture Film (16-mm) - Manufacturer- Printed
95 // Latent Image Identification Information
97 //-----------------------------------------------------------------------------
106 //-------------------------------------
107 // Constructors and assignment operator
108 //-------------------------------------
110 KeyCode (int filmMfcCode = 0,
115 int perfsPerFrame = 4,
116 int perfsPerCount = 64);
118 KeyCode (const KeyCode &other);
119 KeyCode & operator = (const KeyCode &other);
122 //----------------------------
123 // Access to individual fields
124 //----------------------------
126 int filmMfcCode () const;
127 void setFilmMfcCode (int filmMfcCode);
129 int filmType () const;
130 void setFilmType (int filmType);
133 void setPrefix (int prefix);
136 void setCount (int count);
138 int perfOffset () const;
139 void setPerfOffset (int perfOffset);
141 int perfsPerFrame () const;
142 void setPerfsPerFrame (int perfsPerFrame);
144 int perfsPerCount () const;
145 void setPerfsPerCount (int perfsPerCount);