override protected void OnGetInputStreamInfo(ref MFTInputStreamInfo pStreamInfo) { pStreamInfo.dwFlags = MFTInputStreamInfoFlags.WholeSamples | MFTInputStreamInfoFlags.SingleSamplePerBuffer | MFTInputStreamInfoFlags.FixedSampleSize; pStreamInfo.cbSize = m_cbImageSizeInput; }
override protected void OnGetInputStreamInfo(ref MFTInputStreamInfo pStreamInfo) { pStreamInfo.dwFlags = MFTInputStreamInfoFlags.WholeSamples | MFTInputStreamInfoFlags.FixedSampleSize | MFTInputStreamInfoFlags.ProcessesInPlace; pStreamInfo.cbSize = m_Alignment; }
/// <summary> /// Return settings to describe input stream. This should get the buffer /// requirements and other information for an input stream. /// (see IMFTransform::GetInputStreamInfo). /// /// An override of the abstract version in MFTBase_Sync. /// </summary> /// <param name="pStreamInfo">The struct where the parameters get set.</param> override protected void OnGetInputStreamInfo(ref MFTInputStreamInfo pStreamInfo) { // the code below tells the caller what we do pStreamInfo.cbSize = 0; // MFT_INPUT_STREAM_PROCESSES_IN_PLACE - The MFT can perform in-place processing. // In this mode, the MFT directly modifies the input buffer. When the client calls // ProcessOutput, the same sample that was delivered to this stream is returned in // the output stream that has a matching stream identifier. This flag implies that // the MFT holds onto the input buffer, so this flag cannot be combined with the // MFT_INPUT_STREAM_DOES_NOT_ADDREF flag. If this flag is present, the MFT must // set the MFT_OUTPUT_STREAM_PROVIDES_SAMPLES or MFT_OUTPUT_STREAM_CAN_PROVIDE_SAMPLES // flag for the output stream that corresponds to this input stream. pStreamInfo.dwFlags = MFTInputStreamInfoFlags.ProcessesInPlace; // Note: There are many other flags we could set here but because we are doing // nothing to the sample (other than counting it) we do not need them. }
/// +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= /// <summary> /// Return settings to describe input stream. This should get the buffer /// requirements and other information for an input stream. /// (see IMFTransform::GetInputStreamInfo). /// /// An override of the abstract version in TantaMFTBase_Sync. /// </summary> /// <param name="pStreamInfo">The struct where the parameters get set.</param> /// <history> /// 01 Nov 18 Cynic - Ported In /// </history> override protected void OnGetInputStreamInfo(ref MFTInputStreamInfo pStreamInfo) { // return the image size pStreamInfo.cbSize = m_cbImageSize; // MFT_INPUT_STREAM_WHOLE_SAMPLES - Each media sample(IMFSample interface) of // input data from the MFT contains complete, unbroken units of data. // MFT_INPUT_STREAM_SINGLE_SAMPLE_PER_BUFFER - Each input sample contains // exactly one unit of data // MFT_INPUT_STREAM_FIXED_SAMPLE_SIZE - All input samples are the same size. pStreamInfo.dwFlags = MFTInputStreamInfoFlags.WholeSamples | MFTInputStreamInfoFlags.FixedSampleSize | MFTInputStreamInfoFlags.SingleSamplePerBuffer; // NOTE that we do NOT add the MFTInputStreamInfoFlags.ProcessesInPlace flag // since we do not do inplace processing here }
/// +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= /// <summary> /// Return settings to describe input stream. This should get the buffer /// requirements and other information for an input stream. /// (see IMFTransform::GetInputStreamInfo). /// /// An override of the abstract version in TantaMFTBase_Sync. /// </summary> /// <param name="pStreamInfo">The struct where the parameters get set.</param> /// <history> /// 01 Nov 18 Cynic - Ported In /// </history> override protected void OnGetInputStreamInfo(ref MFTInputStreamInfo pStreamInfo) { // return the image size pStreamInfo.cbSize = m_cbImageSize; // MFT_INPUT_STREAM_WHOLE_SAMPLES - Each media sample(IMFSample interface) of // input data from the MFT contains complete, unbroken units of data. // MFT_INPUT_STREAM_SINGLE_SAMPLE_PER_BUFFER - Each input sample contains // exactly one unit of data // MFT_INPUT_STREAM_FIXED_SAMPLE_SIZE - All input samples are the same size. // MFT_INPUT_STREAM_PROCESSES_IN_PLACE - The MFT can perform in-place processing. // In this mode, the MFT directly modifies the input buffer. When the client calls // ProcessOutput, the same sample that was delivered to this stream is returned in // the output stream that has a matching stream identifier. This flag implies that // the MFT holds onto the input buffer, so this flag cannot be combined with the // MFT_INPUT_STREAM_DOES_NOT_ADDREF flag. If this flag is present, the MFT must // set the MFT_OUTPUT_STREAM_PROVIDES_SAMPLES or MFT_OUTPUT_STREAM_CAN_PROVIDE_SAMPLES // flag for the output stream that corresponds to this input stream. pStreamInfo.dwFlags = MFTInputStreamInfoFlags.WholeSamples | MFTInputStreamInfoFlags.FixedSampleSize | MFTInputStreamInfoFlags.SingleSamplePerBuffer | MFTInputStreamInfoFlags.ProcessesInPlace; }
override protected void OnGetInputStreamInfo(ref MFTInputStreamInfo pStreamInfo) { pStreamInfo.cbSize = 0; pStreamInfo.dwFlags = MFTInputStreamInfoFlags.ProcessesInPlace; }