PDA

View Full Version : Immeadeate capture



Hiroshi
March 2, 2005, 02:28:43
At a recording of movie, I used your DemoApp, it may take around 1.3 second a while to initiate the capture itself by using;

m_pGrabber->startLive();

I want to start the movie captureimmedeately after the button down of my application.
So I need help.
(My PC is Pen4 2.0GHz, intel chip, 128M memory)

AVIDlg.cpp
------------------------
void AVIDlg::OnStartButton()
{
CComboBox* pCBox = ( CComboBox* ) GetDlgItem( IDC_CODEC_COMBO );
int cSel=pCBox->GetCurSel();

; ...............left out..........

else
{
m_pGrabber->getSinkType().setSinkMode(DShowLib::GrabberSinkTyp e::eRUN);
}
// Now start the grabber.
m_pGrabber->startLive(); ; Šthis function
if( m_pGrabber->getLastError() )
{
AfxMessageBox( m_pGrabber->getLastError() );
}
}
UpdateDialog();
}
}

Stefan Geissler
March 2, 2005, 08:24:27
Hello Hiroshi,


The startLive() method can not be accelerated. The only way to solve your problem is to prepare the codec and all you need for AVI capture. Then you set the sinkmode to ePAUSE. Now you call startLive(). All is prepared now but the AVI capture starts only after the sinkmode has been set to eRUN. If you want to start AVI capture, you set the sinkmode to eRUN and AVI capture starts immediately.

Hiroshi
March 4, 2005, 04:11:24
Hi, Stefan,

I had checked with my application with your recomendation yesterday, While the appearing the live view (VGA from USB capturing device) in my application, the way of using function starts by immeadeate capture, Thank you.

I works fine, it can take immedate capture starting.

But the consequent 2nd capture, it fails. I had tried several times but the results were same.

So I want to know the possible solution to intake 2nd, 3rd...capturetechnics from you, I think the way you suggested might solve the function intake but it need something of the technic of escaping from the function.

Best regards,

Hiroshi

Stefan Geissler
March 4, 2005, 07:58:49
Hiroshi,

what do mean with 2nd and 3rd capture? Do you want to capture in different AVI files? This can not be done with the pause functionallity, except you would prepare the next video when the first video is stopped.

Hiroshi
March 4, 2005, 10:36:13
Dear Stefan,

I had reviewed my program;
The function appeares fine working on display.
Capture button down, then starts capturing, Stop button down, then stop
and the captur(ed) file appeared.
But at the consequent capture (2nd capture), ICImaging never make new
capture file although by using as same AVI type file,.
I suppose it might be needed of additional coding or setting parameters
after the 1st stopLive.
The present sequence is Pause->StartLive->StopLive->Pause->StartLive...

The coding is as follows;

int CICImgCtrl::StopRecoding()
{
// pause live
m_pGrabber->stopLive();

m_pGrabber->getSinkType().setSinkMode(DShowLib::GrabberSinkTyp e::ePAUSE);
// Live Display
m_pGrabber->startLive();
return ER_ICIMGCTRRET_SUCCESS;

Stefan Geissler
March 4, 2005, 11:06:17
Dear Hiroshi,

You do not need to call stopLive(). Only set the sinkmode to ePause. The live display can be seen like on a Camcorder, but the AVI file is not recorded. If you set the sinkmode to eRUN again, the next images are saved at the end on the current AVI file, also like a camcorder too.