initial commit
[goodguy/history.git] / cinelerra-5.0 / cinelerra / file.inc
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2010 Adam Williams <broadcast at earthling dot net>
5  * 
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  * 
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  * 
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  * 
20  */
21
22 #ifndef FILE_INC
23 #define FILE_INC
24
25 #include "language.h"
26
27 #define USE_FILEFORK
28
29 // Return values for open_file
30 #define FILE_OK 0
31 #define FILE_NOT_FOUND 1
32 #define FILE_UNRECOGNIZED_CODEC 2
33 #define FILE_IS_XML 3
34
35 // Numeric codes for each file format
36 // They're stored in XML files, so they have to be fixed.
37 #define FILE_PLUGIN             0x8000
38 #define FILE_UNKNOWN            0
39 // Libzmpeg3 decoding and transport stream capture only
40 #define FILE_PCM                1
41 #define FILE_WAV                2
42 #define FILE_MOV                3
43 #define FILE_PNG                4
44 #define FILE_JPEG               5
45 #define FILE_TIFF               6
46 #define FILE_GIF                7
47 #define FILE_JPEG_LIST          8
48 #define FILE_AU                 9
49 #define FILE_AIFF               10
50 #define FILE_SND                11
51 #define FILE_AVI_LAVTOOLS       12    // MJPEG type 1
52 #define FILE_TGA_LIST           13
53 #define FILE_TGA                14
54 #define FILE_MPEG               15    
55 #define FILE_AMPEG              16    // For encoding only
56 #define FILE_VMPEG              17    // For encoding only
57 #define FILE_RAWDV              18
58 #define FILE_AVI_ARNE2          19    // DV type 2
59 #define FILE_AVI_ARNE1          20    // DV type 1
60 #define FILE_AVI_AVIFILE        21
61 #define FILE_TIFF_LIST          22
62 #define FILE_PNG_LIST           23
63 #define FILE_AVI                24    // Heroine Virtual
64 #define FILE_AC3                25    // AC3 encoding
65 #define FILE_EXR                26
66 #define FILE_EXR_LIST           27
67 #define FILE_CR2                28
68 #define FILE_OGG                30
69 #define FILE_VORBIS             31
70 #define FILE_FLAC               32
71 #define FILE_FFMPEG             33
72 #define FILE_SCENE              34
73 #define FILE_CR2_LIST           35
74 #define FILE_GIF_LIST           36
75 #define FILE_DB                 37
76
77 // For formats supported by plugins, the format number is the plugin number in the 
78 // plugin list ORed with 0x8000.
79
80 #if 0
81 N_("AC3")
82 N_("Apple/SGI AIFF")
83 N_("AVI Arne Type 1")
84 N_("AVI Avifile")
85 N_("AVI DV Type 2")
86 N_("AVI Lavtools")
87 N_("EXR")
88 N_("EXR Sequence")
89 N_("FFMPEG")
90 N_("FLAC")
91 N_("JPEG")
92 N_("JPEG Sequence")
93 N_("Microsoft AVI")
94 N_("Microsoft WAV")
95 N_("MPEG Audio")    // For encoding only
96 N_("MPEG")          // For decoding only
97 N_("MPEG Video")    // For encoding only
98 N_("OGG Theora/Vorbis")
99 N_("OGG Vorbis")    // For decoding only
100 N_("PNG")
101 N_("PNG Sequence")
102 N_("Quicktime for Linux")
103 N_("Raw DV")
104 N_("Raw PCM")
105 N_("Sun/NeXT AU")
106 N_("TGA")
107 N_("TGA Sequence")
108 N_("TIFF")
109 N_("TIFF Sequence")
110 N_("Unknown sound")
111 #endif
112
113 #define AC3_NAME                "AC3"
114 #define AIFF_NAME               "Apple/SGI AIFF"
115 #define AMPEG_NAME              "MPEG Audio"    // For encoding only
116 #define AU_NAME                 "Sun/NeXT AU"
117 #define AVI_ARNE1_NAME          "AVI Arne Type 1"
118 #define AVI_ARNE2_NAME          "AVI DV Type 2"
119 #define AVI_AVIFILE_NAME        "AVI Avifile"
120 #define AVI_LAVTOOLS_NAME       "AVI Lavtools"
121 #define AVI_NAME                "Microsoft AVI"
122 #define CR2_LIST_NAME           "CR2 Sequence"
123 #define CR2_NAME                "Raw Camera"
124 #define DBASE_NAME              "DB"
125 #define EXR_LIST_NAME           "EXR Sequence"
126 #define EXR_NAME                "EXR"
127 #define FFMPEG_NAME             "FFMPEG"
128 #define FLAC_NAME               "FLAC"
129 #define JPEG_LIST_NAME          "JPEG Sequence"
130 #define JPEG_NAME               "JPEG"
131 #define MOV_NAME                "Quicktime for Linux"
132 #define MPEG_NAME               "MPEG"           // For decoding only
133 #define OGG_NAME                "OGG Theora/Vorbis"
134 #define PCM_NAME                "Raw PCM"
135 #define PNG_LIST_NAME           "PNG Sequence"
136 #define PNG_NAME                "PNG"
137 #define RAWDV_NAME              "Raw DV"
138 #define SCENE_NAME              "Text To Movie"
139 #define SND_NAME                "Unknown sound"
140 #define TGA_LIST_NAME           "TGA Sequence"
141 #define TGA_NAME                "TGA"
142 #define TIFF_LIST_NAME          "TIFF Sequence"
143 #define TIFF_NAME               "TIFF"
144 #define VMPEG_NAME              "MPEG Video"    // For encoding only
145 #define VORBIS_NAME             "OGG Vorbis"
146 #define WAV_NAME                "Microsoft WAV"
147
148 #define BITSLINEAR8    8
149 #define BITSLINEAR16   16
150 #define BITSLINEAR24   24
151 #define BITSLINEAR32   32
152 #define BITS_ADPCM     252
153 #define BITSFLOAT      253
154 #define BITSULAW       254
155 #define BITSIMA4       255
156
157 #if 0
158 N_("8 Bit Linear")
159 N_("16 Bit Linear")
160 N_("24 Bit Linear")
161 N_("32 Bit Linear")
162 N_("u Law")
163 N_("IMA 4")
164 N_("ADPCM")
165 N_("Float")
166
167 // Video formats not part of Quicktime
168 N_("RGB ALPHA")
169 N_("PNG ALPHA")
170 #endif
171
172 #define NAME_8BIT "8 Bit Linear"
173 #define NAME_16BIT "16 Bit Linear"
174 #define NAME_24BIT "24 Bit Linear"
175 #define NAME_32BIT "32 Bit Linear"
176 #define NAME_ULAW "u Law"
177 #define NAME_IMA4 "IMA 4"
178 #define NAME_ADPCM "ADPCM"
179 #define NAME_FLOAT "Float"
180
181 // Video formats not part of Quicktime
182 #define MOV_RGBA "RGB ALPHA"
183 #define MOV_PNGA "PNG ALPHA"
184
185
186 class File;
187 //result<0: continue skimming, result>=0: exit return code
188 typedef int (*skim_fn)(void *vp, int track);
189
190 #endif