本文整理汇总了C++中vdrefptr::getTargetFormat方法的典型用法代码示例。如果您正苦于以下问题:C++ vdrefptr::getTargetFormat方法的具体用法?C++ vdrefptr::getTargetFormat怎么用?C++ vdrefptr::getTargetFormat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vdrefptr
的用法示例。
在下文中一共展示了vdrefptr::getTargetFormat方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: guiPositionBlit
void guiPositionBlit(HWND hWndClipping, VDPosition lFrame, int w, int h) {
if (lFrame<0) return;
try {
BITMAPINFOHEADER *dcf;
if (!inputVideo)
SendMessage(hWndClipping, CCM_BLITFRAME2, 0, (LPARAM)NULL);
else {
dcf = (BITMAPINFOHEADER *)inputVideo->getDecompressedFormat();
IVDStreamSource *pVSS = inputVideo->asStream();
if (lFrame < pVSS->getStart() || lFrame >= pVSS->getEnd())
SendMessage(hWndClipping, CCM_BLITFRAME2, 0, (LPARAM)NULL);
else {
Pixel32 *tmpmem;
const void *pFrame = inputVideo->getFrame(lFrame);
int dch = abs(dcf->biHeight);
if (w>0 && h>0 && w!=dcf->biWidth && h != dch && (tmpmem = new Pixel32[((w+1)&~1)*h + ((dcf->biWidth+1)&~1)*dch])) {
VBitmap vbt(tmpmem, w, h, 32);
VBitmap vbs(tmpmem+((w+1)&~1)*h, dcf->biWidth, dch, 32);
VBitmap srcbm((void *)pFrame, dcf);
vbs.BitBlt(0, 0, &srcbm, 0, 0, -1, -1);
vbt.StretchBltBilinearFast(0, 0, w, h, &vbs, 0, 0, vbs.w, vbs.h);
VDPixmap px(VDAsPixmap(vbt));
SendMessage(hWndClipping, CCM_BLITFRAME2, 0, (LPARAM)&px);
delete[] tmpmem;
} else
SendMessage(hWndClipping, CCM_BLITFRAME2, 0, (LPARAM)&inputVideo->getTargetFormat());
}
}
} catch(const MyError&) {
_RPT0(0,"Exception!!!\n");
}
}