MFORMATSDSLib Namespace > IMFFrame Interface : MFOverlay Method |
Sub MFOverlay( _ ByVal _pFrameOverlay As IMFFrame, _ ByVal _pFrameMask As IMFFrame, _ ByVal _nPosX As Integer, _ ByVal _nPosY As Integer, _ ByVal _dblAlpha As Double, _ ByVal _bsPropsList As String, _ ByVal _bsAudioBufferID As String _ )
void MFOverlay( IMFFrame _pFrameOverlay, IMFFrame _pFrameMask, int _nPosX, int _nPosY, double _dblAlpha, string _bsPropsList, string _bsAudioBufferID )
procedure MFOverlay( _pFrameOverlay: IMFFrame; _pFrameMask: IMFFrame; _nPosX: Integer; _nPosY: Integer; _dblAlpha: Double; _bsPropsList: String; _bsAudioBufferID: String );
void MFOverlay( IMFFrame* _pFrameOverlay, IMFFrame* _pFrameMask, int _nPosX, int _nPosY, double _dblAlpha, BSTR* _bsPropsList, BSTR* _bsAudioBufferID )
Here is an example of how to make an overlay from "Live input with file mixing sample":
/// <summary> /// make overlay on the frame /// </summary> /// <param name="pFrame">frame to be overlayed</param> private void FrameOverlay(MFFrame pFrame) { if (checkBox1.Checked && textBoxFilePath2.Text != "") { MFFrame ppFrame2scaled, ppFrame2; m_objReader.SourceFrameGetByTime(-1, -1, out ppFrame2, ""); ppFrame2.MFResize(eMFCC.eMFCC_Default, widthScale, heightScale, -1, out ppFrame2scaled, "", "ch2"); pFrame.MFOverlay(ppFrame2scaled, null, posXScale, posYScale, ovAlpha, "", "ch2"); Marshal.ReleaseComObject(ppFrame2); Marshal.ReleaseComObject(ppFrame2scaled); } }