diff options
author | Damien Plisson <damien.plisson@yahoo.fr> | 2009-11-18 18:01:59 +0300 |
---|---|---|
committer | Damien Plisson <damien.plisson@yahoo.fr> | 2009-11-18 18:01:59 +0300 |
commit | a57730875d30eaca5f73057c524d0f9180b5307b (patch) | |
tree | 25b036bd70646d9551945b01008e04db8478f89b /source/blender/quicktime/apple/qtkit_import.m | |
parent | 9e5305f67e2e094b0256af9061e514ad9a2358e7 (diff) |
Quicktime for Cocoa : export part
Following the quicktime import port, here is the movie export feature.
The codec selection remains to be implemented in the ui (render panel).
So the settings are now blocked on codec=jpeg, quality=max.
Diffstat (limited to 'source/blender/quicktime/apple/qtkit_import.m')
-rw-r--r-- | source/blender/quicktime/apple/qtkit_import.m | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/quicktime/apple/qtkit_import.m b/source/blender/quicktime/apple/qtkit_import.m index 2da66e6daa6..8cdf5a4e89b 100644 --- a/source/blender/quicktime/apple/qtkit_import.m +++ b/source/blender/quicktime/apple/qtkit_import.m @@ -98,7 +98,8 @@ int anim_is_quicktime (char *name) pool = [[NSAutoreleasePool alloc] init]; - if([QTMovie canInitWithFile:[NSString stringWithUTF8String:name]]) + if([QTMovie canInitWithFile:[NSString stringWithCString:name + encoding:[NSString defaultCStringEncoding]]]) { [pool drain]; return true; @@ -163,7 +164,7 @@ static ImBuf * nsImageToiBuf(NSImage *sourceImage, int width, int height) for (y = 0; y < height; y++) { to_i = (height-y-1)*width; from_i = y*width; - memcpy(toIBuf+4*to_i, rasterRGB+4*from_i, 4*width); + memcpy(toIBuf+4*to_i, rasterRGB+4*from_i, 4*width); } } else { @@ -225,8 +226,8 @@ static ImBuf * nsImageToiBuf(NSImage *sourceImage, int width, int height) /*Copy the image to ibuf, flipping it vertically*/ toIBuf = (uchar*)ibuf->rect; - for (x = 0; x < width; x++) { - for (y = 0; y < height; y++) { + for (y = 0; y < height; y++) { + for (x = 0; x < width; x++) { to_i = (height-y-1)*width + x; from_i = y*width + x; @@ -300,7 +301,8 @@ int startquicktime (struct anim *anim) pool = [[NSAutoreleasePool alloc] init]; attributes = [NSDictionary dictionaryWithObjectsAndKeys: - [NSString stringWithUTF8String:anim->name], QTMovieFileNameAttribute, + [NSString stringWithCString:anim->name + encoding:[NSString defaultCStringEncoding]], QTMovieFileNameAttribute, [NSNumber numberWithBool:NO], QTMovieEditableAttribute, nil]; @@ -332,7 +334,7 @@ int startquicktime (struct anim *anim) [anim->qtime->media retain]; - frameSize = [[anim->qtime->movie attributeForKey:QTMovieCurrentSizeAttribute] sizeValue]; + frameSize = [[anim->qtime->movie attributeForKey:QTMovieNaturalSizeAttribute] sizeValue]; anim->x = frameSize.width; anim->y = frameSize.height; |