示例#1
0
        /// <summary>
        /// Get the relative ROI (Region Of Interest) area as a decimal fraction based on the video source.
        /// </summary>
        /// <returns>The <see cref="ScaleRectangle"/> containing the ROI area information.</returns>
        /// <remarks>The specified ROI area is valid only in <see cref="PlayerDisplayType.Overlay"/>.</remarks>
        /// <exception cref="ObjectDisposedException">The player has already been disposed of.</exception>
        /// <exception cref="InvalidOperationException">
        ///     Operation failed; internal error.
        ///     </exception>
        /// <seealso cref="Display"/>
        /// <seealso cref="StreamInfo.GetVideoProperties"/>
        /// <seealso cref="SetVideoRoi"/>
        /// <since_tizen> 5 </since_tizen>
        public ScaleRectangle GetVideoRoi()
        {
            ValidateNotDisposed();

            NativePlayer.GetVideoRoi(Handle, out var scaleX, out var scaleY,
                                     out var scaleWidth, out var scaleHeight).ThrowIfFailed(this, "Failed to get the video roi area");

            return(new ScaleRectangle(scaleX, scaleY, scaleWidth, scaleHeight));
        }