totem r6242 - in trunk: . src/backend src/plugins/youtube



Author: pwithnall
Date: Sat Apr  4 18:14:00 2009
New Revision: 6242
URL: http://svn.gnome.org/viewvc/totem?rev=6242&view=rev

Log:
2009-04-04  Philip Withnall  <philip tecnocode co uk>

	* configure.in:
	* src/backend/bacon-video-widget-gst-0.10.c:
	* src/backend/bacon-video-widget-xine.c
	(bacon_video_widget_get_current_frame):
	* src/backend/bacon-video-widget.h:
	* src/plugins/youtube/totem-youtube.c (starting_video_cb):
	Changed from run-time to compile-time detection of GStreamer elements
	required by the YouTube plugin (i.e. souphttpsrc).



Modified:
   trunk/ChangeLog
   trunk/configure.in
   trunk/src/backend/bacon-video-widget-gst-0.10.c
   trunk/src/backend/bacon-video-widget-xine.c
   trunk/src/backend/bacon-video-widget.h
   trunk/src/plugins/youtube/totem-youtube.c

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Sat Apr  4 18:14:00 2009
@@ -167,8 +167,6 @@
 			])
 		fi
 	done
-
-
 fi
 
 if test x$ENABLE_XINE = xno && test x$HAVE_GSTREAMER = xno; then
@@ -615,6 +613,21 @@
 				plugin_error_or_ignore "you need libgdata installed for the YouTube plugin"
 				add_plugin="0"
 			fi
+
+			dnl We need the souphttpsrc element for the YouTube plugin, if we're using GStreamer.
+			dnl The xine backend is fine for YouTube videos.
+			if test "$HAVE_GSTREAMER" = "yes"; then
+				AC_MSG_CHECKING([GStreamer 0.10 souphttpsrc plugin])
+				if $gst010_inspect souphttpsrc >/dev/null 2>/dev/null; then
+					AC_MSG_RESULT([yes])
+				else
+					AC_MSG_RESULT([no])
+					AC_MSG_ERROR([
+						Cannot find required GStreamer-0.10 plugin 'souphttpsrc'.
+						It should be part of gst-plugins-good. Please install it.
+					])
+				fi
+			fi
 		;;
 	esac
 

Modified: trunk/src/backend/bacon-video-widget-gst-0.10.c
==============================================================================
--- trunk/src/backend/bacon-video-widget-gst-0.10.c	(original)
+++ trunk/src/backend/bacon-video-widget-gst-0.10.c	Sat Apr  4 18:14:00 2009
@@ -5411,12 +5411,6 @@
   }
 }
 
-gboolean
-bacon_video_widget_can_play_youtube_videos (BaconVideoWidget *bvw)
-{
-  return gst_default_registry_check_feature_version ("souphttpsrc", 0, 10, 0);
-}
-
 /*
  * vim: sw=2 ts=8 cindent noai bs=2
  */

Modified: trunk/src/backend/bacon-video-widget-xine.c
==============================================================================
--- trunk/src/backend/bacon-video-widget-xine.c	(original)
+++ trunk/src/backend/bacon-video-widget-xine.c	Sat Apr  4 18:14:00 2009
@@ -4339,9 +4339,3 @@
 
 	return pixbuf;
 }
-
-gboolean
-bacon_video_widget_can_play_youtube_videos (BaconVideoWidget *bvw)
-{
-	return TRUE;
-}

Modified: trunk/src/backend/bacon-video-widget.h
==============================================================================
--- trunk/src/backend/bacon-video-widget.h	(original)
+++ trunk/src/backend/bacon-video-widget.h	Sat Apr  4 18:14:00 2009
@@ -307,9 +307,6 @@
 gboolean bacon_video_widget_has_next_track	 (BaconVideoWidget *bvw);
 gboolean bacon_video_widget_has_previous_track	 (BaconVideoWidget *bvw);
 
-/* YouTube functions */
-gboolean bacon_video_widget_can_play_youtube_videos (BaconVideoWidget *bvw);
-
 /* Screenshot functions */
 gboolean bacon_video_widget_can_get_frames       (BaconVideoWidget *bvw,
 						  GError **error);

Modified: trunk/src/plugins/youtube/totem-youtube.c
==============================================================================
--- trunk/src/plugins/youtube/totem-youtube.c	(original)
+++ trunk/src/plugins/youtube/totem-youtube.c	Sat Apr  4 18:14:00 2009
@@ -915,24 +915,6 @@
 	GtkTreeIter iter;
 	GDataYouTubeVideo *video_entry;
 
-	if (bacon_video_widget_can_play_youtube_videos (self->bvw) == FALSE) {
-		gchar *title;
-		GtkWindow *main_window;
-
-		/* Display an error if the required GStreamer plugins aren't installed */
-		title = g_strdup_printf (_("Totem cannot play this type of media (%s) because you do not have the appropriate plugins to handle it."), _("YouTube"));
-		main_window = totem_get_main_window (self->totem);
-
-		totem_interface_error_with_link (title, _("Please install the necessary plugins and restart Totem to be able to play this media."),
-						 "http://projects.gnome.org/totem/#codecs";, _("More information about media plugins"),
-						 main_window, self->totem);
-
-		g_object_unref (main_window);
-		g_free (title);
-
-		return FALSE;
-	}
-
 	/* Store the current entry */
 	if (gtk_tree_model_get_iter (GTK_TREE_MODEL (self->list_store[self->current_tree_view]), &iter, path) == FALSE)
 		return FALSE;



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