r125: This commit was manufactured by cvs2svn to create tag 'r1_1_7-last'.
[cinelerra_cv/mob.git] / hvirtual / quicktime / docs / opening.html
blob3d2c400562c0274e953ece6a8bb7f2f9d30f9c2d
1 <TITLE>Opening</TITLE>
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>
10 <CODE>
11 #include &#60quicktime.h&#62
12 </CODE><P>
14 create a quicktime pointer:<P>
16 <CODE>
17 quicktime_t *file;<P>
18 </CODE>
20 and open the file in read or write mode. The following code opens
21 a file in read only:<P>
23 <CODE>
24 file = quicktime_open("test.mov", 1, 0));<P>
25 </CODE><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
30 write.<P>
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>
37 When you're done using the file, call<P>
39 <CODE>
40 quicktime_close(quicktime_t *file);<BR>
41 </CODE>
43 <FONT SIZE=+1>
44 <H2>NOTE FOR AVI FILES:</H2><P>
45 </FONT>
47 In read mode call <CODE>quicktime_is_avi</CODE> to see if the file is
48 AVI.<P>
50 The procedure for writing an AVI file is described in <A
51 HREF="writing.html">writing.</A><P>
52 <P>
53 <P>