gnome-subtitles r1085 - trunk/src/GnomeSubtitles/Ui/VideoPreview/Exceptions



Author: pcastro
Date: Sun Nov 23 18:45:50 2008
New Revision: 1085
URL: http://svn.gnome.org/viewvc/gnome-subtitles?rev=1085&view=rev

Log:
Major refactoring of the video playback engine:
- Moved Gstreamer-playbin into the Gnome Subtitles source dir
- Gstreamer-playbin no longer builds as a separate package (no separate dll, although the .so lib is still built separately)
- GStreamer events are now received asynchronously
- Loading a video is also asynchronous (playbin instructed to open the file, but video information, duration and Loaded state received asynchronously afterwards). This means the user interface adapts to the video in an asynchronous way.
- No longer has to use tricky scheme to wait for video loading (waiting some seconds for all the video information to be gathered)

Added:
   trunk/src/GnomeSubtitles/Ui/VideoPreview/Exceptions/
      - copied from r1073, /trunk/src/GnomeSubtitles/Ui/VideoPreview/Exception/
   trunk/src/GnomeSubtitles/Ui/VideoPreview/Exceptions/PlayerCouldNotInitiateEngineException.cs
   trunk/src/GnomeSubtitles/Ui/VideoPreview/Exceptions/PlayerEngineException.cs
Removed:
   trunk/src/GnomeSubtitles/Ui/VideoPreview/Exceptions/PlayerCouldNotOpenVideoException.cs

Added: trunk/src/GnomeSubtitles/Ui/VideoPreview/Exceptions/PlayerCouldNotInitiateEngineException.cs
==============================================================================
--- (empty file)
+++ trunk/src/GnomeSubtitles/Ui/VideoPreview/Exceptions/PlayerCouldNotInitiateEngineException.cs	Sun Nov 23 18:45:50 2008
@@ -0,0 +1,28 @@
+/*
+ * This file is part of Gnome Subtitles.
+ * Copyright (C) 2008 Pedro Castro
+ *
+ * Gnome Subtitles is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Gnome Subtitles is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+using System;
+
+namespace GnomeSubtitles.Ui.VideoPreview.Exceptions {
+
+public class PlayerCouldNotInitiateEngineException : ApplicationException {
+
+}
+
+}

Added: trunk/src/GnomeSubtitles/Ui/VideoPreview/Exceptions/PlayerEngineException.cs
==============================================================================
--- (empty file)
+++ trunk/src/GnomeSubtitles/Ui/VideoPreview/Exceptions/PlayerEngineException.cs	Sun Nov 23 18:45:50 2008
@@ -0,0 +1,50 @@
+/*
+ * This file is part of Gnome Subtitles.
+ * Copyright (C) 2008 Pedro Castro
+ *
+ * Gnome Subtitles is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Gnome Subtitles is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+using System;
+
+namespace GnomeSubtitles.Ui.VideoPreview.Exceptions {
+
+public class PlayerEngineException : ApplicationException {
+	private string error = String.Empty;
+	private string debug = String.Empty;
+	
+	public PlayerEngineException (string error, string debug) {
+		this.error = error;
+		this.debug = debug;
+	}
+	
+	/* Properties */
+	
+	public string Error {
+		get { return error; }
+	}
+	
+	public string Debug {
+		get { return debug; }
+	}
+	
+	/* Public methods */
+	
+	public override string ToString () {
+		return this.error + "; " + this.debug;	
+	}
+}
+
+}



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