public void start() { mPipeProcessor = new PipeProcessor( "Client" + _ConnectionSignature, "Server" + _ConnectionSignature); _IEVRStreamControl = CaptureManager.createEVRStreamControl(); mPipeProcessor.MessageDelegateEvent += mPipeProcessor_MessageDelegateEvent; mPipeProcessor.send("Initilized"); mStartEvent.WaitOne(); StartSession(); mCloseEvent.WaitOne(); if (Session != null) { Session.stopSession(); Session.closeSession(); } mPipeProcessor.closeConnection(); }
public MainWindow() { InitializeComponent(); try { mCaptureManager = new CaptureManager("CaptureManager.dll"); } catch (System.Exception exc) { try { mCaptureManager = new CaptureManager(); } catch (System.Exception exc1) { } } if (mCaptureManager == null) { return; } XmlDataProvider lXmlDataProvider = (XmlDataProvider)this.Resources["XmlLogProvider"]; if (lXmlDataProvider == null) { return; } System.Xml.XmlDocument doc = new System.Xml.XmlDocument(); string lxmldoc = ""; mCaptureManager.getCollectionOfSources(ref lxmldoc); if (string.IsNullOrEmpty(lxmldoc)) { return; } doc.LoadXml(lxmldoc); lXmlDataProvider.Document = doc; mWebCamParametrsTab.AddHandler(Slider.ValueChangedEvent, new RoutedEventHandler(mParametrSlider_ValueChanged)); mWebCamParametrsTab.AddHandler(CheckBox.CheckedEvent, new RoutedEventHandler(mParametrSlider_Checked)); mWebCamParametrsTab.AddHandler(CheckBox.UncheckedEvent, new RoutedEventHandler(mParametrSlider_Checked)); mIEVRStreamControl = mCaptureManager.createEVRStreamControl(); }
public CaptureManagerEVRMultiSinkFactory( IEVRMultiSinkFactory aIEVRMultiSinkFactory, uint aMaxVideoRenderStreamCount, IEVRStreamControl aIEVRStreamControl) { mIEVRMultiSinkFactory = aIEVRMultiSinkFactory; mMaxVideoRenderStreamCount = aMaxVideoRenderStreamCount; mIEVRStreamControl = aIEVRStreamControl; }
public MainWindow() { InitializeComponent(); try { ThreadPool.SetMinThreads(15, 10); mCaptureManager = new CaptureManager("CaptureManager.dll"); } catch (System.Exception exc) { try { mCaptureManager = new CaptureManager(); } catch (System.Exception exc1) { } } if (mCaptureManager == null) { return; } XmlDataProvider lXmlDataProvider = (XmlDataProvider)this.Resources["XmlLogProvider"]; if (lXmlDataProvider == null) { return; } System.Xml.XmlDocument doc = new System.Xml.XmlDocument(); string lxmldoc = ""; mCaptureManager.getCollectionOfSources(ref lxmldoc); if (string.IsNullOrEmpty(lxmldoc)) { return; } doc.LoadXml(lxmldoc); lXmlDataProvider.Document = doc; mIEVRStreamControl = mCaptureManager.createEVRStreamControl(); mSourceControl = mCaptureManager.createSourceControl(); }
public IEVRStreamControl createEVRStreamControl() { IEVRStreamControl lresult = null; do { try { if (checkICaptureManagerControl()) { break; } object lUnknown; mICaptureManagerControl.createMisc( typeof(CaptureManagerLibrary.IEVRStreamControl).GUID, out lUnknown); if (lUnknown == null) { break; } var lEVRStreamControl = lUnknown as CaptureManagerLibrary.IEVRStreamControl; if (lEVRStreamControl == null) { break; } lresult = new EVRStreamControl(lEVRStreamControl); } catch (Exception exc) { LogManager.getInstance().write(exc.Message); } } while (false); return(lresult); }
private CapturePipeline() { try { mCaptureManager = new CaptureManager(); } catch (System.Exception) { } if (mCaptureManager == null) { return; } TargetTexture.Instance.init(VideoPanel.VideoWidth, VideoPanel.VideoHeight); IEVRMultiSinkFactory lSinkFactory; var lSinkControl = mCaptureManager.createSinkControl(); lSinkControl.createSinkFactory( Guid.Empty, out lSinkFactory); List <object> lEVROutputNodes; lSinkFactory.createOutputNodes( TargetTexture.Instance.TargetHandler, 1, out lEVROutputNodes); if (lEVROutputNodes != null && lEVROutputNodes.Count > 0) { mEVROutputNode = lEVROutputNodes[0]; } mIEVRStreamControl = mCaptureManager.createEVRStreamControl(); }
private bool uploadCaptureManagerToCSharpProxy( out ICaptureManagerEVRMultiSinkFactory aICaptureManagerEVRMultiSinkFactory) { bool lresult = false; do { aICaptureManagerEVRMultiSinkFactory = null; CaptureManager mCaptureManager = null; try { mCaptureManager = new CaptureManager("CaptureManager.dll"); } catch (Exception) { try { mCaptureManager = new CaptureManager(); } catch (Exception) { } } if (mCaptureManager == null) { break; } string lXMLSinkString = ""; mCaptureManager.getCollectionOfSinks(ref lXMLSinkString); XmlDocument doc = new XmlDocument(); doc.LoadXml(lXMLSinkString); var lSinkNode = doc.SelectSingleNode("SinkFactories/SinkFactory[@GUID='{A2224D8D-C3C1-4593-8AC9-C0FCF318FF05}']"); if (lSinkNode == null) { break; } var lMaxPortCountAttributeNode = lSinkNode.SelectSingleNode("Value.ValueParts/ValuePart/@MaxPortCount"); if (lMaxPortCountAttributeNode == null) { break; } uint lmaxPorts = 0; if (!uint.TryParse(lMaxPortCountAttributeNode.Value, out lmaxPorts)) { break; } if (lmaxPorts == 0) { break; } // "<SinkFactory Name="CaptureManagerVRMultiSinkFactory" GUID="{A2224D8D-C3C1-4593-8AC9-C0FCF318FF05}" Title="CaptureManager Video Renderer multi sink factory"> //- <Value.ValueParts> // <ValuePart Title="Container format" Value="Default" MIME="" Description="Default EVR implementation" MaxPortCount="8" GUID="{E926E7A7-7DD0-4B15-88D7-413704AF865F}" /> // </Value.ValueParts> // </SinkFactory> //" ISinkControl lISinkControl = mCaptureManager.createSinkControl(); if (lISinkControl == null) { break; } IEVRMultiSinkFactory lIEVRMultiSinkFactory = null; lISinkControl.createCompatibleEVRMultiSinkFactory(Guid.Empty, out lIEVRMultiSinkFactory); if (lIEVRMultiSinkFactory == null) { break; } IEVRStreamControl lIEVRStreamControl = mCaptureManager.createEVRStreamControl(); if (lIEVRStreamControl == null) { break; } aICaptureManagerEVRMultiSinkFactory = new CaptureManagerEVRMultiSinkFactory( lIEVRMultiSinkFactory, lmaxPorts, lIEVRStreamControl); lresult = true; }while (false); return(lresult); }