Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > NSMovie problem

NSMovie problem
Thread Tools
Mac Elite
Join Date: Sep 2000
Location: Norfolk, Va
Status: Offline
Reply With Quote
May 13, 2003, 04:03 PM
 
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
     
Gametes  (op)
Mac Elite
Join Date: Sep 2000
Location: Norfolk, Va
Status: Offline
Reply With Quote
May 14, 2003, 09:16 AM
 
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
     
Gametes  (op)
Mac Elite
Join Date: Sep 2000
Location: Norfolk, Va
Status: Offline
Reply With Quote
Jun 9, 2003, 01:46 PM
 
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
     
Gametes  (op)
Mac Elite
Join Date: Sep 2000
Location: Norfolk, Va
Status: Offline
Reply With Quote
Jun 9, 2003, 02:09 PM
 
Whoa, there's about 40 incredibly enticing methods in NSURL and NSURLHandle, starting with loadResourceDataNotifyingClient:usingCache:

aaaggh!!! <brain bursts>
you are not your signature
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:33 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2