9646440b813d8cbac350537c488e8221c8a4cfab
[asdcplib.git] / README
1
2 $Id$
3
4 The asdcplib library is a set of objects that offer
5 simplified access to files conforming to the sound and
6 picture track file formats proposed by the SMPTE working
7 group DC-28.20.
8
9 This work was originally funded by Digital Cinema
10 Initiatives, LLC. Subsequent efforts have been funded by
11 Deluxe Laboratories, Doremi Labs, and others.
12
13 **The asdcplib project is housed on SourceForge. The project
14 home page is at http://sourceforge.net/projects/asdcplib.
15 There is not much there other than CVS because I don't
16 really have the time to master SourceForge administration.
17 Feel free to email with questions or to request a tar file.
18
19 The project used to depend upon the mxflib project. Because
20 of the focus on covering the whole of the MXF spscifications,
21 mxflib is considerably larger and more complex that what I
22 require for this application. For this reason I have created
23 a dedicated MXF interface that is now part of this library.
24 Special thanks to Matt Beard and Oliver Morgan for their great
25 work and support.
26
27 Thanks also to the members of the SMPTE DC-28.20 packaging
28 ad-hoc group and the members of the MXF Interop Initiative
29 for their encouragement and support. Special thanks to
30 Jim Whittlesey and Howard Lukk at DCI for proposing and
31 supporting this project.
32
33
34 Design Notes
35
36 This library is intended (but of course not limited) for
37 use by developers of commercial D-Cinema products.  It is
38 designed to be easily integrated into a wide variety of
39 development environments.  Commercial users are strongly
40 urged to use static linking (at least where you use this
41 library) to prevent malicious in-field replacement of
42 critical system modules. This recommendation should be
43 considered wherever Open Source or Free software is being
44 used for applications having non-trivial security
45 requirements.
46
47 The author strives mightily to provide an API that is
48 completely independent of operating system and other
49 library dependencies, and which allows selective replacement
50 of some modules for local needs.  Specifically, the essence
51 parsers and OpenSSL crypto functions can be replaced by
52 linking to alternative implementations of the ASDCP::
53 objects which provide those services.
54
55 AS_DCP.h contains the entire API.  You do not need to read
56 any of the other files, except maybe asdcp-test.cpp which
57 contains detailed usage examples of each of the API's
58 services.
59
60
61 Build Instructions
62
63 GNU make is required to build asdcplib. The makefile will
64 work on win32 systems that have Cygwin. Other win32 gmake
65 packages may or may not work depending upon the availability
66 of standard POSIX shell commands. You will need gcc to rebuild
67 the dep.make file.
68
69 OpenSSL is required if you want to read and write encrypted
70 AS-DCP files. See http://www.openssl.org
71
72 If you are building on win32 or a unix with no OpenSSL library
73 support, you will have to also obtain and build OpenSSL (I'm
74 using 0.9.7d on win32).  Unpack it into the same parent directory
75 as asdcplib/, and rename the directory as (or make a sym link
76 named) 'openssl':
77
78 myhost$ ls -l
79 total 1761
80 drwxr-xr-x    1 jhurst   None         0 Feb  3 16:37 asdcplib
81 drwxr-xr-x   56 jhurst   None         0 Feb  2 16:35 openssl
82
83 I have tested this build on win32, Linux and Darwin platforms.
84 Others may work as well.
85
86 If you do not want to use or do not have OpenSSL, invoke
87 make with ASDCP_WITHOUT_OPENSSL defined:
88  
89   make ASDCP_WITHOUT_OPENSSL=1
90
91
92 Build Versions
93
94 There are two flavors of build: the default build and the
95 "SMPTE_LABELS" build. Unless you are specifically  working on
96 emerging SMPTE standards for D-Cinema content, you will certainly
97 want the default build. If you are developing support for the MXF
98 Interop Initiative standards, the default build is for you!
99
100 If you are not aiming for MXF Interop and if you are working
101 on developing support for the very latest versions of the SMPTE
102 draft standards, then you want the SMPTE_LABELS build:
103
104   make SMPTE_LABELS=1
105
106 NOTE: If you choose the SMPTE_LABELS build, you will be creating
107 files that may not work on MXF Interop systems. In the case of
108 encryption, incompatibility with MXF Interop is guaranteed! You
109 have been warned!
110
111
112 Documentation
113
114 Currently, the documentation is mostly in AS_DCP.h. Read
115 that file for a detailed description of the library's
116 capabilities.  Read asdcp-test.cpp for library usage
117 examples. More detailed documentation will be written RSN.
118
119
120 Change History
121 2005.00.00 - A New Hope
122  o The temporary mxf-lite has been removed. MXF files are now 
123    managed via the objects in KLV.h, MXFTypes.h MXF.h and
124    Metadata.h. This release does not support writing MXF files.
125  o Fixed a header interpretation error in the Wav parser.
126
127
128 2005.00.00 - The Reformation
129  o Removed mxflib as a dependency by forking the necessary
130    functions and placing them in the mxf-lite subdirectory.
131    Please note that the very heavy modifications done here
132    render all comparisson to mxflib code a substantial task.
133    All errors are now mine and users are warned not to bug
134    Oliver or Matt for help with this code. The version of
135    mxflib at the time of the fork was: 0.5.1.3.
136
137
138 2005.06.03 - bug fixes v0.10.18
139  o Updated UL batch to include GC UL.
140
141
142 2005.05.27 - bug fixes v0.10.17
143  o Un-did essence container and compression descriptor changes.
144    The default build reflects MXF Interop decisions as of 26 May.
145  o Added note about build versions to README (see above).
146  o Added warnings to SMPTE_LABELS builds.
147  o Fixed JP2K essence container label.
148
149
150 2005.05.02 - bug fixes v0.10.16
151  o Reorganized internal files, added file reader object, added OS
152    portability header, removed and renamed some files. If you have a
153    patch against previous versions of the source, you should check
154    it thoroughly.
155  o Added RGBA attributes to JP2K descriptor.
156  o Changed interface to CodestreamParser.
157  o Added JP2K parser implementation. It is parsing each frame but is
158    not yet being used to populate the descriptor.
159  o Added 48fps option for `asdcp-test -p`.
160  o Added picture rate constants to AS_DCP.h (23.976, 24, 48).
161  o Added sample rate constant to AS_DCP.h (48k).
162  o Changed asdcp-test to encrypt picture headers by default
163    (plaintext offset will be 0), added -E option to allow
164    plaintext headers.
165
166
167 2005.04.28 - bug fixes v0.9.15
168  o The XML descriptors for the crypto DMS have moved in mxflib to
169    the file DMS_Crypto.xml (they were in DMS_DCPENC.xml).  Older
170    installations should update the file from mxflib.
171  o Added Close() and Seek() to ~MyFileWriter(), cleaned up headers
172  o Added UUID generator output mode (-u).
173  o Added -S option to extract PCM essence into stereo wav files
174  o Added more UL testing and conformance checking.
175  o Added macro SMPTE_LABELS which causes the library to be built
176    with SMPTE (as opposed to MXF Interop) labels. This is not
177    set by default, and currently only affects the PCM container
178    label and encrypted element label.
179  o Cleaned up the GNUmakefile test targets, the source files
180    are now named with the TEST_FILE_PREFIX macro.
181  o enabled 23.976-framed PCM (2002 samples per frame)
182  o The size of the asdcp-test frame buffer for picture essence
183    may now be set from the command line (-b).  The default is 4MB.
184  o h__Reader::ReadEKLVPacket() now tests the UL (duh) and switches
185    on the value, allowing plaintext and ciphertext frames to
186    be mixed in the file.
187  o Fixed error in UUID generator format.
188  o JP2K files now use the GenericPictureDescriptor to store
189    ContainerDuration and SampleRate. SampleRate is mapped
190    to EditRate in the PictureDescriptor struct. This fixes
191    the second caveat from the 0.8.13 release.
192  o Fxed bug in PCMParserList that was miscalculating the extent
193    of a PCM sample.  This bug did not affect API users, it was
194    only present in asdcp-test.
195  o Fixed EditRate on PCM files (was showing sample rate)
196  o Fixed Encrypted Essence Container UL
197  o Fixed BlockAlign value for PCM essence
198
199  - The following changes were provided by Jeff Loewenguth
200  - Thanks Jeff!
201  o Moved the DMS CryptographicFramework entry from the material
202    package to the source package
203  o Fixed erroneous Source Essence Container Label value
204  o Fixed broken sort of JP2K frames in JP2K parser
205  o Added FindFrameGOPStart() method to the MPEG2 MXFReader
206  o Added missing length values for EKLV packets without HMAC
207  o -x with JP2K essence writes to files with 6 digit names
208    (up from 5 digits).
209  o The Key ID may now be specified as an argument to asdcp-test
210     (-j <key-id-string>)
211
212
213 2004.12.30 - bug fixes + wav files v0.8.14
214  o Added WAV file write to asdcp-test (uses mxflib::waveheader_t).
215  o Three-partition files reading properly.  adscplib still writes
216    two-partition files.
217  o Changes in the mxflib WAV essence parser API had broken
218    asdcplib's ability to read essence from a WAV file.  I have
219    fixed this bug, but at the expense of breaking compatibility
220    with older versions of mxflib. Beware!
221  o Removed redundant (but working) bin-text-bin conversions.
222
223
224 2004.12.23 - JPEG 2000 support v0.8.13
225  o Reads/writes JPEG 2000 essence in plaintext and ciphertext
226    with the following caveats:
227     - The Picture Essence Descriptor is empty.
228     - Because there is no essence descriptor, the reader code
229       in asdcp-test has no idea how many frames are in the file
230       and ends with an out-of-bounds frame error.  This error
231       is being suppressed in asdcp-test for the current release.
232  o Still broken when reading three-partition files.
233
234
235 2004.10.22 - fixes and UL updates v0.7.11
236  WARNING: COMPATIBILITY BREAKPOINT
237  Files created with this and future versions of this library are
238  not compatible with previous versions of this library.  As you
239  might suspect, files created with previous versions of this
240  library are not compatible with  this and future versions.
241
242  o h__Reader will now open a three-partitition file (untested)
243  o Moved DMS from Material partition to File partition
244  o Added length fields to appropriate places in EKLV packet 
245
246
247 2004.10.22 - fixes and UL updates v0.7.10
248  o fixed frame buffer handling of externally allocated buffer,
249    created unit test (asdcp-mem-test)
250  o added operator==() and operator!=() to Rational type
251  o fixed some type-related compiler warnings
252  o asdcp-test -p now works on unwrap
253  o updated some ULs to match documentation (thanks to Arun
254    for the submission)
255  o canonicalized line endings
256
257
258 2004.07.02 - full plaintext + ciphertext read/write v0.6.9
259  o HMAC, plaintext offest and raw ciphertext read supported
260  o back to proper CBR index
261  o MPEG temporal offset working
262
263
264 2004.07.01 - plaintext + ciphertext read/write v0.5.8
265  o encryption of MPEG and PCM essence supported with the
266    following caveats:
267    - no HMAC support
268    - no plaintext offest support
269    - no raw ciphertext read support
270  o moved to reflecting the whole KLV triplet in the CBR
271    index (now incompatible with mxflib, still searching
272    for info about what's "right")
273  o awaitng the following fixes/features:
274    - retrieve Temporal Offset from index in MPEG2::Reader
275    - test for correct ULs when reading frame triplets
276    - fix header metadata items for encrypted files
277    - HMAC support
278    - plaintext offest support
279    - raw ciphertext read support
280
281
282 2004.06.14 - plaintext read/write w/key generator v0.4.5
283  o Project now uses OpenSSL (tested with 0.9.7d on win32, Linux, Darwin)
284    Use `make ASDCP_WITHOUT_OPENSSL=1` to make plaintext-only version
285  o Accepts interior I frames when parsing MPEG2 VES
286  o Improved error reporting on format errors
287  o Added support for encryption to asdcp-test
288  o Added RNG for asdcp-test (non-production use only, see notes in FortunaRNG.h)
289  o Implemented CBC encrypt, decrypt module
290  o Added partial TemporalOffset retrieval from MPEG2 parser
291  o Fixed win32 binmode bug
292
293
294 2004.05.12 - plaintext read/write v0.3.4
295  o Full read/write of plaintext MPEG-2 VES and WAV files
296    (does not yet support mux from or demux to 2 channel pairs)
297  o Builds with autoconf-based mxflib
298  o Added ASDCP_ prefix to macros
299  o Updated documentation, fixed documentation errors
300  o Simplified API for MXF writer setup
301  o Decoupled essence parsers from MXF writers
302  o added raw ciphertext support to FrameBuffer
303  o Cleaned up Get/Set naming confusion
304  o Added missing const qualifiers
305
306
307 2004.04.27 - preview release v0.2.1
308  o hasty release for quick review
309  o this release may not build with mxflib using autoconf.
310  o writes plaintext AS-DCP MPEG2 essence files
311  o tested under win32 and linux. FreeBSD and Darwin do not work
312
313
314 2004.02.04 - First release (v0.1.1):
315  o asdcp-test is mostly complete. It should correctly provide
316    access to the read and info capabilities of the library.
317  o The MPEG2 reader is functional but not fully tested.
318  o Some file format integrity tests remain to be coded.
319  o The PCM reader is mostly complete, I am having difficulty
320    getting a suitable test file from mxfwrap.
321  o The makefile creates a static library module. The API
322    will cleanly support a DSO (or DLL). Let me know if DSO
323    support is important to you.
324  o Nothing is thread safe. Thread safety was not a requirement
325    in the initial project definition. Thread safety may be added
326    above the mxflib/klvlib level. Let me know if it is important
327    to you.
328  o The files xmldict.xml and types.xml must be in the current
329    directory when the program is run. The files are supplied
330    with mxflib. Runtime location of the files is not currently
331    a project goal. Comments on how best to handle this situation
332    would be appreciated. See AS_DCP.cpp at init_mxf_types()
333    for a more detailed discussion.
334
335 --