This is an automated email from the git hooks/post-receive script. bluesabre pushed a commit to branch master in repository apps/parole.
commit 26e7b9c159ec8efc121314d3a301584cbce7e3de Author: Sean Davis <[email protected]> Date: Thu Jun 19 23:04:00 2014 -0400 Make clutter optional, default disabled --- configure.ac.in | 17 +++++++++++++++-- src/Makefile.am | 42 ++++++++++++++++++++++++------------------ src/gst/parole-gst.c | 10 ++++++++++ src/parole-player.c | 24 ++++++++++++++++++++++-- 4 files changed, 71 insertions(+), 22 deletions(-) diff --git a/configure.ac.in b/configure.ac.in index adcc998..70c2e2d 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -135,8 +135,6 @@ dnl *** Compile against GTK3 *** dnl ************************************ XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-2], [libxfce4ui_minimum_version]) XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [gtk_minimum_version]) -XDT_CHECK_PACKAGE([CLUTTER], [clutter-1.0], [clutter_minimum_version]) -XDT_CHECK_PACKAGE([CLUTTERGTK], [clutter-gtk-1.0], [cluttergtk_minimum_version]) XDT_CHECK_PACKAGE([GST], [gstreamer-${gstreamer_api_version}], [${gstreamer_minimum_version}]) XDT_CHECK_PACKAGE([GST_BASE], [gstreamer-base-${gstreamer_api_version}], [${gstreamer_minimum_version}]) @@ -179,6 +177,20 @@ if test "x${ac_cv_have_decl_XF86XK_AudioPlay}" != "xno"; then fi # ===================================================== # +# Clutter support # +# ===================================================== # +AC_ARG_ENABLE([clutter], AC_HELP_STRING([--enable-clutter], [Include clutter backend]), + [ac_clutter=$enableval], [ac_clutter=no]) +AC_MSG_CHECKING([whether to build the clutter backend]) +AM_CONDITIONAL([PAROLE_CLUTTER_BACKEND], [test x"$ac_clutter" = x"yes"]) +AC_MSG_RESULT([$ac_clutter]) +if test x"$ac_clutter" = x"yes"; then + XDT_CHECK_PACKAGE([CLUTTER], [clutter-1.0], [clutter_minimum_version]) + XDT_CHECK_PACKAGE([CLUTTERGTK], [clutter-gtk-1.0], [cluttergtk_minimum_version]) + AC_DEFINE([HAVE_CLUTTER], [1], [Define to 1 if clutter is found]) +fi + +# ===================================================== # # TagLib support # # ===================================================== # TAGLIB_FOUND="no" @@ -295,6 +307,7 @@ echo " Optional dependencies: ====================== + Clutter Backend: ${ac_clutter} Taglib: $TAGLIB_FOUND Plugins to build: diff --git a/src/Makefile.am b/src/Makefile.am index a0955f7..7d20013 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -4,7 +4,7 @@ SUBDIRS = \ common \ gst \ dbus \ - plugins + plugins INCLUDES = \ -I$(top_srcdir) \ @@ -20,18 +20,16 @@ INCLUDES = \ -DPAROLE_PLUGINS_DIR=\"$(libdir)/parole-$(PAROLE_VERSION_API)\"\ -DPAROLE_PLUGINS_DATA_DIR=\"$(datadir)/parole/parole-plugins-$(PAROLE_VERSION_API)\"\ -DPAROLE_COMPILATION \ - $(GTHREAD_CFLAGS) \ + $(GTHREAD_CFLAGS) \ $(GIO_CFLAGS) \ $(GMODULE_CFLAGS) \ - $(DBUS_GLIB_CFLAGS) \ - $(LIBXFCE4UI_CFLAGS) \ - $(XFCONF_CFLAGS) \ + $(DBUS_GLIB_CFLAGS) \ + $(LIBXFCE4UI_CFLAGS) \ + $(XFCONF_CFLAGS) \ $(GST_VIDEO_CFLAGS) \ $(GST_INTERFACES_CFLAGS) \ $(TAGLIBC_CFLAGS) \ - $(LIBX11_CFLAGS) \ - $(CLUTTER_CFLAGS) \ - $(CLUTTERGTK_CFLAGS) + $(LIBX11_CFLAGS) GENERATED_FILES = \ gmarshal.c \ @@ -52,8 +50,6 @@ parole_SOURCES = \ parole-medialist.h \ parole-mediachooser.c \ parole-mediachooser.h \ - parole-clutter.c \ - parole-clutter.h \ parole-conf.c \ parole-conf.h \ parole-conf-dialog.c \ @@ -85,23 +81,33 @@ parole_LDADD = \ $(top_builddir)/src/gst/libparolegst.la \ $(top_builddir)/src/common/libparolecommon.la \ $(top_builddir)/src/common/libparolescreensaver.la \ - $(GTHREAD_LIBS) \ + $(GTHREAD_LIBS) \ $(GIO_LIBS) \ $(GMODULE_LIBS) \ - $(DBUS_GLIB_LIBS) \ - $(LIBXFCE4UI_LIBS) \ - $(XFCONF_LIBS) \ + $(DBUS_GLIB_LIBS) \ + $(LIBXFCE4UI_LIBS) \ + $(XFCONF_LIBS) \ $(GST_VIDEO_LIBS) \ $(GST_INTERFACES_LIBS) \ $(TAGLIBC_LIBS) \ - $(LIBX11_LIBS) \ - $(CLUTTER_LIBS) \ - $(CLUTTERGTK_LIBS) + $(LIBX11_LIBS) parole_glib_enum_headers = \ parole-conf.h \ parole-button.h +if PAROLE_CLUTTER_BACKEND +INCLUDES += \ + $(CLUTTER_CFLAGS) \ + $(CLUTTERGTK_CFLAGS) +parole_SOURCES += \ + parole-clutter.c \ + parole-clutter.h +parole_LDADD += \ + $(CLUTTER_LIBS) \ + $(CLUTTERGTK_LIBS) +endif + if MAINTAINER_MODE BUILT_SOURCES = \ @@ -151,7 +157,7 @@ endif EXTRA_DIST = \ gmarshal.list \ org.parole.media.player.xml \ - org.parole.media.list.xml + org.parole.media.list.xml DISTCLEANFILES = \ $(BUILT_SOURCES) \ diff --git a/src/gst/parole-gst.c b/src/gst/parole-gst.c index ba6fbe1..36382bd 100644 --- a/src/gst/parole-gst.c +++ b/src/gst/parole-gst.c @@ -367,7 +367,15 @@ parole_gst_get_video_output_size (ParoleGst *gst, gint *ret_w, gint *ret_h) static void parole_gst_size_allocate (GtkWidget *widget, GtkAllocation *allocation) { +#if HAVE_CLUTTER + ParoleGst *gst; +#endif g_return_if_fail (allocation != NULL); +#if HAVE_CLUTTER + gst = PAROLE_GST(parole_gst_get()); + if (gst->priv->image_sink == CLUTTERSINK) + return; +#endif gtk_widget_set_allocation(widget, allocation); @@ -2185,11 +2193,13 @@ parole_gst_constructed (GObject *object) gst->priv->video_sink = gst_element_factory_make ("xvimagesink", "video"); } +#if HAVE_CLUTTER if (g_strcmp0(videosink, "cluttersink") == 0) { gst->priv->image_sink = CLUTTERSINK; gst->priv->video_sink = gst_element_factory_make ("cluttersink", "video"); } +#endif if ( G_UNLIKELY (gst->priv->video_sink == NULL) ) { diff --git a/src/parole-player.c b/src/parole-player.c index 2be9506..a9c71b8 100644 --- a/src/parole-player.c +++ b/src/parole-player.c @@ -67,7 +67,10 @@ #include "parole-button.h" #include "enum-gtypes.h" #include "parole-debug.h" + +#ifdef HAVE_CLUTTER #include "parole-clutter.h" +#endif #include "gst/gst-enum-types.h" @@ -435,7 +438,10 @@ struct ParolePlayerPrivate gboolean buffering; gboolean wait_for_gst_disc_info; +#ifdef HAVE_CLUTTER GtkWidget *clutter; + gboolean use_clutter; +#endif /* Actions */ GSimpleAction *media_next_action; @@ -1393,7 +1399,10 @@ parole_player_playing (ParolePlayer *player, const ParoleStream *stream) "live", &live, NULL); - parole_clutter_set_video_dimensions (PAROLE_CLUTTER(player->priv->clutter), width, height); +#ifdef HAVE_CLUTTER + if (player->priv->use_clutter) + parole_clutter_set_video_dimensions (PAROLE_CLUTTER(player->priv->clutter), width, height); +#endif if (player->priv->wait_for_gst_disc_info == TRUE) { @@ -3543,7 +3552,10 @@ parole_player_init (ParolePlayer *player) g_object_get (G_OBJECT (player->priv->conf), "videosink", &videosink, NULL); - if (g_strcmp0(videosink, "cluttersink") == 0) + +#ifdef HAVE_CLUTTER + player->priv->use_clutter = g_strcmp0(videosink, "cluttersink") == 0; + if (player->priv->use_clutter) { GtkWidget *clutterbox; GstElement *video_sink; @@ -3565,10 +3577,18 @@ parole_player_init (ParolePlayer *player) gtk_box_pack_start (GTK_BOX (player->priv->videobox), player->priv->gst, TRUE, TRUE, 0); + + gtk_widget_realize (player->priv->gst); + gtk_widget_show (player->priv->gst); } +#else + gtk_box_pack_start (GTK_BOX (player->priv->videobox), + player->priv->gst, + TRUE, TRUE, 0); gtk_widget_realize (player->priv->gst); gtk_widget_show (player->priv->gst); +#endif g_signal_connect (G_OBJECT (parole_gst_get_stream (PAROLE_GST (player->priv->gst))), "notify::seekable", G_CALLBACK (parole_player_seekable_notify), player); -- To stop receiving notification emails like this one, please contact the administrator of this repository. _______________________________________________ Xfce4-commits mailing list [email protected] https://mail.xfce.org/mailman/listinfo/xfce4-commits
