ok,
i just printed the number in the wrong string format for the quicktime clip from disk....
i went
Code:
printf("on load: %f\n", [[mQTMovie tracks] count]);
instead of
Code:
printf("on load: %d\n", [[mQTMovie tracks] count]);
which i didn't think would make a difference... maybe i'm too used to java *shudder*...
however, this line
Code:
printf("QTGraphics tracks: %d\n", [[mQTGraphics tracks] count]);
prints out 0 tracks....
i think there is something wrong with the way it was initialized but i can't figure out what's wrong...
i initialize it like this:
Code:
mQTGraphics = [QTMovie movie];
[mQTGraphics setAttribute: [NSNumber numberWithBool: YES] forKey: QTMovieEditableAttribute];
that should be fine right? i'm just grabbing an empty QTMovie and making it editable
then i add images to it
Code:
NSBitmapImageRep *image = [self getCurrentFrame];
QTTime time = QTMakeTime(100, 10);
NSDictionary *attrs = [NSDictionary dictionaryWithObject:@"png " forKey:QTAddImageCodecType];
NSImage *img = [[NSImage alloc] initWithData:[image TIFFRepresentation]];
[mQTMovieExport addImage:img forDuration:time withAttributes:attrs];
[image release];
Surely that should work... it worked for the other QTMovie that was initialized like this:
Code:
mQTMovieExport = [[QTMovie alloc] initToWritableFile:[savePanel filename] error:nil];
what's so different about the two methods of initializing that one will add images and the other wont?