Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Plisson <damien.plisson@yahoo.fr>2009-11-09 20:06:48 +0300
committerDamien Plisson <damien.plisson@yahoo.fr>2009-11-09 20:06:48 +0300
commit9c0cdd2501eda811829ec9a14cf3b9d1a89966aa (patch)
treebdf221dfe5f9074d28fbcb66f510b2356178efd9 /source/blender/quicktime
parent196ecb7babad8cb865e405e6f696c1c2cfaefdbd (diff)
- fix Cocoa window setOrder function to maintain focus on a blender window (e.g. ensure the blender window gets the focus when the user presses ESC to move back the render window)
- QuickTime export fixes. Note that QuickTime export still crashes because it tries to open a "codec settings" dialog from the rendering background thread (and not the main/UI thread). One quick fix may be to move the movie export initialization out of the render thread back into the operator function. But a cleaner way would be to get rid of such a carbon/win32 dialog and place the codec settings inside blender interface (additional fields in the output panel as it is currently the case for other file formats ?).
Diffstat (limited to 'source/blender/quicktime')
-rw-r--r--source/blender/quicktime/apple/quicktime_export.c21
-rw-r--r--source/blender/quicktime/quicktime_export.h2
2 files changed, 13 insertions, 10 deletions
diff --git a/source/blender/quicktime/apple/quicktime_export.c b/source/blender/quicktime/apple/quicktime_export.c
index de8c4179132..a2727963032 100644
--- a/source/blender/quicktime/apple/quicktime_export.c
+++ b/source/blender/quicktime/apple/quicktime_export.c
@@ -317,7 +317,7 @@ static void QT_StartAddVideoSamplesToMedia (const Rect *trackFrame, int rectx, i
k32ARGBPixelFormat,
trackFrame,
NULL, NULL, 0,
- (unsigned char *)qtexport->ibuf->rect,
+ (Ptr)qtexport->ibuf->rect,
rectx * 4 );
CheckError (err, "NewGWorldFromPtr error");
@@ -438,7 +438,7 @@ void makeqtstring (RenderData *rd, char *string) {
}
-void start_qt(struct RenderData *rd, int rectx, int recty) {
+void start_qt(struct Scene *scene, struct RenderData *rd, int rectx, int recty) {
OSErr err = noErr;
char name[2048];
@@ -460,7 +460,7 @@ void start_qt(struct RenderData *rd, int rectx, int recty) {
qtdata = MEM_callocN(sizeof(QuicktimeComponentData), "QuicktimeCodecDataExt");
- if(rd->qtcodecdata == NULL && rd->qtcodecdata->cdParms == NULL) {
+ if(rd->qtcodecdata == NULL || rd->qtcodecdata->cdParms == NULL) {
get_qtcodec_settings(rd);
} else {
qtdata->theComponent = OpenDefaultComponent(StandardCompressionType, StandardCompressionSubType);
@@ -484,7 +484,7 @@ void start_qt(struct RenderData *rd, int rectx, int recty) {
/* do something? */
}
close(myFile);
- err = FSPathMakeRef(theFullPath, &myRef, 0);
+ err = FSPathMakeRef((const UInt8 *)theFullPath, &myRef, 0);
CheckError(err, "FsPathMakeRef error");
err = FSGetCatalogInfo(&myRef, kFSCatInfoNone, NULL, NULL, &qtexport->theSpec, NULL);
CheckError(err, "FsGetCatalogInfoRef error");
@@ -574,10 +574,13 @@ static void check_renderbutton_framerate(RenderData *rd)
if( (rd->frs_sec == 24 || rd->frs_sec == 30 || rd->frs_sec == 60) &&
(qtdata->gTemporalSettings.frameRate == 1571553 ||
qtdata->gTemporalSettings.frameRate == 1964113 ||
- qtdata->gTemporalSettings.frameRate == 3928227)) {;} else
- qtdata->gTemporalSettings.frameRate =
- (rd->frs_sec << 16) / rd->frs_sec_base ;
-
+ qtdata->gTemporalSettings.frameRate == 3928227)) {;}
+ else {
+ if (rd->frs_sec_base > 0)
+ qtdata->gTemporalSettings.frameRate =
+ (rd->frs_sec << 16) / rd->frs_sec_base ;
+ }
+
err = SCSetInfo(qtdata->theComponent, scTemporalSettingsType, &qtdata->gTemporalSettings);
CheckError( err, "SCSetInfo error" );
@@ -634,7 +637,7 @@ int get_qtcodec_settings(RenderData *rd)
check_renderbutton_framerate(rd);
- // put up the dialog box
+ // put up the dialog box - it needs to be called from the main thread
err = SCRequestSequenceSettings(qtdata->theComponent);
if (err == scUserCancelled) {
diff --git a/source/blender/quicktime/quicktime_export.h b/source/blender/quicktime/quicktime_export.h
index b5c0dcff232..4afcebab7bd 100644
--- a/source/blender/quicktime/quicktime_export.h
+++ b/source/blender/quicktime/quicktime_export.h
@@ -36,7 +36,7 @@
// quicktime movie output functions
struct RenderData;
-void start_qt(struct RenderData *rd, int rectx, int recty); //for movie handle (BKE writeavi.c now)
+void start_qt(struct Scene *scene, struct RenderData *rd, int rectx, int recty); //for movie handle (BKE writeavi.c now)
void append_qt(struct RenderData *rd, int frame, int *pixels, int rectx, int recty);
void end_qt(void);