Monday, March 26, 2007

Display video after Pause the video...

After closing or paused the video in graphedit, I just only got the video as a still without moving...

that means the existing image kept as it is. My code which cause this problem...

void CAbsDiffFilter::Run()
{

for (i=0;i< m_nInputPinsCount;i++)
{
if (m_ip[i]->IsConnected() == FALSE)
{
NotConnected=true;
break;
}
}
if (NotConnected)
{
for (i=0;i m_ip[i]->EndOfStream();
}
hr = CBaseFilter::Run(tStart);

return hr;
}

Modified code :...
void CAbsDiffFilter::Run()
{

hr = CBaseFilter::Run(tStart);
for (i=0;i< m_nInputPinsCount;i++)
{
if (m_ip[i]->IsConnected() == FALSE) // if input pins are not connected
//m_ip[i] are input pins...
{
NotConnected=true;
break;
}
}
if (NotConnected)
{
for (i=0;i m_ip[i]->EndOfStream();
}


return hr;
}

Labels:

0 Comments:

Post a Comment

<< Home