PlayRate now works in MPlayer

git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@985 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
niksedk 2012-02-12 02:02:24 +00:00
parent 4e1a004f6e
commit 5f15943d24

View File

@ -22,6 +22,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
public string VideoCodec { get; private set; } public string VideoCodec { get; private set; }
private double? _pausePosition = null; // Hack to hold precise seeking when paused private double? _pausePosition = null; // Hack to hold precise seeking when paused
private int _pauseCounts = 0; private int _pauseCounts = 0;
private double _speed = 1.0;
public override string PlayerName public override string PlayerName
{ {
@ -73,6 +74,22 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
} }
} }
public override double PlayRate
{
get
{
return _speed;
}
set
{
if (value >= 0 && value <= 2.0)
{
_speed = value;
SetProperty("speed", value.ToString(System.Globalization.CultureInfo.InvariantCulture), true);
}
}
}
public override void Play() public override void Play()
{ {
_mplayer.StandardInput.WriteLine("pause"); _mplayer.StandardInput.WriteLine("pause");