public void ProcessOutput(DmoOutputDataBuffer buffer) { unsafe { MediaObjectProcessOutput(UnsafeBasePtr, buffer.Native); } }
/// <summary> /// Initializes the DmoStream. Important: This has to be called before using the DmoStream. /// </summary> protected void Initialize() { _inputFormat = GetInputFormat(); _outputFormat = GetOutputFormat(); _ratio = _outputFormat.BytesPerSecond / (double)_inputFormat.BytesPerSecond; _mediaObject = CreateMediaObject(_inputFormat, _outputFormat); //Setup Mediatype if (_mediaObject.SupportsInputFormat(InputIndex, _inputFormat) == false) { throw new NotSupportedException("Inputformat is not supported."); } _mediaObject.SetInputType(InputIndex, _inputFormat); if (_mediaObject.SupportsOutputFormat(OutputIndex, _outputFormat) == false) { throw new NotSupportedException("Outputformat is not supported."); } _mediaObject.SetOutputType(OutputIndex, _outputFormat); //Create Mediabuffers _inputDataBuffer = new MediaBuffer(_inputFormat.BytesPerSecond / 2); _outputDataBuffer = new DmoOutputDataBuffer(_outputFormat.BytesPerSecond / 2); _isInitialized = true; }