Re: QTKit and audio streaming
Re: QTKit and audio streaming
- Subject: Re: QTKit and audio streaming
- From: Pascal Vantrepote <email@hidden>
- Date: Mon, 16 May 2005 06:53:04 -0400
>> On May 15, 2005, at 2:53 PM, Pascal Vantrepote wrote:
>> I'm trying to play mp3 streaming using QTKit.
>> It's working, but only 10 seconds.
>>
>> This my sample code.
>>
>> NSURL* url = [[NSURL alloc] initFileURLWithPath:@"listen.pls"];
>> NSMovie current = [[NSMovie alloc] initWithURL:url byReference:NO];
>>
>> if (current) {
>>
>> NSError* qtError;
>> QTMovie movie = [[QTMovie alloc]
>> initWithQuickTimeMovie:[current
>> QTMovie] disposeWhenDone:NO error:&qtError];
>> if (movie != nil) {
>> [movie play];
>> }
>> }
>>
>> I have tried with NSSound, it doesn't do anything. If someone have
>> idea.
>> Thanks for your help.
>
>Not sure why you are mixing NSMovie and QTMovie. That seems like a
>recipe for disaster. Can you replace initWithURL:byReference: by the
>equivalent QTMovie call? Does this work?
>
> NSURL *url = [[NSURL alloc] initFileURLWithPath:@"listen.pls"];
> NSError *qtError;
> QTMovie *movie = [[QTMovie alloc] initWithURL:url
>error:&qtError];
>
> [movie play];
>
>Tim Monroe
>QuickTime Engineering
>email@hidden
Hi, thanks for your reply Tim.
I have already tried this solution. I got the same result has with NSMovie.
That's why I thought because NSMovie is a wrapper maybe it's doing something
that I didn't do with QTMovie.
Anyway I don't understand why the stream start and stop after 10S. I have
tried to setup the duation attributes, nothing change.
Do you know if I can receive some notification or requesting the current
status of my movie. Or receiving some error code.
Thanks a lot.
Pascal.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden