Beispiel #1
0
        /// <summary>
        /// The SetOutputType method sets the media type on an output stream, or tests whether a media type is acceptable.
        /// </summary>
        /// <param name="outputStreamIndex">Zero-based index of an output stream on the DMO.</param>
        /// <param name="waveFormat">The new waveformat.</param>
        public void SetOutputType(int outputStreamIndex, WaveFormat waveFormat)
        {
            //experimental
            if (waveFormat is WaveFormatExtensible)
            {
                waveFormat = (waveFormat as WaveFormatExtensible).ToWaveFormat();
            }

            MediaType mediaType = MediaType.FromWaveFormat(waveFormat);

            SetOutputType(outputStreamIndex, mediaType, SetTypeFlags.None);
            mediaType.Free();
        }
Beispiel #2
0
        /// <summary>
        /// Tests whether the given WaveFormat is supported as OutputFormat.
        /// </summary>
        /// <param name="outputStreamIndex">Zero-based index of an output stream on the DMO.</param>
        /// <param name="waveFormat">WaveFormat</param>
        /// <returns>True = supported, False = not supported</returns>
        public bool SupportsOutputFormat(int outputStreamIndex, WaveFormat waveFormat)
        {
            //experimental
            if (waveFormat is WaveFormatExtensible)
            {
                waveFormat = (waveFormat as WaveFormatExtensible).ToWaveFormat();
            }

            MediaType mediaType = MediaType.FromWaveFormat(waveFormat);
            bool      result    = SupportsOutputFormat(outputStreamIndex, mediaType);

            mediaType.Free();
            return(result);
        }