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