用AMCAP看,发现了两个输入源,默认的那个总是出不来数据,需要在DS采集模块里设置一下。
IAMCrossbar *pXBar1 = NULL;
hr = _dsInfo.GetCpatureGraphBuilder2Ptr()->FindInterface(&LOOK_UPSTREAM_ONLY, NULL,
_captureFilter,IID_IAMCrossbar, (void**)&pXBar1);
if(FAILED(hr))
{
WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id,
"IAMCrossbar Failed to FindInterface.");
}
else
{
long OutputPinCount = 0;
long InputPinCount = 0;
long PinIndexRelated;
long PhysicalType;
long inPort = 0;
long outPort = 0;
pXBar1->get_PinCounts(&OutputPinCount,&InputPinCount);
for(int i =0;i<InputPinCount;i++)
{
pXBar1->get_CrossbarPinInfo(TRUE,i,&PinIndexRelated,&PhysicalType);
if(PhysConn_Video_Composite==PhysicalType)
{
inPort = i;
break;
}
}
for(int i =0;i<OutputPinCount;i++)
{
pXBar1->get_CrossbarPinInfo(FALSE,i,&PinIndexRelated,&PhysicalType);
if(PhysConn_Video_VideoDecoder==PhysicalType)
{
outPort = i;
break;
}
}
if(S_OK==pXBar1->CanRoute(outPort,inPort))
{
hr = pXBar1->Route(outPort,inPort);
}
WEBRTC_TRACE(webrtc::kTraceStateInfo, webrtc::kTraceVideoCapture, _id,
"IAMCrossbar Route hr = %d.", hr);
}
SAFE_RELEASE(pXBar1);
在使用AMCAP软件进行视频采集时,遇到默认输入源无法获取数据的情况。通过深入DS采集模块进行设置,成功选择了有效的模拟输入源。

1906

被折叠的 条评论
为什么被折叠?



