本文整理汇总了C++中vdrefptr::RunRequests方法的典型用法代码示例。如果您正苦于以下问题:C++ vdrefptr::RunRequests方法的具体用法?C++ vdrefptr::RunRequests怎么用?C++ vdrefptr::RunRequests使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vdrefptr
的用法示例。
在下文中一共展示了vdrefptr::RunRequests方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SessionFrame
LRESULT Frameserver::SessionFrame(LPARAM lParam, WPARAM original_frame) {
FrameserverSession *fs = SessionLookup(lParam);
if (!fs)
return VDSRVERR_BADSESSION;
try {
const VDPixmapLayout& output = filters.GetOutputLayout();
if (fs->arena_size < ((output.w*3+3)&-4)*output.h)
return VDSRVERR_TOOBIG;
VDPosition pos = mVideoFrameMap[original_frame].mSourceFrame;
if (pos < 0)
return VDSRVERR_FAILED;
vdrefptr<IVDFilterFrameClientRequest> creq;
filters.RequestFrame(pos, 0, ~creq);
while(!creq->IsCompleted()) {
if (filters.Run(NULL, false) == FilterSystem::kRunResult_Running)
continue;
switch(mpVideoFrameSource->RunRequests(NULL)) {
case IVDFilterFrameSource::kRunResult_Running:
case IVDFilterFrameSource::kRunResult_IdleWasActive:
case IVDFilterFrameSource::kRunResult_BlockedWasActive:
continue;
}
filters.Block();
}
VDPixmap pxdst(VDPixmapFromLayout(mFrameLayout, fs->arena));
VDFilterFrameBuffer *buf = creq->GetResultBuffer();
VDPixmapBlt(pxdst, VDPixmapFromLayout(filters.GetOutputLayout(), (void *)buf->LockRead()));
buf->Unlock();
} catch(const MyError&) {
return VDSRVERR_FAILED;
}
return VDSRVERR_OK;
}