diff --git a/.cvsignore b/.cvsignore index 5ae4de7..51fec0e 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -totem-2.26.1.tar.bz2 +totem-2.27.1.tar.bz2 diff --git a/sources b/sources index 54ea195..efb26a8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -410d14957f48ae179c03e5c663607536 totem-2.26.1.tar.bz2 +586d08291bdd5e0673baeae0f93ab790 totem-2.27.1.tar.bz2 diff --git a/totem-bin-backend-ondemand.sh b/totem-bin-backend-ondemand.sh deleted file mode 100644 index 698f6cc..0000000 --- a/totem-bin-backend-ondemand.sh +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/sh - -# start functions -usage() { - echo "Usage:" - echo "- As root, to set the default backend, system-wide:" - echo " $0 -b " - echo - echo "- As a normal user, to run a program with a specific backend:" - echo " $0 -b [program options...]" - echo - echo "- \"backend name\" is one of gstreamer or xine" - echo "- \"program name\" is one of totem, totem-audio-preview," - echo " totem-video-indexer or totem-video-thumbnailer" - echo - exit 1 -} - -check_exists() { - # We've already run checks, this value is valid. - TOTEM_BACKEND=$1 - # Are we missing the requested backend? - if [ ! -f $_LIBDIR/libbaconvideowidget-$TOTEM_BACKEND.so.0.0.0 ];then - echo -e "Error: Cannot use backend $TOTEM_BACKEND, it is not installed." - echo -e "Please verify your installation"; - exit 1 - fi -} - -set_backend() { - # We've already run checks, this value is valid and it exists - TOTEM_BACKEND=$1 - /usr/sbin/alternatives --set totem-backend $_LIBDIR/libbaconvideowidget-$TOTEM_BACKEND.so.0.0.0 -} -# end functions - -_LIBDIR="$(rpm --eval '%{_libdir}')" -TOTEM_BACKEND=$2 -BIN=$3 -# Check for valid backend -# Default to GStreamer if there's no config -if [ -z $TOTEM_BACKEND ] ; then - echo "Error: No backend name passed." - usage -fi -# Default to GStreamer if the backend is invalid -if [ $TOTEM_BACKEND != "xine" -a $TOTEM_BACKEND != "gstreamer" ] ; then - echo "Error: Invalid backend name." - usage -fi - -# Does the requested backend exist? -check_exists $2 - -# If root, just try to set the default backend -if [ "$UID" -eq "0" ] ; then - if [ "$1" != "-b" -o -z "$2" ] ; then - usage; - fi - set_backend $2 -else - if [ "$1" != "-b" -o -z "$2" ] ; then - usage; - fi - if [ $TOTEM_BACKEND != "xine" -a $TOTEM_BACKEND != "gstreamer" ] ; then - echo "Error: Invalid backend name." - usage - fi - if [ -z "$BIN" ] ; then - echo "Error: No program name passed." - usage - fi - if [ $BIN != "totem" -a $BIN != "totem-audio-preview" -a $BIN != "totem-video-indexer" -a $BIN != "totem-video-thumbnailer" ] ; then - echo "Error: Wrong program name." - usage - fi - shift 3 - LD_PRELOAD=libgdk-x11-2.0.so.0:libbaconvideowidget-$TOTEM_BACKEND.so.0.0.0 exec $BIN "$@" -fi diff --git a/totem-use-pulsesink-volume.patch b/totem-use-pulsesink-volume.patch deleted file mode 100644 index 034108e..0000000 --- a/totem-use-pulsesink-volume.patch +++ /dev/null @@ -1,164 +0,0 @@ -Index: src/backend/bacon-video-widget-gst-0.10.c -=================================================================== ---- src/backend/bacon-video-widget-gst-0.10.c (revision 6227) -+++ src/backend/bacon-video-widget-gst-0.10.c (working copy) -@@ -163,7 +163,9 @@ - gboolean cursor_shown; - gboolean fullscreen_mode; - gboolean auto_resize; -- gboolean uses_fakesink; -+ gboolean uses_audio_fakesink; -+ GstElement *pulse_audio_sink; -+ gdouble volume; - - gint video_width; /* Movie width */ - gint video_height; /* Movie height */ -@@ -1879,6 +1881,11 @@ - g_free (bvw->priv->vis_element_name); - bvw->priv->vis_element_name = NULL; - -+ if (bvw->priv->pulse_audio_sink) { -+ g_object_unref (bvw->priv->pulse_audio_sink); -+ bvw->priv->pulse_audio_sink = NULL; -+ } -+ - if (bvw->priv->vis_plugins_list) { - g_list_free (bvw->priv->vis_plugins_list); - bvw->priv->vis_plugins_list = NULL; -@@ -1986,7 +1993,7 @@ - bacon_video_widget_get_show_cursor (bvw)); - break; - case PROP_VOLUME: -- g_value_set_double (value, bacon_video_widget_get_volume (bvw)); -+ g_value_set_double (value, bvw->priv->volume); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); -@@ -3133,7 +3140,7 @@ - if (bvw->priv->speakersetup == BVW_AUDIO_SOUND_AC3PASSTHRU) - return FALSE; - -- return !bvw->priv->uses_fakesink; -+ return !bvw->priv->uses_audio_fakesink; - } - - void -@@ -3145,8 +3152,24 @@ - if (bacon_video_widget_can_set_volume (bvw) != FALSE) - { - volume = CLAMP (volume, 0.0, 1.0); -- g_object_set (bvw->priv->play, "volume", -- (gdouble) volume, NULL); -+ if (bvw->priv->pulse_audio_sink) { -+ GstState cur_state; -+ -+ gst_element_get_state (bvw->priv->pulse_audio_sink, &cur_state, NULL, 0); -+ if (cur_state == GST_STATE_READY || cur_state == GST_STATE_PLAYING) -+ { -+ gdouble new_vol; -+ g_object_set (bvw->priv->pulse_audio_sink, "volume", -+ (gdouble) volume, NULL); -+ -+ g_object_get (bvw->priv->pulse_audio_sink, "volume", &new_vol, NULL); -+ } -+ } else { -+ g_object_set (bvw->priv->play, "volume", -+ (gdouble) volume, NULL); -+ } -+ -+ bvw->priv->volume = volume; - g_object_notify (G_OBJECT (bvw), "volume"); - } - } -@@ -3154,14 +3177,10 @@ - double - bacon_video_widget_get_volume (BaconVideoWidget * bvw) - { -- double vol; -- - g_return_val_if_fail (BACON_IS_VIDEO_WIDGET (bvw), 0.0); - g_return_val_if_fail (GST_IS_ELEMENT (bvw->priv->play), 0.0); - -- g_object_get (G_OBJECT (bvw->priv->play), "volume", &vol, NULL); -- -- return vol; -+ return bvw->priv->volume; - } - - void -@@ -4935,6 +4954,27 @@ - g_mutex_unlock (bvw->priv->lock); - } - -+static gboolean -+notify_volume_idle_cb (BaconVideoWidget *bvw) -+{ -+ gdouble vol; -+ -+ g_object_get (G_OBJECT (bvw->priv->pulse_audio_sink), "volume", &vol, NULL); -+ bvw->priv->volume = vol; -+ -+ g_object_notify (G_OBJECT (bvw), "volume"); -+ -+ return FALSE; -+} -+ -+static void -+notify_volume_cb (GObject *object, -+ GParamSpec *pspec, -+ BaconVideoWidget *bvw) -+{ -+ g_idle_add ((GSourceFunc) notify_volume_idle_cb, bvw); -+} -+ - GtkWidget * - bacon_video_widget_new (int width, int height, - BvwUseType type, GError ** err) -@@ -5000,15 +5040,18 @@ - cb_gconf, bvw, NULL, NULL); - - if (type == BVW_USE_TYPE_VIDEO || type == BVW_USE_TYPE_AUDIO) { -- audio_sink = gst_element_factory_make ("gconfaudiosink", "audio-sink"); -+ audio_sink = gst_element_factory_make ("pulsesink", "audio-sink"); - if (audio_sink == NULL) { -- g_warning ("Could not create element 'gconfaudiosink'"); -- /* Try to fallback on autoaudiosink */ -- audio_sink = gst_element_factory_make ("autoaudiosink", "audio-sink"); -- } else { -- /* set the profile property on the gconfaudiosink to "music and movies" */ -- if (g_object_class_find_property (G_OBJECT_GET_CLASS (audio_sink), "profile")) -- g_object_set (G_OBJECT (audio_sink), "profile", 1, NULL); -+ audio_sink = gst_element_factory_make ("gconfaudiosink", "audio-sink"); -+ if (audio_sink == NULL) { -+ g_warning ("Could not create element 'gconfaudiosink'"); -+ /* Try to fallback on autoaudiosink */ -+ audio_sink = gst_element_factory_make ("autoaudiosink", "audio-sink"); -+ } else { -+ /* set the profile property on the gconfaudiosink to "music and movies" */ -+ if (g_object_class_find_property (G_OBJECT_GET_CLASS (audio_sink), "profile")) -+ g_object_set (G_OBJECT (audio_sink), "profile", 1, NULL); -+ } - } - } else { - audio_sink = gst_element_factory_make ("fakesink", "audio-fake-sink"); -@@ -5155,9 +5198,19 @@ - /* make fakesink sync to the clock like a real sink */ - g_object_set (audio_sink, "sync", TRUE, NULL); - GST_DEBUG ("audio sink doesn't work, using fakesink instead"); -- bvw->priv->uses_fakesink = TRUE; -+ bvw->priv->uses_audio_fakesink = TRUE; - } - gst_object_unref (bus); -+ -+ /* If we're using a sink that has a volume property, then that's what -+ * we need to modify, not playbin's one */ -+ if (g_object_class_find_property (G_OBJECT_GET_CLASS (audio_sink), "volume")) { -+ bvw->priv->pulse_audio_sink = g_object_ref (audio_sink); -+ g_object_set (bvw->priv->play, "volume", -+ (gdouble) 1.0, NULL); -+ g_signal_connect (G_OBJECT (bvw->priv->pulse_audio_sink), "notify::volume", -+ G_CALLBACK (notify_volume_cb), bvw); -+ } - } else { - g_set_error_literal (err, BVW_ERROR, BVW_ERROR_AUDIO_PLUGIN, - _("Could not find the audio output. " diff --git a/totem.spec b/totem.spec index a7969e1..010df89 100644 --- a/totem.spec +++ b/totem.spec @@ -366,12 +366,12 @@ fi - Update to 2.27.1 - Remove xine-lib backend -* Thu Apr 23 2009 Bastien Nocera 2.26.1-4 -- Add missing gnome-python2-gconf req (#483265) - * Tue Apr 28 2009 Bastien Nocera 2.26.1-3 - Add missing pyxdg requires for the OpenSubtitles plugin (#497787) +* Thu Apr 23 2009 Bastien Nocera 2.26.1-4 +- Add missing gnome-python2-gconf req (#483265) + * Thu Apr 02 2009 - Bastien Nocera - 2.26.1-2 - Update patch to set the PA stream volume, avoids setting the volume when pulsesink isn't in a state where it has a stream