Commit 0818fb2c authored by Philip Withnall's avatar Philip Withnall Committed by Philip Withnall

Changed from run-time to compile-time detection of GStreamer elements

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).


svn path=/trunk/; revision=6242
parent 12a4c4d3
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).
2009-04-03 Sebastian Dröge <sebastian.droege@collabora.co.uk>
* src/backend/bacon-video-widget-gst-0.10.c:
......
......@@ -167,8 +167,6 @@ if test x$ENABLE_XINE = xno || test x$ENABLE_XINE = xauto; then
])
fi
done
fi
if test x$ENABLE_XINE = xno && test x$HAVE_GSTREAMER = xno; then
......@@ -615,6 +613,21 @@ for plugin in ${used_plugins}; do
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
......
......@@ -5411,12 +5411,6 @@ sink_error:
}
}
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
*/
......@@ -4339,9 +4339,3 @@ bacon_video_widget_get_current_frame (BaconVideoWidget *bvw)
return pixbuf;
}
gboolean
bacon_video_widget_can_play_youtube_videos (BaconVideoWidget *bvw)
{
return TRUE;
}
......@@ -307,9 +307,6 @@ void bacon_video_widget_set_subtitle (BaconVideoWidget *bvw,
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);
......
......@@ -915,24 +915,6 @@ starting_video_cb (TotemVideoList *video_list, GtkTreeView *tree_view, GtkTreePa
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment