[Multimedia][MMFWN-162] Modified the display type of Player. 02/144802/1
authorcoderhyme <jhyo.kim@samsung.com>
Fri, 18 Aug 2017 04:23:06 +0000 (13:23 +0900)
committercoderhyme <jhyo.kim@samsung.com>
Fri, 18 Aug 2017 04:23:06 +0000 (13:23 +0900)
Change-Id: I7f6a06e5ed863b8a92e67506e388b0cb01d64eee
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
src/Tizen.Multimedia.MediaPlayer/Interop/Interop.Player.cs
src/Tizen.Multimedia.MediaPlayer/Player/Player.Properties.cs
src/Tizen.Multimedia.MediaPlayer/Player/PlayerDisplayType.cs [new file with mode: 0644]

index d82aef5..494b084 100644 (file)
@@ -76,7 +76,7 @@ internal static partial class Interop
         internal static extern PlayerErrorCode SetUri(IntPtr player, string uri);
 
         [DllImport(Libraries.Player, EntryPoint = "player_set_display")]
-        internal static extern PlayerErrorCode SetDisplay(IntPtr player, DisplayType type, IntPtr display);
+        internal static extern PlayerErrorCode SetDisplay(IntPtr player, PlayerDisplayType type, IntPtr display);
 
         [DllImport(Libraries.Player, EntryPoint = "player_start")]
         internal static extern PlayerErrorCode Start(IntPtr player);
index a122492..097be5d 100644 (file)
@@ -216,7 +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 NativePlayer.SetDisplay(Handle, PlayerDisplayType.None, IntPtr.Zero);
             }
 
             return display.ApplyTo(this);
@@ -267,8 +267,10 @@ 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 NativePlayer.SetDisplay(Handle,
+                type == DisplayType.Overlay ? PlayerDisplayType.Overlay : PlayerDisplayType.Evas, evasObject);
         }
         #endregion
 
diff --git a/src/Tizen.Multimedia.MediaPlayer/Player/PlayerDisplayType.cs b/src/Tizen.Multimedia.MediaPlayer/Player/PlayerDisplayType.cs
new file mode 100644 (file)
index 0000000..bcd2e0c
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace Tizen.Multimedia
+{
+    internal enum PlayerDisplayType
+    {
+        Overlay,
+        Evas = 3,
+        None = 4,
+    }
+}
\ No newline at end of file