4 <H1>Step
1: Open the file
</H1>
7 The first step in any Quicktime operation is to open the file. Include
8 the Quicktime header:
<P>
11 #include &#
60quicktime.h&#
62
14 create a quicktime pointer:
<P>
20 and open the file in read or write mode. The following code opens
21 a file in read only:
<P>
24 file = quicktime_open(
"test.mov",
1,
0));
<P>
27 Argument
1 is the path to a file. Argument
2 is a flag for read
28 access. Argument
3 is a flag for write access. You can specify read
29 or write access by setting these flags. Never specify read and
32 quicktime_open returns a NULL if the file couldn't be opened or the
33 format couldn't be recognized. Now you can do all sorts of operations
37 When you're done using the file, call
<P>
40 quicktime_close(quicktime_t *file);
<BR>
44 <H2>NOTE FOR AVI FILES:
</H2><P>
47 In read mode call
<CODE>quicktime_is_avi
</CODE> to see if the file is
50 The procedure for writing an AVI file is described in
<A
51 HREF=
"writing.html">writing.
</A><P>