Ejemplo n.º 1
0
        private IEnumPins GetTestEnum()
        {
            IBaseFilter filter = new SmartTee() as IBaseFilter;
            int         hr;

            IEnumPins ppEnum;

            hr = filter.EnumPins(out ppEnum);
            DsError.ThrowExceptionForHR(hr);

            return(ppEnum);
        }
Ejemplo n.º 2
0
        private static IPin GetSmartTeeInputPin()
        {
            IBaseFilter filter = new SmartTee() as IBaseFilter;
            int         hr;
            IntPtr      ip = Marshal.AllocCoTaskMem(4);
            IEnumPins   ppEnum;
            IPin        pRet = null;

            IPin[] pPins = new IPin[1];

            hr = filter.EnumPins(out ppEnum);
            Marshal.ThrowExceptionForHR(hr);

            while ((ppEnum.Next(1, pPins, ip) >= 0) && (Marshal.ReadInt32(ip) == 1))
            {
                pRet = pPins[0];
                break;
            }
            Marshal.FreeCoTaskMem(ip);
            Marshal.ReleaseComObject(ppEnum);
            return(pRet);
        }