public static CMVRMultiSinkFactoryLoader getInstance() { if (mInstance == null) { mInstance = new CMVRMultiSinkFactoryLoader(); } return(mInstance); }
public bool createOutputNodes(IntPtr aHandle, object aPtrUnkSharedResource, uint aOutputNodeAmount, out List <object> aTopologyOutputNodesList) { bool lresult = false; aTopologyOutputNodesList = new List <object>(); do { try { IntPtr lOutputNodes = IntPtr.Zero; IntPtr lUnkSharedTexture = IntPtr.Zero; if (aPtrUnkSharedResource != null) { lUnkSharedTexture = Marshal.GetIUnknownForObject(aPtrUnkSharedResource); } int lhresult = CMVRMultiSinkFactoryLoader.createOutputNodes( aHandle, lUnkSharedTexture, aOutputNodeAmount, out lOutputNodes); IntPtr[] lOutputNodesArray = new IntPtr[aOutputNodeAmount]; Marshal.Copy(lOutputNodes, lOutputNodesArray, 0, (int)aOutputNodeAmount); for (int i = 0; i < aOutputNodeAmount; i++) { aTopologyOutputNodesList.Add(Marshal.GetObjectForIUnknown(lOutputNodesArray[i])); Marshal.Release(lOutputNodesArray[i]); } Marshal.FreeCoTaskMem(lOutputNodes); lresult = true; } catch (Exception exc) { } } while (false); return(lresult); }
private bool uploadCaptureManagerVideoRendererToCSharpProxy( out ICaptureManagerEVRMultiSinkFactory aICaptureManagerEVRMultiSinkFactory) { aICaptureManagerEVRMultiSinkFactory = null; bool lresult = false; do { aICaptureManagerEVRMultiSinkFactory = new CaptureManagerEVRMultiSinkFactory( CMVRMultiSinkFactoryLoader.getInstance().mIEVRMultiSinkFactory, CMVRMultiSinkFactoryLoader.getInstance().MaxPorts, CMVRMultiSinkFactoryLoader.getInstance().mIEVRStreamControl); lresult = true; }while (false); return(lresult); }