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.m56
1 files changed, 29 insertions, 27 deletions
diff --git a/source/blender/quicktime/apple/qtkit_export.m b/source/blender/quicktime/apple/qtkit_export.m
index bb87fe21c49..e0858cd5ec2 100644
--- a/source/blender/quicktime/apple/qtkit_export.m
+++ b/source/blender/quicktime/apple/qtkit_export.m
@@ -143,7 +143,7 @@ QuicktimeCodecTypeDesc* quicktime_get_videocodecType_desc(int indexValue)
int quicktime_rnatmpvalue_from_videocodectype(int codecType)
{
int i;
- for (i=0;i<qtVideoCodecCount;i++) {
+ for (i = 0; i < qtVideoCodecCount; i++) {
if (qtVideoCodecList[i].codecType == codecType)
return qtVideoCodecList[i].rnatmpvalue;
}
@@ -154,12 +154,12 @@ int quicktime_rnatmpvalue_from_videocodectype(int codecType)
int quicktime_videocodecType_from_rnatmpvalue(int rnatmpvalue)
{
int i;
- for (i=0;i<qtVideoCodecCount;i++) {
+ for (i = 0; i < qtVideoCodecCount; i++) {
if (qtVideoCodecList[i].rnatmpvalue == rnatmpvalue)
return qtVideoCodecList[i].codecType;
}
- return 0;
+ return 0;
}
/* Audio codec */
@@ -188,7 +188,7 @@ QuicktimeCodecTypeDesc* quicktime_get_audiocodecType_desc(int indexValue)
int quicktime_rnatmpvalue_from_audiocodectype(int codecType)
{
int i;
- for (i=0;i<qtAudioCodecCount;i++) {
+ for (i = 0; i < qtAudioCodecCount; i++) {
if (qtAudioCodecList[i].codecType == codecType)
return qtAudioCodecList[i].rnatmpvalue;
}
@@ -199,12 +199,12 @@ int quicktime_rnatmpvalue_from_audiocodectype(int codecType)
int quicktime_audiocodecType_from_rnatmpvalue(int rnatmpvalue)
{
int i;
- for (i=0;i<qtAudioCodecCount;i++) {
+ for (i = 0; i < qtAudioCodecCount; i++) {
if (qtAudioCodecList[i].rnatmpvalue == rnatmpvalue)
return qtAudioCodecList[i].codecType;
}
- return 0;
+ return 0;
}
@@ -212,7 +212,7 @@ static NSString *stringWithCodecType(int codecType)
{
char str[5];
- *((int*)str) = EndianU32_NtoB(codecType);
+ *((int *)str) = EndianU32_NtoB(codecType);
str[4] = 0;
return [NSString stringWithCString:str encoding:NSASCIIStringEncoding];
@@ -235,7 +235,7 @@ void makeqtstring (RenderData *rd, char *string)
void filepath_qt(char *string, RenderData *rd)
{
- if (string==NULL) return;
+ if (string == NULL) return;
strcpy(string, rd->pic);
BLI_path_abs(string, G.main->name);
@@ -313,8 +313,8 @@ int start_qt(struct Scene *scene, struct RenderData *rd, int rectx, int recty, R
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSError *error;
char name[1024];
- int success= 1;
- OSStatus err=noErr;
+ int success = 1;
+ OSStatus err = noErr;
if(qtexport == NULL) qtexport = MEM_callocN(sizeof(QuicktimeExport), "QuicktimeExport");
@@ -323,7 +323,7 @@ int start_qt(struct Scene *scene, struct RenderData *rd, int rectx, int recty, R
/* Check first if the QuickTime 7.2.1 initToWritableFile: method is available */
if ([[[[QTMovie alloc] init] autorelease] respondsToSelector:@selector(initToWritableFile:error:)] != YES) {
BKE_report(reports, RPT_ERROR, "\nUnable to create quicktime movie, need Quicktime rev 7.2.1 or later");
- success= 0;
+ success = 0;
}
else {
makeqtstring(rd, name);
@@ -543,7 +543,7 @@ int start_qt(struct Scene *scene, struct RenderData *rd, int rectx, int recty, R
if(qtexport->movie == nil) {
BKE_report(reports, RPT_ERROR, "Unable to create quicktime movie.");
- success= 0;
+ success = 0;
if (qtexport->filename) [qtexport->filename release];
qtexport->filename = nil;
if (qtexport->audioFileName) [qtexport->audioFileName release];
@@ -561,19 +561,21 @@ int start_qt(struct Scene *scene, struct RenderData *rd, int rectx, int recty, R
/* specifying the codec attributes : try to retrieve them from render data first*/
if (rd->qtcodecsettings.codecType) {
- qtexport->frameAttributes = [NSDictionary dictionaryWithObjectsAndKeys:
- stringWithCodecType(rd->qtcodecsettings.codecType),
- QTAddImageCodecType,
- [NSNumber numberWithLong:((rd->qtcodecsettings.codecSpatialQuality)*codecLosslessQuality)/100],
- QTAddImageCodecQuality,
- nil];
+ qtexport->frameAttributes = [
+ NSDictionary dictionaryWithObjectsAndKeys:
+ stringWithCodecType(rd->qtcodecsettings.codecType),
+ QTAddImageCodecType,
+ [NSNumber numberWithLong:((rd->qtcodecsettings.codecSpatialQuality)*codecLosslessQuality)/100],
+ QTAddImageCodecQuality,
+ nil];
}
else {
- qtexport->frameAttributes = [NSDictionary dictionaryWithObjectsAndKeys:@"jpeg",
- QTAddImageCodecType,
- [NSNumber numberWithLong:codecHighQuality],
- QTAddImageCodecQuality,
- nil];
+ qtexport->frameAttributes = [
+ NSDictionary dictionaryWithObjectsAndKeys:@"jpeg",
+ QTAddImageCodecType,
+ [NSNumber numberWithLong:codecHighQuality],
+ QTAddImageCodecQuality,
+ nil];
}
[qtexport->frameAttributes retain];
@@ -624,8 +626,8 @@ int append_qt(struct RenderData *rd, int start_frame, int frame, int *pixels, in
return 0;
}
- from_Ptr = (unsigned char*)pixels;
- to_Ptr = (unsigned char*)[blBitmapFormatImage bitmapData];
+ from_Ptr = (unsigned char *)pixels;
+ to_Ptr = (unsigned char *)[blBitmapFormatImage bitmapData];
for (y = 0; y < recty; y++) {
to_i = (recty-y-1)*rectx;
from_i = y*rectx;
@@ -647,7 +649,7 @@ int append_qt(struct RenderData *rd, int start_frame, int frame, int *pixels, in
if (qtexport->audioFile) {
UInt32 audioPacketsConverted;
/* Append audio */
- while (qtexport->audioTotalExportedFrames < qtexport->audioLastFrame) {
+ while (qtexport->audioTotalExportedFrames < qtexport->audioLastFrame) {
qtexport->audioBufferList.mNumberBuffers = 1;
qtexport->audioBufferList.mBuffers[0].mNumberChannels = qtexport->audioOutputFormat.mChannelsPerFrame;
@@ -683,7 +685,7 @@ int append_qt(struct RenderData *rd, int start_frame, int frame, int *pixels, in
}
}
- [pool drain];
+ [pool drain];
return 1;
}