[longomatch/clutter: 3/3] WIP con clutter



commit a1bc231ad6b570c7350c7737687952a60b044a25
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Thu Sep 8 00:30:57 2011 +0200

    WIP con clutter

 CesarPlayer/Common/Enum.cs       |   20 +---------------
 CesarPlayer/Gui/PlayerBin.cs     |    2 +-
 CesarPlayer/MultimediaFactory.cs |   47 ++++---------------------------------
 CesarPlayer/Player/GstPlayer.cs  |   39 +++----------------------------
 CesarPlayer/gtk-gui/gui.stetic   |    2 +-
 LongoMatch/LongoMatch.mdp        |    3 +-
 configure.ac                     |    5 +++-
 7 files changed, 18 insertions(+), 100 deletions(-)
---
diff --git a/CesarPlayer/Common/Enum.cs b/CesarPlayer/Common/Enum.cs
index 0a60812..a4b86b0 100644
--- a/CesarPlayer/Common/Enum.cs
+++ b/CesarPlayer/Common/Enum.cs
@@ -93,8 +93,7 @@ namespace LongoMatch.Video.Common
 	}
 
 	public enum PlayerUseType {
-		Video,
-		Audio,
+		Player,
 		Capture,
 		Metadata,
 	}
@@ -106,23 +105,6 @@ namespace LongoMatch.Video.Common
 		Hue,
 	}
 
-	public enum AspectRatio {
-		Auto,
-		Square,
-		Fourbythree,
-		Anamorphic,
-		Dvb,
-	}
-
-	public enum AudioOutType {
-		Stereo,
-		Channel4,
-		Channel41,
-		Channel5,
-		Channel51,
-		Ac3passthru,
-	}
-
 	public enum MetadataType {
 		Title,
 		Artist,
diff --git a/CesarPlayer/Gui/PlayerBin.cs b/CesarPlayer/Gui/PlayerBin.cs
index 242c7d7..663b4b8 100644
--- a/CesarPlayer/Gui/PlayerBin.cs
+++ b/CesarPlayer/Gui/PlayerBin.cs
@@ -384,7 +384,7 @@ namespace LongoMatch.Gui
 			Widget playerWidget;
 
 			factory= new MultimediaFactory();
-			player = factory.getPlayer(320,280);
+			player = factory.getPlayer();
 
 			tickHandler = new TickHandler(OnTick);
 			player.Tick += tickHandler;
diff --git a/CesarPlayer/MultimediaFactory.cs b/CesarPlayer/MultimediaFactory.cs
index 613c1b5..722c01f 100644
--- a/CesarPlayer/MultimediaFactory.cs
+++ b/CesarPlayer/MultimediaFactory.cs
@@ -39,57 +39,20 @@ namespace LongoMatch.Video
 			oS = Environment.OSVersion;
 		}
 
-		public IPlayer getPlayer(int width, int height) {
-			switch(oS.Platform) {
-			case PlatformID.Unix:
-				return new GstPlayer(width,height,PlayerUseType.Video);
-
-			case PlatformID.Win32NT:
-				return new GstPlayer(width,height,PlayerUseType.Video);
-
-			default:
-				return new GstPlayer(width,height,PlayerUseType.Video);
-			}
+		public IPlayer getPlayer() {
+			return new GstPlayer(PlayerUseType.Player);
 		}
 
 		public IMetadataReader getMetadataReader() {
-
-			switch(oS.Platform) {
-			case PlatformID.Unix:
-				return new GstPlayer(1,1,PlayerUseType.Metadata);
-
-			case PlatformID.Win32NT:
-				return new GstPlayer(1,1,PlayerUseType.Metadata);
-
-			default:
-				return new GstPlayer(1,1,PlayerUseType.Metadata);
-			}
+			return new GstPlayer(PlayerUseType.Metadata);
 		}
 
 		public IFramesCapturer getFramesCapturer() {
-			switch(oS.Platform) {
-			case PlatformID.Unix:
-				return new GstPlayer(1,1,PlayerUseType.Capture);
-
-			case PlatformID.Win32NT:
-				return new GstPlayer(1,1,PlayerUseType.Capture);
-
-			default:
-				return new GstPlayer(1,1,PlayerUseType.Capture);
-			}
+			return new GstPlayer(PlayerUseType.Capture);
 		}
 
 		public IVideoEditor getVideoEditor() {
-			switch(oS.Platform) {
-			case PlatformID.Unix:
-				return new GstVideoSplitter();
-
-			case PlatformID.Win32NT:
-				return new GstVideoSplitter();
-
-			default:
-				return new GstVideoSplitter();
-			}
+			return new GstVideoSplitter();
 		}
 
 		public ICapturer getCapturer(CapturerType type) {
diff --git a/CesarPlayer/Player/GstPlayer.cs b/CesarPlayer/Player/GstPlayer.cs
index d4d2ead..eb98449 100644
--- a/CesarPlayer/Player/GstPlayer.cs
+++ b/CesarPlayer/Player/GstPlayer.cs
@@ -32,15 +32,15 @@ namespace LongoMatch.Video.Player {
 		public GstPlayer(IntPtr raw) : base(raw) {}
 
 		[DllImport("libcesarplayer.dll")]
-		static extern unsafe IntPtr bacon_video_widget_new(int width, int height, int type, out IntPtr error);
+		static extern unsafe IntPtr bacon_video_widget_new(int type, out IntPtr error);
 
-		public unsafe GstPlayer(int width, int height, PlayerUseType type) : base(IntPtr.Zero)
+		public unsafe GstPlayer(PlayerUseType type) : base(IntPtr.Zero)
 		{
 			if(GetType() != typeof(GstPlayer)) {
 				throw new InvalidOperationException("Can't override this constructor.");
 			}
 			IntPtr error = IntPtr.Zero;
-			Raw = bacon_video_widget_new(width, height, (int) type, out error);
+			Raw = bacon_video_widget_new((int) type, out error);
 			if(error != IntPtr.Zero) throw new GLib.GException(error);
 		}
 
@@ -117,20 +117,6 @@ namespace LongoMatch.Video.Player {
 			}
 		}
 
-		[GLib.Property("showcursor")]
-		public bool Showcursor {
-			get {
-				GLib.Value val = GetProperty("showcursor");
-				bool ret = (bool) val;
-				val.Dispose();
-				return ret;
-			}
-			set {
-				GLib.Value val = new GLib.Value(value);
-				SetProperty("showcursor", val);
-				val.Dispose();
-			}
-		}
 
 		[GLib.Property("playing")]
 		public bool Playing {
@@ -1041,15 +1027,7 @@ namespace LongoMatch.Video.Player {
 			}
 		}
 
-		[DllImport("libcesarplayer.dll")]
-		static extern bool bacon_video_widget_set_audio_out_type(IntPtr raw, int type);
-
-		public bool SetAudioOutType(AudioOutType type) {
-			bool raw_ret = bacon_video_widget_set_audio_out_type(Handle, (int) type);
-			bool ret = raw_ret;
-			return ret;
-		}
-
+		
 		[DllImport("libcesarplayer.dll")]
 		static extern bool bacon_video_widget_has_previous_track(IntPtr raw);
 
@@ -1191,15 +1169,6 @@ namespace LongoMatch.Video.Player {
 		}
 
 		[DllImport("libcesarplayer.dll")]
-		static extern void bacon_video_widget_set_aspect_ratio(IntPtr raw, int ratio);
-
-		public AspectRatio AspectRatio {
-			set {
-				bacon_video_widget_set_aspect_ratio(Handle, (int) value);
-			}
-		}
-
-		[DllImport("libcesarplayer.dll")]
 		static extern void bacon_video_widget_set_video_property(IntPtr raw, int type, int value);
 
 		public void SetVideoProperty(VideoProperty type, int value) {
diff --git a/CesarPlayer/gtk-gui/gui.stetic b/CesarPlayer/gtk-gui/gui.stetic
index 1421d4b..f78e4fb 100644
--- a/CesarPlayer/gtk-gui/gui.stetic
+++ b/CesarPlayer/gtk-gui/gui.stetic
@@ -5,7 +5,7 @@
     <target-gtk-version>2.12</target-gtk-version>
   </configuration>
   <import>
-    <widget-library name="../bin/Release/CesarPlayer.dll" internal="true" />
+    <widget-library name="../a.dll" internal="true" />
   </import>
   <widget class="Gtk.Window" id="LongoMatch.Gui.VolumeWindow" design-size="31 204">
     <property name="MemberName" />
diff --git a/LongoMatch/LongoMatch.mdp b/LongoMatch/LongoMatch.mdp
index 72d5161..8eab5f9 100644
--- a/LongoMatch/LongoMatch.mdp
+++ b/LongoMatch/LongoMatch.mdp
@@ -202,7 +202,8 @@
     <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
     <ProjectReference type="Gac" localcopy="True" refto="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
     <ProjectReference type="Gac" localcopy="True" refto="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
-    <ProjectReference type="Gac" localcopy="True" refto="Db4objects.Db4o, Version=7.4.121.14026, Culture=neutral, PublicKeyToken=6199cd4f203aa8eb" />
+    <ProjectReference type="Gac" localcopy="True" refto="Db4objects.Db4o.Linq, Version=8.0.184.15484, Culture=neutral, PublicKeyToken=6199cd4f203aa8eb" />
+    <ProjectReference specificVersion="False" type="Assembly" localcopy="True" refto="../../../../../usr/lib/mono/db4o/Db4objects.Db4o.dll" />
   </References>
   <LanguageParameters StartupObject="LongoMatch.MainClass" ApplicationIcon="." CodePage="65001" ctype="CSharpProjectParameters" />
 </Project>
\ No newline at end of file
diff --git a/configure.ac b/configure.ac
index 6f5153c..845cab7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -79,7 +79,10 @@ PKG_CHECK_MODULES([DB4O], [db4o])
 AC_SUBST(DB4O_LIBS)
 
 dnl package checks for libcesarplayer
-PKG_CHECK_MODULES(CESARPLAYER, [gtk+-2.0 >= 2.8 gdk-2.0 gio-2.0 glib-2.0 gstreamer-0.10 gstreamer-audio-0.10 gstreamer-video-0.10 gstreamer-pbutils-0.10 gobject-2.0 gstreamer-interfaces-0.10])
+PKG_CHECK_MODULES(CESARPLAYER, [gtk+-2.0 >= 2.8 gdk-2.0 gio-2.0 glib-2.0
+gstreamer-0.10 gstreamer-audio-0.10 gstreamer-video-0.10 gstreamer-pbutils-0.10
+gobject-2.0 gstreamer-interfaces-0.10, clutter-gtk-0.10, clutter-1.0
+clutter-gst-1.0, mx-1.0])
 AC_SUBST(CESARPLAYER_CFLAGS)
 AC_SUBST(CESARPLAYER_LIBS)
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]