synched with trunk at revision 34793
[blender.git] / source / blender / quicktime / quicktime_export.h
1 /* $Id$ 
2  *
3  * ***** BEGIN GPL LICENSE BLOCK *****
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software Foundation,
17  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  *
19  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
20  * All rights reserved.
21  *
22  * The Original Code is: all of this file.
23  *
24  * Contributor(s): none yet.
25  *
26  * ***** END GPL LICENSE BLOCK *****
27  */
28
29 #ifndef __QUICKTIME_EXPORT_H__
30 #define __QUICKTIME_EXPORT_H__
31
32 #if defined (_WIN32) || (__APPLE__)
33
34 #define __AIFF__
35
36
37 #define QTAUDIO_FLAG_RESAMPLE_NOHQ 1
38 #define QTAUDIO_FLAG_CODEC_ISCBR 2
39
40
41 /*Codec list*/
42 typedef struct QuicktimeCodecTypeDesc {
43         int codecType;
44         int rnatmpvalue;
45         char * codecName;
46 } QuicktimeCodecTypeDesc ;
47
48 // quicktime movie output functions
49 struct RenderData;
50 struct Scene;
51 struct wmOperatorType;
52 struct ReportList;
53
54 int start_qt(struct Scene *scene, struct RenderData *rd, int rectx, int recty, struct ReportList *reports);     //for movie handle (BKE writeavi.c now)
55 int append_qt(struct RenderData *rd, int frame, int *pixels, int rectx, int recty, struct ReportList *reports);
56 void end_qt(void);
57 void filepath_qt(char *string, struct RenderData *rd);
58
59 /*RNA helper functions */
60 void quicktime_verify_image_type(struct RenderData *rd); //used by RNA for defaults values init, if needed
61 /*Video codec type*/
62 int quicktime_get_num_videocodecs();
63 QuicktimeCodecTypeDesc* quicktime_get_videocodecType_desc(int indexValue);
64 int quicktime_rnatmpvalue_from_videocodectype(int codecType);
65 int quicktime_videocodecType_from_rnatmpvalue(int rnatmpvalue);
66
67 #ifdef USE_QTKIT
68 /*Audio codec type*/
69 int quicktime_get_num_audiocodecs();
70 QuicktimeCodecTypeDesc* quicktime_get_audiocodecType_desc(int indexValue);
71 int quicktime_rnatmpvalue_from_audiocodectype(int codecType);
72 int quicktime_audiocodecType_from_rnatmpvalue(int rnatmpvalue);
73 #endif
74
75 #ifndef USE_QTKIT
76 void SCENE_OT_render_data_set_quicktime_codec(struct wmOperatorType *ot); //Operator to raise quicktime standard dialog to request codec settings
77 #endif
78
79
80 void free_qtcomponentdata(void);
81 void makeqtstring(struct RenderData *rd, char *string);         //for playanim.c
82
83
84
85 #if (defined(USE_QTKIT) && defined(MAC_OS_X_VERSION_10_6) && __LP64__)
86 //Include the quicktime codec types constants that are missing in QTKitDefines.h in 10.6 / 64bit
87 enum {
88         kRawCodecType                                           = 'raw ',
89         kCinepakCodecType                                       = 'cvid',
90         kGraphicsCodecType                                      = 'smc ',
91         kAnimationCodecType                             = 'rle ',
92         kVideoCodecType                                         = 'rpza',
93         kComponentVideoCodecType                        = 'yuv2',
94         kJPEGCodecType                                          = 'jpeg',
95         kMotionJPEGACodecType                           = 'mjpa',
96         kMotionJPEGBCodecType                           = 'mjpb',
97         kSGICodecType                                           = '.SGI',
98         kPlanarRGBCodecType                             = '8BPS',
99         kMacPaintCodecType                                      = 'PNTG',
100         kGIFCodecType                                           = 'gif ',
101         kPhotoCDCodecType                                       = 'kpcd',
102         kQuickDrawGXCodecType                           = 'qdgx',
103         kAVRJPEGCodecType                                       = 'avr ',
104         kOpenDMLJPEGCodecType                           = 'dmb1',
105         kBMPCodecType                                           = 'WRLE',
106         kWindowsRawCodecType                            = 'WRAW',
107         kVectorCodecType                                        = 'path',
108         kQuickDrawCodecType                             = 'qdrw',
109         kWaterRippleCodecType                           = 'ripl',
110         kFireCodecType                                          = 'fire',
111         kCloudCodecType                                         = 'clou',
112         kH261CodecType                                          = 'h261',
113         kH263CodecType                                          = 'h263',
114         kDVCNTSCCodecType                                       = 'dvc ',       /* DV - NTSC and DVCPRO NTSC (available in QuickTime 6.0 or later)*/
115         /* NOTE: kDVCProNTSCCodecType is deprecated.    */
116         /* Use kDVCNTSCCodecType instead -- as far as the codecs are concerned, */
117         /* the two data formats are identical.*/
118         kDVCPALCodecType                                        = 'dvcp',
119         kDVCProPALCodecType                             = 'dvpp',       /* available in QuickTime 6.0 or later*/
120         kDVCPro50NTSCCodecType                          = 'dv5n',
121         kDVCPro50PALCodecType                           = 'dv5p',
122         kDVCPro100NTSCCodecType                         = 'dv1n',
123         kDVCPro100PALCodecType                          = 'dv1p',
124         kDVCPROHD720pCodecType                          = 'dvhp',
125         kDVCPROHD1080i60CodecType                       = 'dvh6',
126         kDVCPROHD1080i50CodecType                       = 'dvh5',
127         kBaseCodecType                                          = 'base',
128         kFLCCodecType                                           = 'flic',
129         kTargaCodecType                                         = 'tga ',
130         kPNGCodecType                                           = 'png ',
131         kTIFFCodecType                                          = 'tiff',       /* NOTE: despite what might seem obvious from the two constants*/
132         /* below and their names, they really are correct. 'yuvu' really */
133         /* does mean signed, and 'yuvs' really does mean unsigned. Really. */
134         kComponentVideoSigned                           = 'yuvu',
135         kComponentVideoUnsigned                         = 'yuvs',
136         kCMYKCodecType                                          = 'cmyk',
137         kMicrosoftVideo1CodecType                       = 'msvc',
138         kSorensonCodecType                                      = 'SVQ1',
139         kSorenson3CodecType                             = 'SVQ3',       /* available in QuickTime 5 and later*/
140         kIndeo4CodecType                                        = 'IV41',
141         kMPEG4VisualCodecType                           = 'mp4v',
142         k64ARGBCodecType                                        = 'b64a',
143         k48RGBCodecType                                         = 'b48r',
144         k32AlphaGrayCodecType                           = 'b32a',
145         k16GrayCodecType                                        = 'b16g',
146         kMpegYUV420CodecType                            = 'myuv',
147         kYUV420CodecType                                        = 'y420',
148         kSorensonYUV9CodecType                          = 'syv9',
149         k422YpCbCr8CodecType                            = '2vuy',       /* Component Y'CbCr 8-bit 4:2:2 */
150         k444YpCbCr8CodecType                            = 'v308',       /* Component Y'CbCr 8-bit 4:4:4 */
151         k4444YpCbCrA8CodecType                          = 'v408',       /* Component Y'CbCrA 8-bit 4:4:4:4 */
152         k422YpCbCr16CodecType                           = 'v216',       /* Component Y'CbCr 10,12,14,16-bit 4:2:2*/
153         k422YpCbCr10CodecType                           = 'v210',       /* Component Y'CbCr 10-bit 4:2:2 */
154         k444YpCbCr10CodecType                           = 'v410',       /* Component Y'CbCr 10-bit 4:4:4 */
155         k4444YpCbCrA8RCodecType                         = 'r408',       /* Component Y'CbCrA 8-bit 4:4:4:4, rendering format. full range alpha, zero biased yuv*/
156         kJPEG2000CodecType                                      = 'mjp2',
157         kPixletCodecType                                        = 'pxlt',
158         kH264CodecType                                          = 'avc1'
159 };
160 #endif
161
162 #endif //(_WIN32) || (__APPLE__)
163
164 #endif  // __QUICKTIME_IMP_H__