uiBut *uiDefIconButS(uiBlock *block, int type, int retval, int icon, short x1, short y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, char *tip);
uiBut *uiDefIconButC(uiBlock *block, int type, int retval, int icon, short x1, short y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, char *tip);
+uiBut *uiDefIconTextBut(uiBlock *block, int type, int retval, int icon, char *str, short x1, short y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, char *tip);
+
+uiBut *uiDefIconTextButF(uiBlock *block, int type, int retval, int icon, char *str, short x1, short y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, char *tip);
+uiBut *uiDefIconTextButI(uiBlock *block, int type, int retval, int icon, char *str, short x1, short y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, char *tip);
+uiBut *uiDefIconTextButS(uiBlock *block, int type, int retval, int icon, char *str, short x1, short y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, char *tip);
+uiBut *uiDefIconTextButC(uiBlock *block, int type, int retval, int icon, char *str, short x1, short y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, char *tip);
+
typedef void (*uiIDPoinFuncFP) (char *str, struct ID **idpp);
void uiDefIDPoinBut(struct uiBlock *block,
uiIDPoinFuncFP func, int retval, char *str,
typedef uiBlock* (*uiBlockFuncFP) (void *arg1);
void uiDefBlockBut(uiBlock *block, uiBlockFuncFP func, void *func_arg1, char *str, short x1, short y1, short x2, short y2, char *tip);
+void uiDefIconBlockBut(uiBlock *block, uiBlockFuncFP func, void *func_arg1, int icon, short x1, short y1, short x2, short y2, char *tip);
+
void uiDefKeyevtButS(uiBlock *block, int retval, char *str, short x1, short y1, short x2, short y2, short *spoin, char *tip);
void uiAutoBlock(struct uiBlock *block,
void end_avi_codec(void);
int get_avicodec_settings(void);
+extern int have_avicodec;
+extern char avicdname[128];
#endif
#include <TextUtils.h>
#include <Movies.h>
#include <QuicktimeComponents.h>
+#include <MoviesFormat.h>
#endif /* _WIN32 */
#ifdef __APPLE__
static int sframe;
-int have_qtcodec;
+int have_qtcodec;
+char qtcdname[64];
/************************************************************
* *
int get_qtcodec_settings(void)
{
OSErr err = noErr;
-// Component c = 0;
-// ComponentDescription cd;
+ Component c = 0;
+ ComponentDescription cd;
+ CodecInfo ci;
+
+ cd.componentType = StandardCompressionType;
+ cd.componentSubType = StandardCompressionSubType;
+ cd.componentManufacturer = 0;
+ cd.componentFlags = 0;
+ cd.componentFlagsMask = 0;
-// cd.componentType = StandardCompressionType;
-// cd.componentSubType = StandardCompressionSubType;
-// cd.componentManufacturer = 0;
-// cd.componentFlags = 0;
-// cd.componentFlagsMask = 0;
-Handle *theText;
if(qcdx == NULL) {
qcdx = MEM_callocN(sizeof(QuicktimeCodecDataExt), "QuicktimeCodecDataExt");
// configure the standard image compression dialog box
if (qcdx->theComponent == NULL) {
- qcdx->theComponent = OpenDefaultComponent(StandardCompressionType, StandardCompressionSubType);
-// c = FindNextComponent(c, &cd);
-// qcdx->theComponent = OpenComponent(c);
+// qcdx->theComponent = OpenDefaultComponent(StandardCompressionType, StandardCompressionSubType);
+ c = FindNextComponent(c, &cd);
+ qcdx->theComponent = OpenComponent(c);
- qcdx->gSpatialSettings.codecType = nil;
+// qcdx->gSpatialSettings.codecType = nil;
qcdx->gSpatialSettings.codec = anyCodec;
// qcdx->gSpatialSettings.depth;
qcdx->gSpatialSettings.spatialQuality = codecMaxQuality;
qcdx->gTemporalSettings.temporalQuality = codecMaxQuality;
// qcdx->gTemporalSettings.frameRate;
- qcdx->gTemporalSettings.keyFrameRate = 24;
+ qcdx->gTemporalSettings.keyFrameRate = 25;
qcdx->aDataRateSetting.dataRate = 90 * 1024;
// qcdx->aDataRateSetting.frameDuration;
}
check_renderbutton_framerate();
-
+
// put up the dialog box
err = SCRequestSequenceSettings(qcdx->theComponent);
- if (err == scUserCancelled) {
+
+ if (err == scUserCancelled) {
G.afbreek = 1;
return 0;
}
SCGetInfo(qcdx->theComponent, scSpatialSettingsType, &qcdx->gSpatialSettings);
SCGetInfo(qcdx->theComponent, scDataRateSettingsType, &qcdx->aDataRateSetting);
-//GraphicsExportGetSettingsAsText (qcdx->theComponent,theText );
-
-//printf("%s\n", theText);
+ GetCodecInfo (&ci, qcdx->gSpatialSettings.codecType, 0);
+ sprintf(qtcdname,"Codec: %s", p2cstr(ci.typeName));
// framerate jugglin'
void makeqtstring (char *string); //for playanim.c
extern int have_qtcodec;
+extern char qtcdname[64];
#endif //(_WIN32) || (__APPLE__)
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");
+ if(!have_qtcodec)
+ uiDefBut(block, LABEL, 0, "Codec: undefined", 892,yofs+42,225,20, 0, 0, 0, 0, 0, "");
+ else
+ uiDefBut(block, LABEL, 0, qtcdname, 892,yofs+42,225,20, 0, 0, 0, 0, 0, "");
+ uiDefBut(block, BUT,B_SELECTCODEC, "Set codec", 892,yofs,112,20, 0, 0, 0, 0, 0, "Set codec settings for Quicktime");
#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");
#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");
+ if(!have_avicodec)
+ uiDefBut(block, LABEL, 0, "Codec: not set.", 892,yofs+42,225,20, 0, 0, 0, 0, 0, "");
+ else
+ uiDefBut(block, LABEL, 0, avicdname, 892,yofs+42,225,20, 0, 0, 0, 0, 0, "");
+ uiDefBut(block, BUT,B_SELECTCODEC, "Set codec", 892,yofs,112,20, 0, 0, 0, 0, 0, "Set codec settings for AVI");
}
} 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");
U.fontsize= 12;
U.encoding= 0;
sprintf(U.fontname, ".bfont.ttf");
- if( FTF_SetFont(".bfont.ttf", 12) ) {
- FTF_SetLanguage("en");
- FTF_SetEncoding("ASCII");
- G.ui_international = TRUE;
- } else {
- G.ui_international = FALSE;
- }
}
*/
-
if(U.transopts & TR_ALL)
set_ML_interface_font();
else
// the output video stream
AVICOMPRESSOPTIONS opts;
+char avicdname[128];
+int have_avicodec= 0;
static int sframe;
static PAVIFILE pfile = NULL;
*/
*lpcbFormat = sizeof(BITMAPINFOHEADER);
-
+
return AVIERR_OK;
}
AVICOMPRESSOPTIONS *aopts[1] = {&opts};
AviCodecData *acd = G.scene->r.avicodecdata;
static PAVISTREAM psdummy;
+ HIC hic;
+ ICINFO icinfo;
acd_to_opts(G.scene->r.avicodecdata);
} else {
if (!AVISaveOptions(NULL,
ICMF_CHOOSE_KEYFRAME | ICMF_CHOOSE_DATARATE,
+// ICMF_CHOOSE_ALLCOMPRESSORS,
1,
&psdummy,
(LPAVICOMPRESSOPTIONS *) &aopts))
{
ret_val = 1;
} else {
+ have_avicodec = 1;
+
+ if ((hic=ICOpen(ICTYPE_VIDEO,opts.fccHandler,ICMODE_QUERY))!=NULL) {
+ icinfo.dwSize=sizeof(ICINFO);
+ if (ICGetInfo(hic,&icinfo,sizeof(ICINFO))) {
+ WideCharToMultiByte(CP_ACP,0,icinfo.szDescription,-1,avicdname,128,NULL,NULL);
+ } else
+ sprintf(avicdname, "undefined");
+ if (ICClose(hic)!=ICERR_OK)
+ return 0;
+ } else {
+ sprintf(avicdname, "Full Frames (Uncompressed)"); //heh, nasty
+ }
+
if (acd) {
free_avicodecdata(acd);
} else {