English 中文(简体)
Quicktime Framework and opening Transport Streams
原标题:

I have noticed that Quicktime 10 is now able to open Transport Stream Video files and also search reliably within that video file(Which is something that VLC can not seem to handle). Quicktime 7, on the other hand, is not able to open the same Video File.

When I try to open that same Video File within my Cocoa Application, which is using the QTKit framework, I get the error that the selected file is not a movie file.

Are there anyways to work around this?

Also, does anyone know the difference between the Quicktime Player and the QTKit that is supplied to developers? I made the assumption that the QTKit framework would backing the player but this does not seem to be the case.

问题回答

QuickTime Player should use an almost identical backing as any other app on the system: QTKit. What might be happening is that QuickTime Player in Snow Leopard is using the newly introduced QuickTime X system, rather than the more venerable QuickTime 7. Read up on QuickTime X and see if that helps. (It should boil down to specifying that you want playback only when opening the URL).

It seems that QTKit by default uses QuickTime 7 but can be made to use QuickTime X by setting the QTMovieOpenForPlaybackAttribute attribute. This will disable some quick time features like setting the selection and playing the selection but QTKit will now be able to play Transport Streams.

You can read more about it with in the following pdf.

http://macguild.org/wwdc/wwdc-2009.pdf

I understand this is quite irrelevant to the question asked. However, I hope it will help someone wandering around to know how to open a URL from a Cocoa app with the default QuickTime Player application and not the ugly QTMovieView etc. I d to spend a good deal of time and labour googling about it but all in vain.. I hope it will save someone s day.

NSString *url = [NSString string];
url = @"http://someurl";

[[NSTask launchedTaskWithLaunchPath:@"/usr/bin/open" arguments:[NSArray arrayWithObjects:url    , @"-a", @"QuickTime Player", nil]]
         waitUntilExit];




相关问题
Display MPEG-4 Export Component Dialog

Below is my code for a doc based QTKit app that exports to the fixed Apple device formats by way of a popUp that displays the three device options. The [NSNumberWithLong:mpg4 ] option works fine as ...

Quicktime Framework and opening Transport Streams

I have noticed that Quicktime 10 is now able to open Transport Stream Video files and also search reliably within that video file(Which is something that VLC can not seem to handle). Quicktime 7, on ...

export to MP3 from quicktime API

A question for Apple,QT programmers. Would like to know if it s possible to export a Movie object to MP3 using the QuickTime API. Preferably the ConvertMovieToFile function. I ve looked at ...

热门标签