 |
 |
NSMovie problem
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: Norfolk, Va
Status:
Offline
|
|
I have a window with an NSMovieView in it and a controller object which runs the following method. For some reason, nothing happens. I think I've tracked it down in the documentation to this remark (NSMovie):
"If initWithURL:byReference: is able to create a movie representation, it returns self. Otherwise, the receiver is released and nil is returned."
In my debug window, movie is 0x0, nil. What am I doing wrong?
Code:
NSURL *url = [NSURL URLWithString:@"http://www.apple.com/trailers/disney/finding_nemo/trailer/images/smallrr.mov"];
NSMovie *movie = [[NSMovie alloc] initWithURL:url byReference:YES];
[movieViewer setMovie:movie];
I've checked the connections, names, and byReference has no effect. Any ideas? I'd like to have the same streaming effect that is in a browser window when you stream a movie.
Thanks
|
|
you are not your signature
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: Norfolk, Va
Status:
Offline
|
|
This is really strange: it works intermittently now, unpredictably. Sometimes after a long delay I'll get a video, not yet when I've been debugging. Most of the time nothing, though. Could it be I need to give the download some time to initiate before putting it in an NSMovie?
|
|
you are not your signature
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: Norfolk, Va
Status:
Offline
|
|
As for that, I've been able to fix it by force-loading anotehr movie first.
Another question: Can anybody tell me how to save an NSMovie that's been downloaded from the internet without using carbon Quicktime API calls? I'm not comfortable outside of Cocoa, and NSMovie only has one method to get the movie data, QTMovie which returns a pointer. From there the docs say to use the quicktime APIs, I think functions like createMovieFile(), addMovieResource(), and closeMovieFile(), but surely Safari or OmniWeb doesn't use these calls to save downloaded movies?
|
|
you are not your signature
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: Norfolk, Va
Status:
Offline
|
|
Whoa, there's about 40 incredibly enticing methods in NSURL and NSURLHandle, starting with loadResourceDataNotifyingClient:usingCache:
aaaggh!!! <brain bursts>
|
|
you are not your signature
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|