LibMPlayerCommon.MPlayer.GetCurrentPosition C# (CSharp) Метод

GetCurrentPosition() публичный Метод

Get the current postion in the file being played.
It is highly recommended to use the CurrentPostion event instead.
public GetCurrentPosition ( ) : int
Результат int
        public int GetCurrentPosition()
        {
            if (this.CurrentStatus != MediaStatus.Stopped)
            {
                MediaPlayer.StandardInput.WriteLine("get_time_pos");
                MediaPlayer.StandardInput.Flush();

                // This is to give the HandleMediaPlayerOutputDataReceived enought time to process and set the currentPosition.
                System.Threading.Thread.Sleep(100);
                return this._currentPosition;
            }
            return -1;
        }