示例#1
0
        /// <summary>
        /// Removes an effect that was added with the IMFPMediaPlayer.InsertEffect method.
        /// </summary>
        /// <param name="mediaPlayer">A valid IMFPMediaPlayer instance.</param>
        /// <param name="activate">The activation object used to create the MFT.</param>
        /// <returns>If this function succeeds, it returns the S_OK member. Otherwise, it returns another HResult's member that describe the error.</returns>
        public static HResult RemoveEffect(this IMFPMediaPlayer mediaPlayer, IMFActivate activate)
        {
            if (mediaPlayer == null)
            {
                throw new ArgumentNullException("mediaPlayer");
            }

            return(mediaPlayer.RemoveEffect(activate));
        }
示例#2
0
        /// <summary>
        /// Removes an effect that was added with the IMFPMediaPlayer.InsertEffect method.
        /// </summary>
        /// <param name="mediaPlayer">A valid IMFPMediaPlayer instance.</param>
        /// <param name="transform">The Media Foundation transform (MFT) previously added.</param>
        /// <returns>If this function succeeds, it returns the S_OK member. Otherwise, it returns another HResult's member that describe the error.</returns>
        public static HResult RemoveEffect(this IMFPMediaPlayer mediaPlayer, IMFTransform transform)
        {
            if (mediaPlayer == null)
            {
                throw new ArgumentNullException("mediaPlayer");
            }

            return(mediaPlayer.RemoveEffect(transform));
        }