View Full Version : How to Save Vedio
abdul_khathar
July 18, 2008, 12:34:23
hi,
i need to save the vedio contineously from MFC application
please let me knw
thanks in advance
Abdul
Sascha Schmidt
July 18, 2008, 16:05:12
Hallo Abdul,
Please look at the following sample:
http://www.imagingcontrol.com/library/cpp/section/video-aquisition/example/image-and-avi-capture/
It shows how to select a video codec and save an AVI file with "IC Imaging Control".
Overall it is very simple.
The following code starts the capturing:
sstd::string filename = "C:\\test.avi";
tCodecListPtr CodecList = Codec::getAvailableCodecs();
tCodecPtr pCodec = _pCodecList->at( 0 );
smart_ptr<MediaStreamSink> pSink = MediaStreamSink::create( MSC_AviContainer, pCodec );
pSink->setFilename( filename );
pSink->setSinkMode( GrabberSinkType::eRUN );
m_cGrabber.setSinkType( pSink );
m_cGrabber.startLive();
And this stops the capturing:
m_cGrabber.stopLive();
m_cGrabber.setSinkType( 0 );
pSink.destroy();
Also you can look at the samples, which shipped with IC Imaging Control:
"..\The Imaging Source Europe GmbH\IC Imaging Control 3.0\samples\vc71\CreateVideoFile"
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.