[totem] plugins: Remove thumbnail plugin



commit 3187bfd489cc58e35a71e1cdbf8900e5aefd19b2
Author: Bastien Nocera <hadess hadess net>
Date:   Sun Apr 3 21:46:35 2011 +0100

    plugins: Remove thumbnail plugin
    
    It's not useful in GNOME 3, as we have live previews of
    applications, and it ends up being of bad quality compared
    to the default icon, as well as murking up application discovery.

 configure.in                              |   11 +--
 po/POTFILES.in                            |    1 -
 src/backend/bacon-video-widget-gst-0.10.c |   54 +--------
 src/backend/bacon-video-widget.h          |    2 -
 src/plugins/thumbnail/Makefile.am         |   13 --
 src/plugins/thumbnail/thumbnail.plugin.in |    8 --
 src/plugins/thumbnail/totem-thumbnail.c   |  179 -----------------------------
 7 files changed, 4 insertions(+), 264 deletions(-)
---
diff --git a/configure.in b/configure.in
index 07755d0..ca56905 100644
--- a/configure.in
+++ b/configure.in
@@ -68,7 +68,7 @@ AC_SUBST(TOTEM_API_VERSION)
 AC_DEFINE_UNQUOTED(TOTEM_API_VERSION, ["$TOTEM_API_VERSION"], [Define to the Totem plugin API version])
 
 # The full list of plugins
-allowed_plugins="bemused brasero-disc-recorder chapters coherence_upnp dbus-service im-status gromit iplayer jamendo lirc media-player-keys ontop opensubtitles properties publish pythonconsole save-file sample-python sample-vala screensaver screenshot sidebar-test skipto thumbnail tracker youtube zeitgeist-dp"
+allowed_plugins="bemused brasero-disc-recorder chapters coherence_upnp dbus-service im-status gromit iplayer jamendo lirc media-player-keys ontop opensubtitles properties publish pythonconsole save-file sample-python sample-vala screensaver screenshot sidebar-test skipto tracker youtube zeitgeist-dp"
 
 PLUGINDIR='${libdir}/totem/plugins'
 AC_SUBST(PLUGINDIR)
@@ -449,14 +449,6 @@ for plugin in ${used_plugins}; do
 				add_plugin="0"
 			fi
 		;;
-		thumbnail)
-			PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.15.0,
-				[HAVE_GLIB_2_15=yes], [HAVE_GLIB_2_15=no])
-			if test "${HAVE_GLIB_2_15}" != "yes" ; then
-				plugin_error_or_ignore "you need glib >= 2.15.0 to use the thumbnail plugin"
-				add_plugin="0"
-			fi
-		;;
 		brasero-disc-recorder)
 			dnl this is only needed to use brasero icons
 			PKG_CHECK_MODULES(DISC_RECORDER, libxml-2.0 >= 2.6.0 gtk+-x11-3.0,
@@ -786,7 +778,6 @@ src/plugins/sidebar-test/Makefile
 src/plugins/skipto/Makefile
 src/plugins/sample-python/Makefile
 src/plugins/sample-vala/Makefile
-src/plugins/thumbnail/Makefile
 src/plugins/tracker/Makefile
 src/plugins/youtube/Makefile
 src/plugins/pythonconsole/Makefile
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 93771c5..fe6d0c1 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -93,7 +93,6 @@ src/plugins/skipto/totem-skipto-plugin.c
 [type: gettext/glade]src/plugins/skipto/skipto.ui
 src/plugins/tracker/totem-tracker-widget.c
 src/plugins/tracker/totem-tracker.c
-[type: gettext/ini]src/plugins/thumbnail/thumbnail.plugin.in
 [type: gettext/ini]src/plugins/tracker/tracker.plugin.in
 [type: gettext/ini]src/plugins/youtube/youtube.plugin.in
 [type: gettext/glade]src/plugins/youtube/youtube.ui
diff --git a/src/backend/bacon-video-widget-gst-0.10.c b/src/backend/bacon-video-widget-gst-0.10.c
index ac65c5c..f02de26 100644
--- a/src/backend/bacon-video-widget-gst-0.10.c
+++ b/src/backend/bacon-video-widget-gst-0.10.c
@@ -287,7 +287,6 @@ static void bacon_video_widget_finalize (GObject * object);
 static void setup_vis (BaconVideoWidget * bvw);
 static GList * get_visualization_features (void);
 static void size_changed_cb (GdkScreen *screen, BaconVideoWidget *bvw);
-static void bvw_process_pending_tag_messages (BaconVideoWidget * bvw);
 static void bvw_stop_play_pipeline (BaconVideoWidget * bvw);
 static GError* bvw_error_from_gst_error (BaconVideoWidget *bvw, GstMessage *m);
 static gboolean bvw_check_for_cover_pixbuf (BaconVideoWidget * bvw);
@@ -1658,8 +1657,7 @@ bvw_update_tags (BaconVideoWidget * bvw, GstTagList *tag_list, const gchar *type
   if (tag_list)
     gst_tag_list_free (tag_list);
 
-  if (bvw->priv->use_type != BVW_USE_TYPE_METADATA)
-    bvw_check_for_cover_pixbuf (bvw);
+  bvw_check_for_cover_pixbuf (bvw);
 
   /* if we're not interactive, we want to announce metadata
    * only later when we can be sure we got it all */
@@ -3213,7 +3211,7 @@ bacon_video_widget_set_audio_output_type (BaconVideoWidget *bvw,
     return;
   else if (type == BVW_AUDIO_SOUND_AC3PASSTHRU)
     return;
-  else if (bvw->priv->use_type == BVW_USE_TYPE_METADATA || bvw->priv->use_type == BVW_USE_TYPE_CAPTURE) {
+  else if (bvw->priv->use_type == BVW_USE_TYPE_CAPTURE) {
     /* don't set up a filter for the speaker setup, anything is fine */
     bvw->priv->speakersetup = -1;
     return;
@@ -3567,16 +3565,6 @@ bacon_video_widget_open (BaconVideoWidget * bvw,
   ret = poll_for_state_change_full (bvw, bvw->priv->play,
 				    GST_STATE_PAUSED, &err_msg, -1);
 
-  if (bvw->priv->use_type == BVW_USE_TYPE_METADATA) {
-    bvw_process_pending_tag_messages (bvw);
-    bacon_video_widget_get_stream_length (bvw);
-    GST_DEBUG ("stream length = %u", bvw->priv->stream_length);
-
-    /* even in case of an error (e.g. no decoders installed) we might still
-     * have useful metadata (like codec types, duration, etc.) */
-    g_signal_emit (bvw, bvw_signals[SIGNAL_GOT_METADATA], 0, NULL);
-  }
-
   if (ret) {
     g_signal_emit (bvw, bvw_signals[SIGNAL_CHANNELS_CHANGE], 0);
   } else {
@@ -3640,8 +3628,7 @@ bacon_video_widget_play (BaconVideoWidget * bvw, GError ** error)
   /* no need to actually go into PLAYING in capture/metadata mode (esp.
    * not with sinks that don't sync to the clock), we'll get everything
    * we need by prerolling the pipeline, and that is done in _open() */
-  if (bvw->priv->use_type == BVW_USE_TYPE_CAPTURE ||
-      bvw->priv->use_type == BVW_USE_TYPE_METADATA) {
+  if (bvw->priv->use_type == BVW_USE_TYPE_CAPTURE) {
     return TRUE;
   }
 
@@ -5775,25 +5762,9 @@ bacon_video_widget_get_metadata_bool (BaconVideoWidget * bvw,
   {
     case BVW_INFO_HAS_VIDEO:
       boolean = bvw->priv->media_has_video;
-      /* if properties dialog, show the metadata we
-       * have even if we cannot decode the stream */
-      if (!boolean && bvw->priv->use_type == BVW_USE_TYPE_METADATA &&
-          bvw->priv->tagcache != NULL &&
-          gst_structure_has_field ((GstStructure *) bvw->priv->tagcache,
-                                   GST_TAG_VIDEO_CODEC)) {
-        boolean = TRUE;
-      }
       break;
     case BVW_INFO_HAS_AUDIO:
       boolean = bvw->priv->media_has_audio;
-      /* if properties dialog, show the metadata we
-       * have even if we cannot decode the stream */
-      if (!boolean && bvw->priv->use_type == BVW_USE_TYPE_METADATA &&
-          bvw->priv->tagcache != NULL &&
-          gst_structure_has_field ((GstStructure *) bvw->priv->tagcache,
-                                   GST_TAG_AUDIO_CODEC)) {
-        boolean = TRUE;
-      }
       break;
     default:
       g_assert_not_reached ();
@@ -5805,25 +5776,6 @@ bacon_video_widget_get_metadata_bool (BaconVideoWidget * bvw,
   return;
 }
 
-static void
-bvw_process_pending_tag_messages (BaconVideoWidget * bvw)
-{
-  GstMessageType events;
-  GstMessage *msg;
-  GstBus *bus;
-    
-  /* process any pending tag messages on the bus NOW, so we can get to
-   * the information without/before giving control back to the main loop */
-
-  /* application message is for stream-info */
-  events = GST_MESSAGE_TAG | GST_MESSAGE_DURATION | GST_MESSAGE_APPLICATION;
-  bus = gst_element_get_bus (bvw->priv->play);
-  while ((msg = gst_bus_poll (bus, events, 0))) {
-    gst_bus_async_signal_func (bus, msg, NULL);
-  }
-  gst_object_unref (bus);
-}
-
 static GdkPixbuf *
 bacon_video_widget_get_metadata_pixbuf (BaconVideoWidget * bvw,
 					GstBuffer *buffer)
diff --git a/src/backend/bacon-video-widget.h b/src/backend/bacon-video-widget.h
index 63a4d58..a27099a 100644
--- a/src/backend/bacon-video-widget.h
+++ b/src/backend/bacon-video-widget.h
@@ -146,7 +146,6 @@ void bacon_video_widget_init_backend		 (int *argc, char ***argv);
  * BvwUseType:
  * @BVW_USE_TYPE_VIDEO: fully-featured with video, audio, capture and metadata support
  * @BVW_USE_TYPE_CAPTURE: capture support only
- * @BVW_USE_TYPE_METADATA: metadata support only
  *
  * The purpose for which a #BaconVideoWidget will be used, as specified to
  * bacon_video_widget_new(). This determines which features will be enabled
@@ -155,7 +154,6 @@ void bacon_video_widget_init_backend		 (int *argc, char ***argv);
 typedef enum {
 	BVW_USE_TYPE_VIDEO,
 	BVW_USE_TYPE_CAPTURE,
-	BVW_USE_TYPE_METADATA
 } BvwUseType;
 
 GtkWidget *bacon_video_widget_new		 (BvwUseType type,



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