コード例 #1
0
        /// <summary>
        /// Adds a transform, such as an audio or video effect, to a stream.
        /// </summary>
        /// <param name="sourceReader">A valid IMFSourceReaderEx instance.</param></param>
        /// <param name="streamIndex">The stream to configure.</param>
        /// <param name="activate">An instance of an MFT activation object.</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 AddTransformForStream(this IMFSourceReaderEx sourceReader, SourceReaderFirstStream streamIndex, IMFActivate activate)
        {
            if (sourceReader == null)
            {
                throw new ArgumentNullException("sourceReader");
            }

            return(sourceReader.AddTransformForStream((int)streamIndex, activate));
        }
コード例 #2
0
        /// <summary>
        /// Adds a transform, such as an audio or video effect, to a stream.
        /// </summary>
        /// <param name="sourceReader">A valid IMFSourceReaderEx instance.</param></param>
        /// <param name="streamIndex">The stream to configure.</param>
        /// <param name="transform">An instance of a Media Foundation transform (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 AddTransformForStream(this IMFSourceReaderEx sourceReader, int streamIndex, IMFTransform transform)
        {
            if (sourceReader == null)
            {
                throw new ArgumentNullException("sourceReader");
            }

            return(sourceReader.AddTransformForStream(streamIndex, transform));
        }