How to capture the frame of the input stream of Vision Mixer?

From AVObjects Knowledge Base
(Difference between revisions)
Jump to: navigation, search
Bmezhebitskiy (Talk | contribs)
(New page: You can do this with CaptureVideoFrame method. Here is a sample code: string strVidDevice; string strAudDevice; Object pObjectUnk; //Let's capture the frame of the 0 stream //Get the sou...)
Newer edit →

Revision as of 16:24, 26 January 2010

You can do this with CaptureVideoFrame method. Here is a sample code:

string strVidDevice; string strAudDevice; Object pObjectUnk;

//Let's capture the frame of the 0 stream //Get the source device of 0 stream IMGMixerConfig mixerConfig = m_objVideoMixer; mixerConfig.GetInputDevice(0, out strVidDevice, out strAudDevice, out pObjectUnk); MGVIDEOMIXERLib.IMGObject pObject = (MGVIDEOMIXERLib.IMGObject)pObjectUnk;

//Capture the frame int hBitmap; pObject.CaptureVideoFrame(out hBitmap, MGVIDEOMIXERLib.eMGCaptureFields.eMGCF_Both); Bitmap bmpCapture = Bitmap.FromHbitmap((IntPtr)hBitmap);

Personal tools