From: hsgwon Date: Mon, 26 Mar 2018 06:07:49 +0000 (+0900) Subject: [MediaPlayer] Modify the precondition of SetRoi method (#184) X-Git-Tag: 5.0.0.14293^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6af91dea95cac4814d0211df99caee69b77c9a7b;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [MediaPlayer] Modify the precondition of SetRoi method (#184) --- diff --git a/src/Tizen.Multimedia.MediaPlayer/Player/PlayerDisplaySettings.cs b/src/Tizen.Multimedia.MediaPlayer/Player/PlayerDisplaySettings.cs index 971ecb00c..8de9bee2f 100644 --- a/src/Tizen.Multimedia.MediaPlayer/Player/PlayerDisplaySettings.cs +++ b/src/Tizen.Multimedia.MediaPlayer/Player/PlayerDisplaySettings.cs @@ -137,12 +137,10 @@ namespace Tizen.Multimedia /// /// The region. /// - /// To set roi, must be set to first. + /// the roi can be set before setting . (since 4.0) /// /// - /// Operation failed; internal error.
- /// -or-
- /// is not set to . + /// Operation failed; internal error. ///
/// The player has already been disposed of. /// The width or the height is less than or equal to zero. @@ -154,17 +152,13 @@ namespace Tizen.Multimedia throw new ArgumentOutOfRangeException(nameof(roi), roi.Width, $"The width of the roi can't be less than or equal to zero."); } + if (roi.Height <= 0) { throw new ArgumentOutOfRangeException(nameof(roi), roi.Height, $"The height of the roi can't be less than or equal to zero."); } - if (Mode != PlayerDisplayMode.Roi) - { - throw new InvalidOperationException("Mode is not set to Roi"); - } - Native.SetRoi(Player.Handle, roi.X, roi.Y, roi.Width, roi.Height). ThrowIfFailed(Player, "Failed to set the roi"); }