Release 4.0.0-preview1-00201
[platform/core/csapi/tizenfx.git] / src / Tizen.Multimedia.MediaPlayer / Player / Player.Properties.cs
index a122492..e8219d6 100644 (file)
@@ -19,6 +19,7 @@ using System.Runtime.InteropServices;
 using System.Diagnostics;
 using System.IO;
 using System.Threading;
+using NativeDisplay = Interop.Display;
 using static Interop;
 
 namespace Tizen.Multimedia
@@ -52,7 +53,7 @@ namespace Tizen.Multimedia
         private string _userAgent = "";
 
         /// <summary>
-        /// Gets or Sets the cookie for streaming playback.
+        /// Gets or sets the cookie for streaming playback.
         /// </summary>
         /// <remarks>To set, the player must be in the <see cref="PlayerState.Idle"/> state.</remarks>
         /// <exception cref="InvalidOperationException">The player is not in the valid state.</exception>
@@ -82,7 +83,7 @@ namespace Tizen.Multimedia
         }
 
         /// <summary>
-        /// Gets or Sets the user agent for streaming playback.
+        /// Gets or sets the user agent for streaming playback.
         /// </summary>
         /// <remarks>To set, the player must be in the <see cref="PlayerState.Idle"/> state.</remarks>
         /// <exception cref="InvalidOperationException">The player is not in the valid state.</exception>
@@ -144,7 +145,7 @@ namespace Tizen.Multimedia
         /// <value>A <see cref="AudioLatencyMode"/> that specifies the mode. The default is <see cref="AudioLatencyMode.Mid"/>.</value>
         /// <remarks>
         /// If the mode is <see cref="AudioLatencyMode.High"/>,
-        /// audio output interval can be increased so, it can keep more audio data to play.
+        /// audio output interval can be increased, so it can keep more audio data to play.
         /// But, state transition like pause or resume can be more slower than default(<see cref="AudioLatencyMode.Mid"/>).
         /// </remarks>
         /// <exception cref="ObjectDisposedException">The player has already been disposed of.</exception>
@@ -215,8 +216,7 @@ namespace Tizen.Multimedia
         {
             if (display == null)
             {
-                Log.Info(PlayerLog.Tag, "set display to none");
-                return NativePlayer.SetDisplay(Handle, DisplayType.None, IntPtr.Zero);
+                return NativeDisplay.SetDisplay(Handle, PlayerDisplayType.None, IntPtr.Zero);
             }
 
             return display.ApplyTo(this);
@@ -267,15 +267,24 @@ namespace Tizen.Multimedia
             Debug.Assert(IsDisposed == false);
 
             Debug.Assert(Enum.IsDefined(typeof(DisplayType), type));
+            Debug.Assert(type != DisplayType.None);
 
-            return NativePlayer.SetDisplay(Handle, type, evasObject);
+            return NativeDisplay.SetDisplay(Handle,
+                type == DisplayType.Overlay ? PlayerDisplayType.Overlay : PlayerDisplayType.Evas, evasObject);
+        }
+
+        PlayerErrorCode IDisplayable<PlayerErrorCode>.ApplyEcoreWindow(IntPtr windowHandle)
+        {
+            Debug.Assert(IsDisposed == false);
+
+            return NativeDisplay.SetEcoreDisplay(Handle, PlayerDisplayType.Overlay, windowHandle);
         }
         #endregion
 
         private PlayerTrackInfo _audioTrack;
 
         /// <summary>
-        /// Gets the track info for audio.
+        /// Gets the track info for the audio.
         /// </summary>
         /// <value>A <see cref="PlayerTrackInfo"/> for audio.</value>
         public PlayerTrackInfo AudioTrackInfo
@@ -293,9 +302,9 @@ namespace Tizen.Multimedia
         private PlayerTrackInfo _subtitleTrackInfo;
 
         /// <summary>
-        /// Gets the track info for subtitle.
+        /// Gets the track info for the subtitle.
         /// </summary>
-        /// <value>A <see cref="PlayerTrackInfo"/> for subtitle.</value>
+        /// <value>A <see cref="PlayerTrackInfo"/> for the subtitle.</value>
         public PlayerTrackInfo SubtitleTrackInfo
         {
             get