本文整理汇总了C++中vdrefptr::Init方法的典型用法代码示例。如果您正苦于以下问题:C++ vdrefptr::Init方法的具体用法?C++ vdrefptr::Init怎么用?C++ vdrefptr::Init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vdrefptr
的用法示例。
在下文中一共展示了vdrefptr::Init方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Go
void Frameserver::Go(IVDubServerLink *ivdsl, char *name) {
int server_index = -1;
lpszFsname = name;
// prepare the sources...
if (!vSrc->setTargetFormat(g_dubOpts.video.mInputFormat))
if (!vSrc->setTargetFormat(nsVDPixmap::kPixFormat_XRGB8888))
if (!vSrc->setTargetFormat(nsVDPixmap::kPixFormat_RGB888))
if (!vSrc->setTargetFormat(nsVDPixmap::kPixFormat_XRGB1555))
if (!vSrc->setTargetFormat(nsVDPixmap::kPixFormat_Pal8))
throw MyError("The decompression codec cannot decompress to an RGB format. This is very unusual. Check that any \"Force YUY2\" options are not enabled in the codec's properties.");
IVDStreamSource *pVSS = vSrc->asStream();
FrameSubset videoset(mSubset);
const VDFraction frameRateTimeline(g_project->GetTimelineFrameRate());
VDPosition startFrame;
VDPosition endFrame;
VDConvertSelectionTimesToFrames(*opt, mSubset, frameRateTimeline, startFrame, endFrame);
InitVideoStreamValuesStatic(vInfo, vSrc, aSrc, opt, &mSubset, &startFrame, &endFrame);
const VDPixmap& px = vSrc->getTargetFormat();
const VDFraction& srcFAR = vSrc->getPixelAspectRatio();
filters.prepareLinearChain(&g_filterChain, px.w, px.h, px.format, vInfo.mFrameRatePreFilter, -1, srcFAR);
mpVideoFrameSource = new VDFilterFrameVideoSource;
mpVideoFrameSource->Init(vSrc, filters.GetInputLayout());
filters.SetVisualAccelDebugEnabled(false);
filters.SetAccelEnabled(VDPreferencesGetFilterAccelEnabled());
filters.SetAsyncThreadCount(VDPreferencesGetFilterThreadCount());
filters.initLinearChain(NULL, 0, &g_filterChain, mpVideoFrameSource, px.w, px.h, px.format, px.palette, vInfo.mFrameRatePreFilter, -1, srcFAR);
filters.ReadyFilters();
InitVideoStreamValuesStatic2(vInfo, opt, &filters, frameRateTimeline);
InitAudioStreamValuesStatic(aInfo, aSrc, opt);
vdfastvector<IVDVideoSource *> vsrcs(1, vSrc);
mVideoFrameMap.Init(vsrcs, vInfo.start_src, vInfo.mFrameRateTimeline / vInfo.mFrameRate, &mSubset, vInfo.end_dst, opt->video.mbUseSmartRendering, opt->video.mode == DubVideoOptions::M_NONE, opt->video.mbPreserveEmptyFrames, &filters, false, false);
if (opt->audio.fEndAudio)
videoset.deleteRange(endFrame, videoset.getTotalFrames());
if (opt->audio.fStartAudio)
videoset.deleteRange(0, startFrame);
VDDEBUG("Video subset:\n");
videoset.dump();
if (aSrc)
AudioTranslateVideoSubset(audioset, videoset, vInfo.mFrameRateTimeline, aSrc->getWaveFormat(), !opt->audio.fEndAudio && (videoset.empty() || videoset.back().end() == pVSS->getEnd()) ? aSrc->getEnd() : 0, NULL);
VDDEBUG("Audio subset:\n");
audioset.dump();
if (aSrc) {
audioset.offset(aSrc->msToSamples(-opt->audio.offset));
lAudioSamples = VDClampToUint32(audioset.getTotalFrames());
} else
lAudioSamples = 0;
lVideoSamples = VDClampToUint32(mVideoFrameMap.size());
vSrc->streamBegin(true, false);
const VDPixmapLayout& outputLayout = filters.GetOutputLayout();
mFrameSize = VDPixmapCreateLinearLayout(mFrameLayout, nsVDPixmap::kPixFormat_RGB888, outputLayout.w, outputLayout.h, 4);
VDPixmapLayoutFlipV(mFrameLayout);
if (aSrc)
aSrc->streamBegin(true, false);
// usurp the window
VDUIFrame *pFrame = VDUIFrame::GetFrame(hwnd);
mpUIFrame = pFrame;
pFrame->Attach(this);
guiSetTitle(hwnd, IDS_TITLE_FRAMESERVER);
// create dialog box
mbExit = false;
if (hwndStatus = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_SERVER), hwnd, Frameserver::StatusDlgProc, (LPARAM)this)) {
// hide the main window
ShowWindow(hwnd, SW_HIDE);
// create the frameserver
server_index = ivdsl->CreateFrameServer(name, hwnd);
if (server_index>=0) {
//.........这里部分代码省略.........