Added Quicktime support for OSX and Windows.
This code allows you to load Quicktime images and movies as textures and render animations to Quicktime movies. Note that the selected output codec is *not* saved in the blendfile. To enable Quicktime functionality you need the SDK from Apple: OSX: ftp://ftp.apple.com/developer/Development_Kits/QT6SDK_Mac.hqx Win: ftp://ftp.apple.com/developer/Development_Kits/QT6SDK_Win.hqx Add the \QTDevWin\CIncludes and \QTDevWin\Libraries directories from this SDK to your build environment. Enable the WITH_QUICKTIME compile flag in the following directories: bf\blender\source\blender\imbuf bf\blender\source\blender\src bf\blender\source\blender\render bf\blender\source\creator
This commit is contained in:
@@ -149,6 +149,9 @@
|
||||
#include "BIF_previewrender.h"
|
||||
#include "BIF_writeimage.h"
|
||||
#include "BIF_writeavicodec.h"
|
||||
#ifdef WITH_QUICKTIME
|
||||
#include "quicktime_export.h"
|
||||
#endif
|
||||
|
||||
/* 'old' stuff": defines and types ------------------------------------- */
|
||||
#include "blendef.h"
|
||||
@@ -265,6 +268,7 @@ char texstr[15][8]= {"None" , "Clouds" , "Wood",
|
||||
#define B_ENV_OB 1354
|
||||
|
||||
#define B_PACKIMA 1355
|
||||
#define B_TEXSETFRAMES 1356
|
||||
|
||||
/* *********************** */
|
||||
#define B_ANIMBUTS 1500
|
||||
@@ -3267,7 +3271,16 @@ void do_texbuts(unsigned short event)
|
||||
sa= closest_bigger_area();
|
||||
areawinset(sa->win);
|
||||
if(tex->ima) name= tex->ima->name;
|
||||
else name= U.textudir;
|
||||
#ifdef _WIN32
|
||||
else {
|
||||
if (strcmp (U.textudir, "/") == 0)
|
||||
name= G.sce;
|
||||
else
|
||||
name= U.textudir;
|
||||
}
|
||||
#else
|
||||
else name = U.textudir;
|
||||
#endif
|
||||
|
||||
if(event==B_LOADTEXIMA)
|
||||
activate_imageselect(FILE_SPECIAL, "SELECT IMAGE", name, load_tex_image);
|
||||
@@ -3359,6 +3372,11 @@ void do_texbuts(unsigned short event)
|
||||
}
|
||||
break;
|
||||
|
||||
case B_TEXSETFRAMES:
|
||||
if(tex->ima->anim) tex->frames = IMB_anim_get_duration(tex->ima->anim);
|
||||
allqueue(REDRAWBUTSTEX, 0);
|
||||
break;
|
||||
|
||||
case B_PACKIMA:
|
||||
if(tex && tex->ima) {
|
||||
if (tex->ima->packedfile) {
|
||||
@@ -3832,6 +3850,7 @@ void texbuts(void)
|
||||
|
||||
/* printen aantal frames anim */
|
||||
if(tex->ima && tex->ima->anim) {
|
||||
uiDefBut(block, BUT, B_TEXSETFRAMES, "<", 802, 110, 20, 18, 0, 0, 0, 0, 0, "Paste number of frames in Frames: button");
|
||||
sprintf(str, "%d frs ", IMB_anim_get_duration(tex->ima->anim));
|
||||
uiDefBut(block, LABEL, 0, str, 834, 110, 90, 18, 0, 0, 0, 0, 0, "");
|
||||
sprintf(str, "%d cur ", tex->ima->lastframe);
|
||||
@@ -5930,7 +5949,12 @@ void do_renderbuts(unsigned short event)
|
||||
allqueue(REDRAWALL, 0);
|
||||
break;
|
||||
case B_PLAYANIM:
|
||||
makeavistring(file);
|
||||
#ifdef WITH_QUICKTIME
|
||||
if(G.scene->r.imtype == R_QUICKTIME)
|
||||
makeqtstring(file);
|
||||
else
|
||||
#endif
|
||||
makeavistring(file);
|
||||
if(BLI_exist(file)) {
|
||||
run_playanim(file);
|
||||
}
|
||||
@@ -5987,18 +6011,78 @@ void do_renderbuts(unsigned short event)
|
||||
allqueue(REDRAWBUTSRENDER, 0);
|
||||
allqueue(REDRAWVIEWCAM, 0);
|
||||
break;
|
||||
#ifdef _WIN32
|
||||
|
||||
#ifdef WITH_QUICKTIME
|
||||
case B_FILETYPEMENU:
|
||||
allqueue(REDRAWBUTSRENDER, 0);
|
||||
#if defined (_WIN32) || defined (__APPLE__)
|
||||
// fall through to codec settings if this is the first
|
||||
// time R_AVICODEC is selected for this scene.
|
||||
if ((G.scene->r.imtype != R_AVICODEC) || (G.scene->r.avicodecdata)) {
|
||||
break;
|
||||
if (((G.scene->r.imtype == R_AVICODEC)
|
||||
&& (G.scene->r.avicodecdata == NULL)) ||
|
||||
((G.scene->r.imtype == R_QUICKTIME)
|
||||
&& (have_qtcodec == FALSE))) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
#else /* libquicktime */
|
||||
if(G.scene->r.imtype == R_QUICKTIME) {
|
||||
/* i'm not sure if this should be here... */
|
||||
/* set default quicktime codec */
|
||||
if (!G.scene->r.qtcodecdata) {
|
||||
G.scene->r.qtcodecdata = MEM_callocN(sizeof(QtCodecData),
|
||||
"QtCodecData");
|
||||
qtcodec_idx = 1;
|
||||
}
|
||||
|
||||
qt_init_codecs();
|
||||
if (qtcodec_idx < 1) qtcodec_idx = 1;
|
||||
|
||||
G.scene->r.qtcodecdata->fourcc =
|
||||
qtcodecidx_to_fcc(qtcodec_idx-1);
|
||||
qt_init_codecdata(G.scene->r.qtcodecdata);
|
||||
/* I'm not sure if this is really needed, so don't remove it yet */
|
||||
#if 0
|
||||
/* get index of codec that can handle a given fourcc */
|
||||
if (qtcodec_idx < 1)
|
||||
qtcodec_idx = get_qtcodec_idx(G.scene->r.qtcodecdata->fourcc)+1;
|
||||
|
||||
/* no suitable codec found, alert user */
|
||||
if (qtcodec_idx < -1) {
|
||||
error("no suitable codec found!");
|
||||
qtcodec_idx = 1;
|
||||
}
|
||||
#endif /* 0 */
|
||||
}
|
||||
#endif /*_WIN32 || __APPLE__ */
|
||||
|
||||
case B_SELECTCODEC:
|
||||
get_codec_settings();
|
||||
#if defined (_WIN32) || defined (__APPLE__)
|
||||
if ((G.scene->r.imtype == R_QUICKTIME)) /* || (G.scene->r.qtcodecdata)) */
|
||||
get_qtcodec_settings();
|
||||
#ifdef _WIN32
|
||||
else
|
||||
get_avicodec_settings();
|
||||
#endif /* _WIN32 */
|
||||
#else /* libquicktime */
|
||||
if (!G.scene->r.qtcodecdata) {
|
||||
G.scene->r.qtcodecdata = MEM_callocN(sizeof(QtCodecData),
|
||||
"QtCodecData");
|
||||
qtcodec_idx = 1;
|
||||
}
|
||||
if (qtcodec_idx < 1) {
|
||||
qtcodec_idx = 1;
|
||||
qt_init_codecs();
|
||||
}
|
||||
|
||||
G.scene->r.qtcodecdata->fourcc = qtcodecidx_to_fcc(qtcodec_idx-1);
|
||||
/* if the selected codec differs from the previous one, reinit it */
|
||||
qt_init_codecdata(G.scene->r.qtcodecdata);
|
||||
allqueue(REDRAWBUTSRENDER, 0);
|
||||
#endif /* _WIN32 || __APPLE__ */
|
||||
break;
|
||||
#endif
|
||||
#endif /* WITH_QUICKTIME */
|
||||
|
||||
case B_PR_FULL:
|
||||
G.scene->r.xsch= 1280;
|
||||
G.scene->r.ysch= 1024;
|
||||
@@ -6202,7 +6286,7 @@ uiBlock *edge_render_menu(void *arg_unused)
|
||||
&G.scene->r.edgeB, 0.0, 1.0, B_EDGECOLSLI, 0,
|
||||
"For unified renderer: Colour for edges in toon shading mode.");
|
||||
|
||||
uiDefButI(block, NUM, 0,"AntiShift",
|
||||
uiDefButS(block, NUM, 0,"AntiShift",
|
||||
365,70,140,19,
|
||||
&(G.scene->r.same_mat_redux), 0, 255.0, 0, 0,
|
||||
"For unified renderer: reduce intensity on boundaries "
|
||||
@@ -6285,22 +6369,49 @@ static char *imagetype_pup(void)
|
||||
strcat(formatstring, "|%s %%x%d"); // add space for AVI Codec
|
||||
#endif
|
||||
|
||||
sprintf(string, formatstring,
|
||||
"AVI Raw", R_AVIRAW,
|
||||
"AVI Jpeg", R_AVIJPEG,
|
||||
#ifdef _WIN32
|
||||
"AVI Codec", R_AVICODEC,
|
||||
#ifdef WITH_QUICKTIME
|
||||
if(G.have_quicktime)
|
||||
strcat(formatstring, "|%s %%x%d"); // add space for Quicktime
|
||||
#endif
|
||||
"Targa", R_TARGA,
|
||||
"Targa Raw", R_RAWTGA,
|
||||
"PNG", R_PNG,
|
||||
"Jpeg", R_JPEG90,
|
||||
"HamX", R_HAMX,
|
||||
"Iris", R_IRIS,
|
||||
"Iris + Zbuffer", R_IRIZ,
|
||||
"Ftype", R_FTYPE,
|
||||
"Movie", R_MOVIE
|
||||
);
|
||||
|
||||
if(G.have_quicktime) {
|
||||
sprintf(string, formatstring,
|
||||
"AVI Raw", R_AVIRAW,
|
||||
"AVI Jpeg", R_AVIJPEG,
|
||||
#ifdef _WIN32
|
||||
"AVI Codec", R_AVICODEC,
|
||||
#endif
|
||||
#ifdef WITH_QUICKTIME
|
||||
"QuickTime", R_QUICKTIME,
|
||||
#endif
|
||||
"Targa", R_TARGA,
|
||||
"Targa Raw", R_RAWTGA,
|
||||
"PNG", R_PNG,
|
||||
"Jpeg", R_JPEG90,
|
||||
"HamX", R_HAMX,
|
||||
"Iris", R_IRIS,
|
||||
"Iris + Zbuffer", R_IRIZ,
|
||||
"Ftype", R_FTYPE,
|
||||
"Movie", R_MOVIE
|
||||
);
|
||||
} else {
|
||||
sprintf(string, formatstring,
|
||||
"AVI Raw", R_AVIRAW,
|
||||
"AVI Jpeg", R_AVIJPEG,
|
||||
#ifdef _WIN32
|
||||
"AVI Codec", R_AVICODEC,
|
||||
#endif
|
||||
"Targa", R_TARGA,
|
||||
"Targa Raw", R_RAWTGA,
|
||||
"PNG", R_PNG,
|
||||
"Jpeg", R_JPEG90,
|
||||
"HamX", R_HAMX,
|
||||
"Iris", R_IRIS,
|
||||
"Iris + Zbuffer", R_IRIZ,
|
||||
"Ftype", R_FTYPE,
|
||||
"Movie", R_MOVIE
|
||||
);
|
||||
}
|
||||
|
||||
return (string);
|
||||
}
|
||||
@@ -6452,16 +6563,38 @@ void renderbuts(void)
|
||||
|
||||
if(G.scene->r.quality==0) G.scene->r.quality= 90;
|
||||
|
||||
#ifdef _WIN32
|
||||
if (G.scene->r.imtype == R_AVICODEC) {
|
||||
#else
|
||||
#ifdef WITH_QUICKTIME
|
||||
if (G.scene->r.imtype == R_AVICODEC || G.scene->r.imtype == R_QUICKTIME) {
|
||||
#else /* WITH_QUICKTIME */
|
||||
if (0) {
|
||||
#endif
|
||||
uiDefBut(block, BUT,B_SELECTCODEC, "Select Codec", 892,yofs,112,20, 0, 0, 0, 0, 0, "Set codec settings for AVI Codec");
|
||||
if(G.scene->r.imtype == R_QUICKTIME) {
|
||||
#ifdef WITH_QUICKTIME
|
||||
#if defined (_WIN32) || defined (__APPLE__)
|
||||
uiDefBut(block, BUT,B_SELECTCODEC, "Codec settings", 892,yofs,112,20, 0, 0, 0, 0, 0, "Set codec settings for Quicktime Codec");
|
||||
#else /* libquicktime */
|
||||
if (!G.scene->r.qtcodecdata) G.scene->r.qtcodecdata = MEM_callocN(sizeof(QtCodecData), "QtCodecData");
|
||||
uiDefButI(block, MENU, B_SELECTCODEC, qtcodecs_pup(), 892,yofs, 112, 20, &qtcodec_idx, 0, 0, 0, 0, "Codec");
|
||||
/* make sure the codec stored in G.scene->r.qtcodecdata matches the selected
|
||||
* one, especially if it's not set.. */
|
||||
if (!G.scene->r.qtcodecdata->fourcc) {
|
||||
G.scene->r.qtcodecdata->fourcc = qtcodecidx_to_fcc(qtcodec_idx-1);
|
||||
qt_init_codecdata(G.scene->r.qtcodecdata);
|
||||
}
|
||||
|
||||
yofs -= 22;
|
||||
uiDefBlockBut(block, qtcodec_menu, NULL, "Codec Settings |>> ", 892,yofs, 227, 20, "Edit Codec settings for QuickTime");
|
||||
yofs +=22;
|
||||
|
||||
#endif /* libquicktime */
|
||||
#endif /* WITH_QUICKTIME */
|
||||
} else {
|
||||
uiDefBut(block, BUT,B_SELECTCODEC, "Codec settings", 892,yofs,112,20, 0, 0, 0, 0, 0, "Set codec settings for AVI Codec");
|
||||
}
|
||||
} else {
|
||||
uiDefButS(block, NUM,0, "Quality:", 892,yofs,112,20, &G.scene->r.quality, 10.0, 100.0, 0, 0, "Quality setting for JPEG images, AVI Jpeg and SGI movies");
|
||||
}
|
||||
uiDefButS(block, NUM,REDRAWSEQ,"Frs/sec:", 1007,yofs,112,20, &G.scene->r.frs_sec, 1.0, 120.0, 0, 0, "Frames per second, for AVI and Sequence window grid");
|
||||
uiDefButS(block, NUM,REDRAWSEQ,"Frs/sec:", 1006,yofs,113,20, &G.scene->r.frs_sec, 1.0, 120.0, 100.0, 0, "Frames per second, for AVI and Sequence window grid");
|
||||
|
||||
uiDefButS(block, NUM,REDRAWSEQ,"Sta:", 692,10,94,24, &G.scene->r.sfra,1.0,18000.0, 0, 0, "The start frame of the animation");
|
||||
uiDefButS(block, NUM,REDRAWSEQ,"End:", 790,10,95,24, &G.scene->r.efra,1.0,18000.0, 0, 0, "The end frame of the animation");
|
||||
|
@@ -418,6 +418,12 @@ static void str_image_type(int ftype, char *name)
|
||||
if( ftype & PNG ) { strcat(name, "png "); }
|
||||
if( ftype & BMP ) { strcat(name, "bmp "); }
|
||||
if( ftype & AMI ) { strcat(name, "iff "); }
|
||||
#ifdef WITH_QUICKTIME
|
||||
if( ftype & QUICKTIME ) { strcat(name, "quicktime "); }
|
||||
#endif
|
||||
#ifdef WITH_FREEIMAGE
|
||||
if( ftype & FREEIMAGE ) { strcat(name, "freeimage "); }
|
||||
#endif
|
||||
}
|
||||
|
||||
void draw_sima_area(SpaceImaSel *simasel)
|
||||
@@ -572,7 +578,7 @@ void draw_sima_area(SpaceImaSel *simasel)
|
||||
glRecti(sx, sy, ex, ey); uiEmboss(sx,sy, ex,ey, 1);
|
||||
}
|
||||
if (ima->disksize/1000 > 1000){ sprintf(infostr, "%s %.2fMb x%i y%i %i bits ",ima->file_name,(ima->disksize/1024)/1024.0, ima->orgx, ima->orgy, ima->orgd);
|
||||
}else{ sprintf(infostr, "%s %dKb x%i y%i %i bits ", ima->file_name,ima->disksize/1024, ima->orgx, ima->orgy, ima->orgd);
|
||||
}else{ sprintf(infostr, "%s %dKb %ix%i %i bits ", ima->file_name,ima->disksize/1024, ima->orgx, ima->orgy, ima->orgd);
|
||||
}
|
||||
if (ima->anim == 1){ strcat (infostr, "movie"); }else{
|
||||
str_image_type(ima->ibuf_type, naam);
|
||||
|
@@ -513,22 +513,86 @@ void test_flags_file(SpaceFile *sfile)
|
||||
file->flags |= PSXFILE;
|
||||
}
|
||||
} else if (sfile->type==FILE_SPECIAL){
|
||||
if( BLI_testextensie(file->relname, ".jpg") ||
|
||||
BLI_testextensie(file->relname, ".tga") ||
|
||||
BLI_testextensie(file->relname, ".rgb") ||
|
||||
BLI_testextensie(file->relname, ".png") ||
|
||||
/* BLI_testextensie(file->relname, ".bmp") || */
|
||||
BLI_testextensie(file->relname, ".iff") ||
|
||||
BLI_testextensie(file->relname, ".lbm") ||
|
||||
BLI_testextensie(file->relname, ".sgi")) {
|
||||
file->flags |= IMAGEFILE;
|
||||
}
|
||||
else if(BLI_testextensie(file->relname, ".avi") ||
|
||||
BLI_testextensie(file->relname, ".mv")) {
|
||||
file->flags |= MOVIEFILE;
|
||||
}
|
||||
else if(BLI_testextensie(file->relname, ".py")) {
|
||||
if(BLI_testextensie(file->relname, ".py")) {
|
||||
file->flags |= PYSCRIPTFILE;
|
||||
} else if( BLI_testextensie(file->relname, ".ttf")
|
||||
|| BLI_testextensie(file->relname, ".pfb")
|
||||
|| BLI_testextensie(file->relname, ".otc")) {
|
||||
file->flags |= FTFONTFILE;
|
||||
} else if (G.have_quicktime){
|
||||
if( BLI_testextensie(file->relname, ".jpg")
|
||||
|| BLI_testextensie(file->relname, ".jpeg")
|
||||
|| BLI_testextensie(file->relname, ".tga")
|
||||
|| BLI_testextensie(file->relname, ".rgb")
|
||||
|| BLI_testextensie(file->relname, ".bmp")
|
||||
|| BLI_testextensie(file->relname, ".png")
|
||||
|| BLI_testextensie(file->relname, ".iff")
|
||||
|| BLI_testextensie(file->relname, ".lbm")
|
||||
|| BLI_testextensie(file->relname, ".gif")
|
||||
|| BLI_testextensie(file->relname, ".psd")
|
||||
|| BLI_testextensie(file->relname, ".tif")
|
||||
|| BLI_testextensie(file->relname, ".tiff")
|
||||
|| BLI_testextensie(file->relname, ".pct")
|
||||
|| BLI_testextensie(file->relname, ".pict")
|
||||
|| BLI_testextensie(file->relname, ".pntg") //macpaint
|
||||
|| BLI_testextensie(file->relname, ".qtif")
|
||||
#ifdef WITH_FREEIMAGE
|
||||
|| BLI_testextensie(file->relname, ".jng")
|
||||
|| BLI_testextensie(file->relname, ".mng")
|
||||
|| BLI_testextensie(file->relname, ".pbm")
|
||||
|| BLI_testextensie(file->relname, ".pgm")
|
||||
|| BLI_testextensie(file->relname, ".ppm")
|
||||
|| BLI_testextensie(file->relname, ".wbmp")
|
||||
|| BLI_testextensie(file->relname, ".cut")
|
||||
|| BLI_testextensie(file->relname, ".ico")
|
||||
|| BLI_testextensie(file->relname, ".koala")
|
||||
|| BLI_testextensie(file->relname, ".pcd")
|
||||
|| BLI_testextensie(file->relname, ".pcx")
|
||||
|| BLI_testextensie(file->relname, ".ras")
|
||||
#endif
|
||||
|| BLI_testextensie(file->relname, ".sgi")) {
|
||||
file->flags |= IMAGEFILE;
|
||||
}
|
||||
else if(BLI_testextensie(file->relname, ".avi")
|
||||
|| BLI_testextensie(file->relname, ".flc")
|
||||
|| BLI_testextensie(file->relname, ".mov")
|
||||
|| BLI_testextensie(file->relname, ".movie")
|
||||
|| BLI_testextensie(file->relname, ".mv")) {
|
||||
file->flags |= MOVIEFILE;
|
||||
}
|
||||
} else { // no quicktime
|
||||
if(BLI_testextensie(file->relname, ".jpg")
|
||||
|| BLI_testextensie(file->relname, ".tga")
|
||||
|| BLI_testextensie(file->relname, ".rgb")
|
||||
|| BLI_testextensie(file->relname, ".bmp")
|
||||
|| BLI_testextensie(file->relname, ".png")
|
||||
|| BLI_testextensie(file->relname, ".iff")
|
||||
|| BLI_testextensie(file->relname, ".lbm")
|
||||
#ifdef WITH_FREEIMAGE
|
||||
|| BLI_testextensie(file->relname, ".jng")
|
||||
|| BLI_testextensie(file->relname, ".mng")
|
||||
|| BLI_testextensie(file->relname, ".pbm")
|
||||
|| BLI_testextensie(file->relname, ".pgm")
|
||||
|| BLI_testextensie(file->relname, ".ppm")
|
||||
|| BLI_testextensie(file->relname, ".wbmp")
|
||||
|| BLI_testextensie(file->relname, ".cut")
|
||||
|| BLI_testextensie(file->relname, ".ico")
|
||||
|| BLI_testextensie(file->relname, ".koala")
|
||||
|| BLI_testextensie(file->relname, ".pcd")
|
||||
|| BLI_testextensie(file->relname, ".pcx")
|
||||
|| BLI_testextensie(file->relname, ".ras")
|
||||
|| BLI_testextensie(file->relname, ".gif")
|
||||
|| BLI_testextensie(file->relname, ".psd")
|
||||
|| BLI_testextensie(file->relname, ".tif")
|
||||
|| BLI_testextensie(file->relname, ".tiff")
|
||||
#endif
|
||||
|| BLI_testextensie(file->relname, ".sgi")) {
|
||||
file->flags |= IMAGEFILE;
|
||||
}
|
||||
else if(BLI_testextensie(file->relname, ".avi")
|
||||
|| BLI_testextensie(file->relname, ".mv")) {
|
||||
file->flags |= MOVIEFILE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -877,6 +941,10 @@ static void printregel(SpaceFile *sfile, struct direntry *files, int x, int y)
|
||||
cpack(0x4477dd);
|
||||
glRects(x-14, y, x-8, y+7);
|
||||
}
|
||||
else if(files->flags & FTFONTFILE) {
|
||||
cpack(0xff2371);
|
||||
glRects(x-14, y, x-8, y+7);
|
||||
}
|
||||
|
||||
if(S_ISDIR(files->type)) cpack(0xFFFFFF);
|
||||
else cpack(0x0);
|
||||
|
@@ -48,6 +48,15 @@
|
||||
#endif
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#ifdef WITH_QUICKTIME
|
||||
#ifdef _WIN32
|
||||
#include <QTML.h>
|
||||
#endif /* _WIN32 */
|
||||
#if defined (_WIN32) || defined (__APPLE__)
|
||||
#include <Movies.h>
|
||||
#endif /* _WIN32 || __APPLE__ */
|
||||
#endif /* WITH_QUICKTIME */
|
||||
|
||||
#include "PIL_time.h"
|
||||
|
||||
#include <math.h>
|
||||
@@ -348,6 +357,22 @@ void playanim(int argc, char **argv)
|
||||
} else break;
|
||||
}
|
||||
|
||||
#ifdef WITH_QUICKTIME
|
||||
#if defined (_WIN32) || defined (__APPLE__)
|
||||
/* Initialize QuickTime */
|
||||
#ifdef _WIN32
|
||||
if (InitializeQTML(0) != noErr)
|
||||
G.have_quicktime = FALSE;
|
||||
else
|
||||
G.have_quicktime = TRUE;
|
||||
#endif /* _WIN32 */
|
||||
if (EnterMovies() != noErr)
|
||||
G.have_quicktime = FALSE;
|
||||
else
|
||||
#endif /* _WIN32 || __APPLE__ */
|
||||
G.have_quicktime = TRUE;
|
||||
#endif /* WITH_QUICKTIME */
|
||||
|
||||
if (argc > 1) strcpy(name,argv[1]);
|
||||
else {
|
||||
BLI_getwdN(name);
|
||||
@@ -713,4 +738,14 @@ void playanim(int argc, char **argv)
|
||||
}
|
||||
picture = picture->next;
|
||||
}
|
||||
#ifdef WITH_QUICKTIME
|
||||
#if defined (_WIN32) || defined (__APPLE__)
|
||||
if(G.have_quicktime) {
|
||||
ExitMovies();
|
||||
#ifdef _WIN32
|
||||
TerminateQTML();
|
||||
#endif /* _WIN32 */
|
||||
}
|
||||
#endif /* _WIN32 || __APPLE__ */
|
||||
#endif /* WITH_QUICKTIME */
|
||||
}
|
||||
|
@@ -116,6 +116,16 @@
|
||||
|
||||
#include "PIL_time.h"
|
||||
|
||||
#ifdef WITH_QUICKTIME
|
||||
#include "quicktime_export.h"
|
||||
#ifdef _WIN32
|
||||
#include <QTML.h>
|
||||
#endif /* _WIN32 */
|
||||
#if defined (_WIN32) || defined (__APPLE__)
|
||||
#include <Movies.h>
|
||||
#endif /* _WIN32 || __APPLE__ */
|
||||
#endif /* WITH_QUICKTIME */
|
||||
|
||||
/***/
|
||||
|
||||
void BIF_read_file(char *name)
|
||||
@@ -501,6 +511,18 @@ void exit_usiblender(void)
|
||||
|
||||
sound_exit_audio();
|
||||
|
||||
#if defined(_WIN32) || defined(__APPLE__)
|
||||
#ifdef WITH_QUICKTIME
|
||||
if(G.have_quicktime) {
|
||||
free_qtcodecdataExt();
|
||||
ExitMovies();
|
||||
#ifdef _WIN32
|
||||
TerminateQTML();
|
||||
#endif /* _WIN32 */
|
||||
}
|
||||
#endif /* WITH_QUICKTIME */
|
||||
#endif /* _WIN32 || __APPLE__ */
|
||||
|
||||
BPY_end_python();
|
||||
|
||||
if (!G.background) {
|
||||
|
@@ -761,7 +761,7 @@ void append_avi_codec(int frame)
|
||||
}
|
||||
|
||||
|
||||
int get_codec_settings(void)
|
||||
int get_avicodec_settings(void)
|
||||
{
|
||||
int ret_val = 0;
|
||||
AVICOMPRESSOPTIONS *aopts[1] = {&opts};
|
||||
|
Reference in New Issue
Block a user