/// <summary> /// Creates a new instance of the MFPlay player object. /// </summary> /// <param name="url">A string that contains the URL of a media file to open.</param> /// <param name="startPlayback">If true, playback starts automatically. If false, playback does not start until the application calls IMFMediaPlayer.Play.</param> /// <param name="creationOptions">Bitwise OR of zero of more flags from the MFP_CREATION_OPTIONS enumeration.</param> /// <param name="callback">An instance of the IMFPMediaPlayerCallback interface of a callback object, implemented by the application.</param> /// <param name="hWnd">A handle to a window where the video will appear. For audio-only playback, this parameter can be IntPtr.Zero.</param> /// <param name="mediaPlayer">Receives an instance of to the IMFPMediaPlayer interface.</param> /// <returns></returns> public static HResult CreateMediaPlayer(string url, bool startPlayback, MFP_CREATION_OPTIONS creationOptions, IMFPMediaPlayerCallback callback, IntPtr hWnd, out IMFPMediaPlayer mediaPlayer) { return(MFExtern.MFPCreateMediaPlayer(url, startPlayback, creationOptions, callback, hWnd, out mediaPlayer)); }
public static extern int MFPCreateMediaPlayer(string pwszURL, bool fStartPlayback, uint creationOptions, IMFPMediaPlayerCallback pCallback, IntPtr hWnd, out IMFPMediaPlayer ppMediaPlayer);