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:
Diffstat (limited to 'source/blender/quicktime/apple/qtkit_export.m')
-rw-r--r--source/blender/quicktime/apple/qtkit_export.m20
1 files changed, 14 insertions, 6 deletions
diff --git a/source/blender/quicktime/apple/qtkit_export.m b/source/blender/quicktime/apple/qtkit_export.m
index 35f3629cb61..add280c6b64 100644
--- a/source/blender/quicktime/apple/qtkit_export.m
+++ b/source/blender/quicktime/apple/qtkit_export.m
@@ -41,6 +41,7 @@
#include "AUD_C-API.h"
#include "BKE_global.h"
+#include "BKE_main.h"
#include "BKE_scene.h"
#include "BKE_report.h"
@@ -118,9 +119,10 @@ static QuicktimeCodecTypeDesc qtVideoCodecList[] = {
{kMPEG4VisualCodecType, 10, "MPEG4"},
{kH263CodecType, 11, "H.263"},
{kH264CodecType, 12, "H.264"},
+ {kAnimationCodecType, 13, "Animation"},
{0,0,NULL}};
-static int qtVideoCodecCount = 12;
+static int qtVideoCodecCount = 13;
int quicktime_get_num_videocodecs() {
return qtVideoCodecCount;
@@ -208,7 +210,7 @@ void makeqtstring (RenderData *rd, char *string) {
char txt[64];
strcpy(string, rd->pic);
- BLI_path_abs(string, G.sce);
+ BLI_path_abs(string, G.main->name);
BLI_make_existing_file(string);
@@ -222,7 +224,7 @@ void filepath_qt(char *string, RenderData *rd) {
if (string==NULL) return;
strcpy(string, rd->pic);
- BLI_path_abs(string, G.sce);
+ BLI_path_abs(string, G.main->name);
BLI_make_existing_file(string);
@@ -587,6 +589,7 @@ int append_qt(struct RenderData *rd, int frame, int *pixels, int rectx, int rect
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSBitmapImageRep *blBitmapFormatImage;
NSImage *frameImage;
+ OSStatus err = noErr;
unsigned char *from_Ptr,*to_Ptr;
int y,from_i,to_i;
@@ -628,8 +631,7 @@ int append_qt(struct RenderData *rd, int frame, int *pixels, int rectx, int rect
if (qtexport->audioFile) {
UInt32 audioPacketsConverted;
/* Append audio */
- while (((double)qtexport->audioTotalExportedFrames / (double) qtexport->audioInputFormat.mSampleRate)
- < ((double)(frame - rd->sfra)) / (((double)rd->frs_sec) / rd->frs_sec_base)) {
+ while (qtexport->audioTotalExportedFrames < qtexport->audioLastFrame) {
qtexport->audioBufferList.mNumberBuffers = 1;
qtexport->audioBufferList.mBuffers[0].mNumberChannels = qtexport->audioOutputFormat.mChannelsPerFrame;
@@ -637,7 +639,7 @@ int append_qt(struct RenderData *rd, int frame, int *pixels, int rectx, int rect
qtexport->audioBufferList.mBuffers[0].mData = qtexport->audioOutputBuffer;
audioPacketsConverted = AUDIOOUTPUTBUFFERSIZE / qtexport->audioCodecMaxOutputPacketSize;
- AudioConverterFillComplexBuffer(qtexport->audioConverter, AudioConverterInputCallback,
+ err = AudioConverterFillComplexBuffer(qtexport->audioConverter, AudioConverterInputCallback,
NULL, &audioPacketsConverted, &qtexport->audioBufferList, qtexport->audioOutputPktDesc);
if (audioPacketsConverted) {
AudioFileWritePackets(qtexport->audioFile, false, qtexport->audioBufferList.mBuffers[0].mDataByteSize,
@@ -656,6 +658,12 @@ int append_qt(struct RenderData *rd, int frame, int *pixels, int rectx, int rect
}
+ else {
+ //Error getting audio packets
+ BKE_reportf(reports, RPT_ERROR, "Unable to get further audio packets from frame %i, error = 0x%x",qtexport->audioTotalExportedFrames,err);
+ break;
+ }
+
}
}
[pool drain];