748ce065ecc9f4f5e71b92e58e6555dc75f04cb2
[goodguy/cinelerra.git] / cinelerra-5.1 / 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 // Normally, these are sourced from the compiler command line
26 //   as: c++ -Dvar=value defines
27 #ifndef CIN_CONFIG
28 #define CIN_CONFIG "~/.bcast5"
29 #endif
30 #ifndef LOCALE_DIR
31 #define LOCALE_DIR "$CIN_LIB/locale"
32 #endif
33 #ifndef CINDAT_DIR
34 #define CINDAT_DIR "$CIN_PATH"
35 #endif
36 #ifndef CINLIB_DIR
37 #define CINLIB_DIR "$CIN_PATH"
38 #endif
39 #ifndef PLUGIN_DIR
40 #define PLUGIN_DIR "$CIN_LIB/plugins"
41 #endif
42 #ifndef LADSPA_DIR
43 #define LADSPA_DIR "$CIN_LIB/ladspa"
44 #endif
45 #ifndef CIN_BROWSER
46 #define CIN_BROWSER "firefox"
47 #endif
48
49 #include "language.h"
50
51 // Return values for open_file
52 #define FILE_OK 0
53 #define FILE_NOT_FOUND 1
54 #define FILE_UNRECOGNIZED_CODEC 2
55 #define FILE_IS_XML 3
56
57 // Numeric codes for each file format
58 // They're stored in XML files, so they have to be fixed.
59 #define FILE_PLUGIN             0x8000
60 #define FILE_UNKNOWN            0
61 // Libzmpeg3 decoding and transport stream capture only
62 #define FILE_PCM                1
63 #define FILE_WAV                2
64 #define FILE_PNG                4
65 #define FILE_JPEG               5
66 #define FILE_TIFF               6
67 #define FILE_GIF                7
68 #define FILE_JPEG_LIST          8
69 #define FILE_AU                 9
70 #define FILE_AIFF               10
71 #define FILE_SND                11
72 #define FILE_TGA_LIST           13
73 #define FILE_TGA                14
74 #define FILE_MPEG               15
75 #define FILE_AMPEG              16    // For encoding only
76 #define FILE_VMPEG              17    // For encoding only
77 #define FILE_RAWDV              18
78 #define FILE_TIFF_LIST          22
79 #define FILE_PNG_LIST           23
80 #define FILE_AC3                25    // AC3 encoding
81 #define FILE_EXR                26
82 #define FILE_EXR_LIST           27
83 #define FILE_CR2                28
84 #define FILE_FLAC               32
85 #define FILE_FFMPEG             33
86 #define FILE_SCENE              34
87 #define FILE_CR2_LIST           35
88 #define FILE_GIF_LIST           36
89 #define FILE_DB                 37
90 #define FILE_PPM                38
91 #define FILE_PPM_LIST           39
92 #define FILE_REF                40
93
94 // For formats supported by plugins, the format number is the plugin number in the
95 // plugin list ORed with 0x8000.
96
97 #if 0
98 N_("AC3")
99 N_("Apple/SGI AIFF")
100 N_("AVI Arne Type 1")
101 N_("AVI Avifile")
102 N_("AVI DV Type 2")
103 N_("AVI Lavtools")
104 N_("EXR")
105 N_("EXR Sequence")
106 N_("FFMPEG")
107 N_("FLAC")
108 N_("GIF")
109 N_("GIF Sequence")
110 N_("JPEG")
111 N_("JPEG Sequence")
112 N_("Microsoft WAV")
113 N_("MPEG Audio")    // For encoding only
114 N_("MPEG")          // For decoding only
115 N_("MPEG Video")    // For encoding only
116 N_("PNG")
117 N_("PNG Sequence")
118 N_("PPM")
119 N_("PPM Sequence")
120 N_("Raw DV")
121 N_("Raw PCM")
122 N_("Sun/NeXT AU")
123 N_("TGA")
124 N_("TGA Sequence")
125 N_("TIFF")
126 N_("TIFF Sequence")
127 N_("Unknown sound")
128 N_("Reference to EDL")
129 #endif
130
131 #define AC3_NAME                "AC3"
132 #define AIFF_NAME               "Apple/SGI AIFF"
133 #define AMPEG_NAME              "MPEG Audio"    // For encoding only
134 #define AU_NAME                 "Sun/NeXT AU"
135 #define AVI_ARNE1_NAME          "AVI Arne Type 1"
136 #define AVI_ARNE2_NAME          "AVI DV Type 2"
137 #define AVI_AVIFILE_NAME        "AVI Avifile"
138 #define AVI_LAVTOOLS_NAME       "AVI Lavtools"
139 #define CR2_LIST_NAME           "CR2 Sequence"
140 #define CR2_NAME                "Raw Camera"
141 #define DBASE_NAME              "DB"
142 #define EXR_LIST_NAME           "EXR Sequence"
143 #define EXR_NAME                "EXR"
144 #define FFMPEG_NAME             "FFMPEG"
145 #define FLAC_NAME               "FLAC"
146 #define GIF_NAME                "GIF"
147 #define GIF_LIST_NAME           "GIF Sequence"
148 #define JPEG_LIST_NAME          "JPEG Sequence"
149 #define JPEG_NAME               "JPEG"
150 #define MPEG_NAME               "MPEG Stream"   // For capture only
151 #define PCM_NAME                "Raw PCM"
152 #define PNG_LIST_NAME           "PNG Sequence"
153 #define PNG_NAME                "PNG"
154 #define PPM_LIST_NAME           "PPM Sequence"
155 #define PPM_NAME                "PPM"
156 #define RAWDV_NAME              "Raw DV"
157 #define SCENE_NAME              "Text To Movie"
158 #define SND_NAME                "Unknown sound"
159 #define TGA_LIST_NAME           "TGA Sequence"
160 #define TGA_NAME                "TGA"
161 #define TIFF_LIST_NAME          "TIFF Sequence"
162 #define TIFF_NAME               "TIFF"
163 #define VMPEG_NAME              "MPEG Video"    // For encoding only
164 #define WAV_NAME                "Microsoft WAV"
165 #define REF_NAME                "Reference EDL"
166
167 #define BITSLINEAR8    8
168 #define BITSLINEAR16   16
169 #define BITSLINEAR24   24
170 #define BITSLINEAR32   32
171 #define BITS_ADPCM     252
172 #define BITSFLOAT      253
173 #define BITSULAW       254
174
175 #if 0
176 N_("8 Bit Linear")
177 N_("16 Bit Linear")
178 N_("24 Bit Linear")
179 N_("32 Bit Linear")
180 N_("u Law")
181 N_("IMA 4")
182 N_("ADPCM")
183 N_("Float")
184
185 N_("RGB ALPHA")
186 N_("PNG ALPHA")
187 #endif
188
189 #define NAME_8BIT "8 Bit Linear"
190 #define NAME_16BIT "16 Bit Linear"
191 #define NAME_24BIT "24 Bit Linear"
192 #define NAME_32BIT "32 Bit Linear"
193 #define NAME_ULAW "u Law"
194 #define NAME_ADPCM "ADPCM"
195 #define NAME_FLOAT "Float"
196
197
198 class File;
199 //result<0: continue skimming, result>=0: exit return code
200 typedef int (*skim_fn)(void *vp, int track);
201
202 #endif