rel=“nofollow” 阅读文件关于SDK的
getDuration
和版本是需要的,所有其他呼吁可以是NUL。
但执行以下法典:
CFAllocatorRef allocator;
CMBufferCallbacks *callbacks;
callbacks = malloc(sizeof(CMBufferCallbacks));
callbacks->version = 0;
callbacks->getDuration = timeCallback;
callbacks->refcon = NULL;
callbacks->getDecodeTimeStamp = NULL;
callbacks->getPresentationTimeStamp = NULL;
callbacks->isDataReady = NULL;
callbacks->compare = NULL;
callbacks->dataBecameReadyNotification = NULL;
CMItemCount capacity = 4;
OSStatus s = CMBufferQueueCreate(allocator, capacity, callbacks, queue);
NSLog(@"QUEUE: %x", queue);
NSLog(@"STATUS: %i", s);
时间 反馈:
CMTime timeCallback(CMBufferRef buf, void *refcon){
return CMTimeMake(1, 1);
}
and queue is:
CMBufferQueueRef* queue;
定点设定失败(频率=0),并恢复以下地位:
kCMBufferQueueError_RequiredParameterMissing = -12761,
<编码>查询<>代码/代码>变量正确初步化,至少 de字表示。
Has anybody used the CMBufferQueue
?