Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Trying to understand (bugs in?) QTKitPlayer



I've discovered what I think are bugs in the QTKitPlayer sample code (<http://developer.apple.com/samplecode/QTKitPlayer/ QTKitPlayer.html>). Anyway, I'm trying to base an application off the sample code, so I'd like to understand what's going on if they aren't bugs and how to fix them if they are.

1. If I open a movie, the "Save" menu item is not active. Why is that? If have done a "Save As", the "Save" menu item becomes active, but it gives an error message.

2. The "Save" item *is* available when a document is created via the "Import" menu command! (It doesn't work, of course.)

3. If I try to close the window of an edited movie, and click "Save" in the dialog, I get an error.

4. Shouldn't the "openDocument:", "panel:shouldShowFilename:", and "openDocumentWithContentsOfFile:display:" methods be in a subclass of NSDocumentController rather than in MovieDocument? (As it stands, AVIs, MPEGs, and the like cannot be opened; they can only be "Imported", but only once you have already opened a movie.)

5. Why does "readFromFile:ofType:" have the following code:
if ([type isEqualTo:@"MovieDocumentData"])
{
NSData *data = [NSData dataWithContentsOfFile:fileName];
[self setMovie:[QTMovie movieWithData:data error:nil]];
}
From what I can tell, this means the entire movie file is read into memory.


A related question: what's the whole "MovieDocument" and "MovieDocumentData" distinction about anyway? They are both associated with the ".mov" extension, but the OSTypes are different and one is an editor while the other is a viewer.

6. As far as I can tell, the "initWithMovie:" method of MovieDocument never gets called.

7. Shouldn't "application:openFile:" be in the application delegate class?

8. I'm assuming that when a QuickTime movie is opened, the "Save" menu item should be available, but when a file is imported only the "Save As" item should be. How would I get that kind of behavior?

Derrick

_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-api/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.