Пример #1
0
    public IMFAttributes GetVideoAttributes()
    {
        IMFAttributes ia = null;

        if (m_VideoNode != null)
        {
            HResult hr;

            object o;
            hr = m_VideoNode.GetObject(out o);

            if (Succeeded(hr) && o != null)
            {
                IMFTransform t = o as IMFTransform;

                if (t != null)
                {
                    hr = t.GetAttributes(out ia);
                    //SafeRelease(t);
                }
                //SafeRelease(o);
            }
        }

        return(ia);
    }
Пример #2
0
            internal PropertySet GetAttributes()
            {
                IMFAttributes attributes = null;

                _mft.GetAttributes(out attributes);
                return(PropSetFromAttributes(attributes));
            }
Пример #3
0
        protected void SetMixerSourceRect(IMFTransform pMixer, MFVideoNormalizedRect nrcSource)
        {
            if (pMixer == null)
            {
                throw new COMException("SetMixerSourceRect", E_Pointer);
            }

            int hr;
            IMFAttributes pAttributes = null;

            hr = pMixer.GetAttributes(out pAttributes);
            MFError.ThrowExceptionForHR(hr);

            Utils.MFSetBlob(pAttributes, MFAttributesClsid.VIDEO_ZOOM_RECT, nrcSource);

            SafeRelease(pAttributes); pAttributes = null;
        }