本文整理汇总了C++中FramePtr::GetAudioData方法的典型用法代码示例。如果您正苦于以下问题:C++ FramePtr::GetAudioData方法的具体用法?C++ FramePtr::GetAudioData怎么用?C++ FramePtr::GetAudioData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FramePtr
的用法示例。
在下文中一共展示了FramePtr::GetAudioData方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DoRender
void FramePlaybackControl::DoRender(HANDLE& handle, bool bPureCG)
{
//Get next CG-frame if we have a CGProducer
FramePtr pCGFrame;
if(pCGProducer_) {
pCGFrame = pCGProducer_->GetFrameBuffer().front();
FrameBufferFetchResult fetchResult = pCGProducer_->GetFrameBuffer().pop_front();
if(pCGFrame != 0) {
pLastCGFrame_ = pCGFrame;
}
else if(fetchResult != FetchEOF) {
pCGFrame = pLastCGFrame_;
}
else {
pCGProducer_.reset();
LOG << LogLevel::Debug << TEXT("Frameplayback: Cleared CGProducer");
OnCGEmpty();
pLastCGFrame_.reset();
}
}
//Get next video frame unless we're in PureCG-mode
FramePtr pVideoFrame;
if(!bPureCG || activeClip_.bStopped_) {
if(frameQueue_.size() > 0) {
pVideoFrame = frameQueue_.front();
frameQueue_.pop();
if(pVideoFrame != 0) {
pLastVideoFrame_ = pVideoFrame;
}
}
else {
pVideoFrame = pLastVideoFrame_;
}
if(activeClip_.bStopped_ && !frameQueue_.empty())
eventRender_.Set();
}
else {
pVideoFrame = pLastVideoFrame_;
}
//combine and send to consumer
FramePtr pResultFrame;
if(pCGFrame) {
if(pVideoFrame && this->activeClip_.pFP_ != this->emptyProducer_) {
pResultFrame = pStrategy_->GetReservedFrame();
if(pResultFrame) {
utils::image::PreOver(pResultFrame->GetDataPtr(), pVideoFrame->GetDataPtr(), pCGFrame->GetDataPtr(), pResultFrame->GetDataSize());
pResultFrame->GetAudioData().insert(pResultFrame->GetAudioData().end(), pVideoFrame->GetAudioData().begin(), pVideoFrame->GetAudioData().end());
pResultFrame->GetAudioData().insert(pResultFrame->GetAudioData().end(), pCGFrame->GetAudioData().begin(), pCGFrame->GetAudioData().end());
}
}
else
pResultFrame = pCGFrame;
}
else
pResultFrame = pVideoFrame;
if(pResultFrame)
pStrategy_->DisplayFrame(pResultFrame.get());
else if(bPureCG) {
pResultFrame = pStrategy_->GetReservedFrame();
if(pResultFrame) {
utils::image::Clear(pResultFrame->GetDataPtr(), pResultFrame->GetDataSize());
pStrategy_->DisplayFrame(pResultFrame.get());
}
}
}