bunch of small fixes, add msg.txt to about prefs
[goodguy/history.git] / cinelerra-5.0 / quicktime / docs / opening.html
1 <TITLE>Opening</TITLE>
2
3
4 <H1>Step 1: Open the file</H1>
5
6
7 The first step in any Quicktime operation is to open the file.  Include
8 the Quicktime header:<P>
9
10 <CODE>
11 #include &#60quicktime.h&#62
12 </CODE><P>
13
14 create a quicktime pointer:<P>
15
16 <CODE>
17 quicktime_t *file;<P>
18 </CODE>
19
20 and open the file in read or write mode.  The following code opens
21 a file in read only:<P>
22
23 <CODE>
24 file = quicktime_open("test.mov", 1, 0));<P>
25 </CODE><P>
26
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
30 write.<P>
31
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
34 on the file.<P>
35
36
37 When you're done using the file, call<P>
38
39 <CODE>
40 quicktime_close(quicktime_t *file);<BR>
41 </CODE>
42
43 <FONT SIZE=+1>
44 <H2>NOTE FOR AVI FILES:</H2><P>
45 </FONT>
46
47 In read mode call <CODE>quicktime_is_avi</CODE> to see if the file is
48 AVI.<P>
49
50 The procedure for writing an AVI file is described in <A
51 HREF="writing.html">writing.</A><P>
52 <P>
53 <P>
54