1
我正在通过quicktime客户端原型化显示来自HaiVision Barracuda的流视频的客户端。我一直无法将缓冲区大小减小到3.0秒以下......对于这个应用程序,我们需要尽可能低的网络延迟,并希望视频丢失延迟。我做了以下内容:如何消除快速流视频中的延迟
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
NSString *path = [[NSBundle mainBundle] pathForResource:@"haivision" ofType:@"sdp"];
NSError *error = nil;
QTMovie *qtmovie = [QTMovie movieWithFile:path error:&error];
if(error != nil) {
NSLog(@"error: %@", [error localizedDescription]);
}
Movie movie = [qtmovie quickTimeMovie];
long trackCount = GetMovieTrackCount(movie);
Track theTrack = GetMovieTrack(movie,1);
Media theMedia = GetTrackMedia(theTrack);
MediaHandler theMediaHandler = GetMediaHandler(theMedia);
QTSMediaPresentationParams myPres;
ComponentResult c = QTSMediaGetIndStreamInfo(theMediaHandler, 1,kQTSMediaPresentationInfo,
&myPres);
Fixed shortdelay = 1<<15;
OSErr theErr = QTSPresSetInfo (myPres.presentationID,
kQTSAllStreams,
kQTSTargetBufferDurationInfo,
&shortdelay);
NSLog(@"OSErr %d", theErr);
[movieView setMovie:qtmovie];
[movieView play:self];
}
我似乎得到有效的对象/结构一路下跌到QTSPres,虽然ComponentResult和OSErr都返回-50。流视频播放正常,但缓冲区仍然是3.0秒。任何帮助/见解赞赏。
J
该缓冲区总是3.0秒没有米你做什么。即使您在QuickTime客户端中启用了Instant-On ... – Cipi 2010-06-09 13:35:28