From aa8488421f230bf4b4f6e84370085ad465a6f2b3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 21 Sep 2013 10:46:58 +0000 Subject: style cleanup: whitespace & odd indentation --- source/blender/quicktime/apple/qtkit_export.m | 14 ++++++-------- source/blender/quicktime/apple/qtkit_import.m | 28 +++++++++++++-------------- 2 files changed, 20 insertions(+), 22 deletions(-) (limited to 'source/blender/quicktime') diff --git a/source/blender/quicktime/apple/qtkit_export.m b/source/blender/quicktime/apple/qtkit_export.m index 7b42c89d936..8cf91e44c77 100644 --- a/source/blender/quicktime/apple/qtkit_export.m +++ b/source/blender/quicktime/apple/qtkit_export.m @@ -317,7 +317,7 @@ int start_qt(struct Scene *scene, struct RenderData *rd, int rectx, int recty, R int success = 1; OSStatus err = noErr; - if(qtexport == NULL) qtexport = MEM_callocN(sizeof(QuicktimeExport), "QuicktimeExport"); + if (qtexport == NULL) qtexport = MEM_callocN(sizeof(QuicktimeExport), "QuicktimeExport"); [QTMovie enterQTKitOnThread]; @@ -476,7 +476,7 @@ int start_qt(struct Scene *scene, struct RenderData *rd, int rectx, int recty, R err = AudioFileCreateWithURL(outputFileURL, audioFileType, &qtexport->audioOutputFormat, kAudioFileFlags_EraseFile, &qtexport->audioFile); CFRelease(outputFileURL); - if(err) + if (err) BKE_report(reports, RPT_ERROR, "\nQuicktime: unable to create temporary audio file. Format error ?"); else { err = AudioConverterNew(&qtexport->audioInputFormat, &qtexport->audioOutputFormat, &qtexport->audioConverter); @@ -542,7 +542,7 @@ int start_qt(struct Scene *scene, struct RenderData *rd, int rectx, int recty, R else qtexport->movie = [[QTMovie alloc] initToWritableFile:qtexport->filename error:&error]; - if(qtexport->movie == nil) { + if (qtexport->movie == nil) { BKE_report(reports, RPT_ERROR, "Unable to create quicktime movie."); success = 0; if (qtexport->filename) [qtexport->filename release]; @@ -749,13 +749,11 @@ void end_qt(void) if (audioTmpMovie) { NSArray *audioTracks = [audioTmpMovie tracksOfMediaType:QTMediaTypeSound]; QTTrack *audioTrack = nil; - if( [audioTracks count] > 0 ) - { + if ( [audioTracks count] > 0 ) { audioTrack = [audioTracks objectAtIndex:0]; } - if( audioTrack ) - { + if (audioTrack) { QTTimeRange totalRange; totalRange.time = QTZeroTime; totalRange.duration = [[audioTmpMovie attributeForKey:QTMovieDurationAttribute] QTTimeValue]; @@ -798,7 +796,7 @@ void end_qt(void) [QTMovie exitQTKitOnThread]; - if(qtexport) { + if (qtexport) { MEM_freeN(qtexport); qtexport = NULL; } diff --git a/source/blender/quicktime/apple/qtkit_import.m b/source/blender/quicktime/apple/qtkit_import.m index bee26c5348e..fbe4733c3b1 100644 --- a/source/blender/quicktime/apple/qtkit_import.m +++ b/source/blender/quicktime/apple/qtkit_import.m @@ -128,7 +128,7 @@ void free_anim_quicktime(struct anim *anim) if (anim == NULL) return; if (anim->qtime == NULL) return; - if(anim->qtime->ibuf) + if (anim->qtime->ibuf) IMB_freeImBuf(anim->qtime->ibuf); [anim->qtime->media release]; @@ -136,7 +136,7 @@ void free_anim_quicktime(struct anim *anim) [QTMovie exitQTKitOnThread]; - if(anim->qtime) MEM_freeN (anim->qtime); + if (anim->qtime) MEM_freeN (anim->qtime); anim->qtime = NULL; @@ -289,7 +289,7 @@ ImBuf *qtime_fetchibuf (struct anim *anim, int position) } if (frameImage == nil) { - if(QTIME_DEBUG) printf ("Error reading frame from Quicktime"); + if (QTIME_DEBUG) printf ("Error reading frame from Quicktime"); [pool drain]; return NULL; } @@ -312,7 +312,7 @@ int startquicktime(struct anim *anim) anim->qtime = MEM_callocN(sizeof(QuicktimeMovie),"animqt"); if (anim->qtime == NULL) { - if(QTIME_DEBUG) printf("Can't alloc qtime: %s\n", anim->name); + if (QTIME_DEBUG) printf("Can't alloc qtime: %s\n", anim->name); return -1; } @@ -329,9 +329,9 @@ int startquicktime(struct anim *anim) anim->qtime->movie = [QTMovie movieWithAttributes:attributes error:NULL]; if (!anim->qtime->movie) { - if(QTIME_DEBUG) printf("qt: bad movie %s\n", anim->name); + if (QTIME_DEBUG) printf("qt: bad movie %s\n", anim->name); MEM_freeN(anim->qtime); - if(QTIME_DEBUG) printf("qt: can't load %s\n", anim->name); + if (QTIME_DEBUG) printf("qt: can't load %s\n", anim->name); [QTMovie exitQTKitOnThread]; [pool drain]; return -1; @@ -342,11 +342,11 @@ int startquicktime(struct anim *anim) videoTracks = [anim->qtime->movie tracksOfMediaType:QTMediaTypeVideo]; - if([videoTracks count] == 0) { - if(QTIME_DEBUG) printf("qt: no video tracks for movie %s\n", anim->name); + if ([videoTracks count] == 0) { + if (QTIME_DEBUG) printf("qt: no video tracks for movie %s\n", anim->name); [anim->qtime->movie release]; MEM_freeN(anim->qtime); - if(QTIME_DEBUG) printf("qt: can't load %s\n", anim->name); + if (QTIME_DEBUG) printf("qt: can't load %s\n", anim->name); [QTMovie exitQTKitOnThread]; [pool drain]; return -1; @@ -360,8 +360,8 @@ int startquicktime(struct anim *anim) anim->x = frameSize.width; anim->y = frameSize.height; - if(anim->x == 0 && anim->y == 0) { - if(QTIME_DEBUG) printf("qt: error, no dimensions\n"); + if (anim->x == 0 && anim->y == 0) { + if (QTIME_DEBUG) printf("qt: error, no dimensions\n"); free_anim_quicktime(anim); [pool drain]; return -1; @@ -398,12 +398,12 @@ int imb_is_a_quicktime(char *name) int result; NSAutoreleasePool *pool; - if(!G.have_quicktime) return 0; + if (!G.have_quicktime) return 0; pool = [[NSAutoreleasePool alloc] init]; // don't let quicktime image import handle these - if( BLI_testextensie(name, ".swf") || + if (BLI_testextensie(name, ".swf") || BLI_testextensie(name, ".txt") || BLI_testextensie(name, ".mpg") || BLI_testextensie(name, ".wav") || @@ -437,7 +437,7 @@ ImBuf *imb_quicktime_decode(unsigned char *mem, int size, int flags) NSBitmapImageRep *blBitmapFormatImageRGB,*blBitmapFormatImageRGBA; NSAutoreleasePool *pool; - if(!G.have_quicktime) + if (!G.have_quicktime) return NULL; pool = [[NSAutoreleasePool alloc] init]; -- cgit v1.2.3