Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

fernandovalente

macrumors 6502
Original poster
Code:
NSDictionary *att = [NSDictionary dictionaryWithObjectsAndKeys:[NSURL URLWithString:@"http://216.218.147.60:9014"], QTMovieURLAttribute, [NSNumber numberWithBool:YES], QTMovieOpenForPlaybackAttribute, nil];
I wrote this code, but I need to make this app run on Leopard. What should I use instead of QTMovieOpenForPlaybackAttribute?
 
QTMovieOpenForPlaybackAttribute on 10.6 is really just @"QTMovieOpenForPlaybackAttribute" so you can plug that in directly. For 10.5 there is no alternative so it shouldn't matter if you pass in an attribute that QTMovie doesn't understand.
 
QTMovieOpenForPlaybackAttribute on 10.6 is really just @"QTMovieOpenForPlaybackAttribute" so you can plug that in directly. For 10.5 there is no alternative so it shouldn't matter if you pass in an attribute that QTMovie doesn't understand.

Tried this:

Code:
NSDictionary *att = [NSDictionary dictionaryWithObjectsAndKeys:[NSURL URLWithString:@"http://216.218.147.60:9014"], QTMovieURLAttribute, [NSNumber numberWithBool:YES], nil];

Got this error:

Code:
2010-02-21 23:17:33.957 Radio Tool X[23654:a0f] +[NSDictionary dictionaryWithObjectsAndKeys:]: second object of each pair must be non-nil.  Or, did you forget to nil-terminate your parameter list?

The movie also won't play. How may I solve that please?
 
Look at the arguments again. You're passing an uneven number of objects and keys.
 
Look at the arguments again. You're passing an uneven number of objects and keys.

This must be one of that foolish errors that I don't understand. I used this, but I got a QTMovieLoadStateError.

Code:
NSDictionary *att = [NSDictionary dictionaryWithObjectsAndKeys:[NSURL URLWithString:@"http://76.73.79.82:8688"], QTMovieURLAttribute, nil];

I get this error no matter which URL I try. It used to work before removing
Code:
[NSNumber numberWithBool:YES], QTMovieOpenForPlaybackAttribute
 
Got the error:

Code:
 Error Domain=NSOSStatusErrorDomain Code=-2048 UserInfo=0x10a2140 "The file is not a movie file."

I don't know how to solve that :(

This is what you have as the URL:
Code:
@"http://216.218.147.60:9014"

Unless that server is responding with a movie file when it's given no pathname or filename, you may need a little more to the URL.
 
This is what you have as the URL:
Code:
@"http://216.218.147.60:9014"

Unless that server is responding with a movie file when it's given no pathname or filename, you may need a little more to the URL.

Well, it works when QTMovieOpenForPlayback is set to YES. It doesn't make sense :(

Code:
	NSDictionary *att = [NSDictionary dictionaryWithObjectsAndKeys:[NSURL URLWithString:@"http://78.129.226.12:8700"], QTMovieURLAttribute, nil];
	movie = [[QTMovie alloc]initWithAttributes:att error:&error];

The error object is NULL. I really need to know how to solve that. :(
 
OK, I can give up supporting Leopard. That's not a big deal. But there's still one problem. I'm using the QuickTime API to get the metadata from the song. It doesn't work when QTMovieOpenForPlaybackAttribute is set to YES. If I knew any other way to do that, it would be a lot easier. QuickTime API really sucks, I can't even compile it as 64bit.

Code:
2010-02-22 18:14:08.360 Radio Tool X[26162:a0f] Tried to use QTMovie method quickTimeMovie, which is not allowed when QTMovieOpenForPlaybackAttribute is YES.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.