From: Ravi Kiran K N Date: Tue, 24 May 2016 08:30:44 +0000 (+0530) Subject: Provided API instead of property for Playback rate X-Git-Tag: submit/trunk/20170823.075128~94^2~236 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a26dedaf6ac8561713b58044d98b79c19508d711;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git Provided API instead of property for Playback rate Added SetAudioStreamPolicy API Change-Id: Ic368006dc2df6289462ab08d233037604518b3a9 Signed-off-by: Ravi Kiran K N --- diff --git a/src/Tizen.Multimedia/Player/Player.cs b/src/Tizen.Multimedia/Player/Player.cs index 7dbc1e5..021d2f6 100755 --- a/src/Tizen.Multimedia/Player/Player.cs +++ b/src/Tizen.Multimedia/Player/Player.cs @@ -388,23 +388,6 @@ namespace Tizen.Multimedia } /// - /// Set playback rate. - /// - /// -5.0x to 5.0x - public float PlaybackRate - { - set - { - int ret = Interop.Player.SetPlaybackRate(_playerHandle, value); - if(ret != (int)PlayerError.None) - { - Log.Error(PlayerLog.LogTag, "Set playback rate failed" + (PlayerError)ret); - PlayerErrorFactory.ThrowException(ret, "set playback rate failed"); - } - } - } - - /// /// Get play position. /// /// play position in milli seconds @@ -689,6 +672,33 @@ namespace Tizen.Multimedia return task.Task; } + /// + /// sets playback rate + /// playback rate -5.0x to 5.0x + public void SetPlaybackRate(float rate) + { + int ret = Interop.Player.SetPlaybackRate(_playerHandle, rate); + if(ret != (int)PlayerError.None) + { + Log.Error(PlayerLog.LogTag, "Set playback rate failed" + (PlayerError)ret); + PlayerErrorFactory.ThrowException(ret, "set playback rate failed"); + } + } + + /// + /// sets audio stream policy + /// Audio Stream Policy + public void SetAudioStreamPolicy(AudioStreamPolicy policy) + { + // TODO: policy._streamInfo is currently private. Fix this. + //int ret = Interop.Player.SetPlaybackRate(_playerHandle, policy._streamInfo); + //if(ret != (int)PlayerError.None) + //{ + // Log.Error(PlayerLog.LogTag, "Set Audio stream policy failed" + (PlayerError)ret); + // PlayerErrorFactory.ThrowException(ret, "Set Audio stream policy failed"); + //} + } + internal PlayerState _state; internal float _leftVolume;