How can I set custom preview for input stream?
From AVObjects Knowledge Base
Revision as of 22:31, 10 August 2010 by Bmezhebitskiy (Talk | contribs)
You can do this using the MGPreview object of MGCORElib:
C# sample code:
//Get the input stream string vidName; string audName; object mgObject; m_objVideoMixer.GetInputDevice(0, out vidName, out audName, out mgObject); MGVIDEOMIXERLib.IMGObject mgObj = (MGVIDEOMIXERLib.IMGObject)mgObject; //Create preview object for this stream MGCORELib.CoMGPreviewClass preview = new MGCORELib.CoMGPreviewClass(); //Enable video preview preview.EnableAudio(0, 0); preview.EnableVideo(0, 1); //Set panel for this preview preview.SetOutputWindow(0, panelStream1.Handle.ToInt32(), 0); //Initialize preview object preview.Init(mgObj, "stream 1 preview"); //Start preview object preview.Start(0);