1 From: Chow Loong Jin <hyperair@debian.org>
2 Date: Mon, 26 Nov 2012 00:10:19 +0800
3 Subject: Remove build-time --enable-gapless-playback option
5 This was previously added to check for a new enough playbin, but since we're now
6 using Gstreamer 1.0, the playbin version should be new enough, and we can drop
9 configure.ac | 15 ---------
10 libbanshee/Makefile.am | 4 ---
11 libbanshee/banshee-player-pipeline.c | 4 ---
12 libbanshee/banshee-player.c | 10 ------
13 .../Banshee.GStreamer/PlayerEngine.cs | 32 ++++++--------------
14 src/Backends/Banshee.GStreamer/Makefile.am | 4 ---
15 src/Backends/Banshee.GStreamerSharp/Makefile.am | 4 ---
16 7 files changed, 10 insertions(+), 63 deletions(-)
18 diff --git a/configure.ac b/configure.ac
19 index ac949c7..5d66fb9 100644
22 @@ -171,21 +171,6 @@ BANSHEE_CHECK_SOUNDMENU
23 dnl Ubuntu One Music Store (optional)
24 BANSHEE_CHECK_UBUNTUONE
26 -dnl Gapless, if we have a new-enough playbin2
28 -AC_ARG_ENABLE(gapless-playback,
29 - AC_HELP_STRING([--enable-gapless-playback],
30 - [Enable gapless playback engine (requires gst-plugins-base > 0.10.25.2)]),
31 - enable_gapless=$enableval,
32 - enable_gapless=auto)
33 -if test "x$enable_gapless" != "xno" ; then
34 - PKG_CHECK_MODULES([GST_PLUGINS_BASE], [gstreamer-plugins-base-0.10 > 0.10.25.2], ENABLE_GAPLESS=yes, ENABLE_GAPLESS=no)
35 - if test "x$enable_gapless" == "xyes" -a "x$ENABLE_GAPLESS" == "xno" ; then
36 - AC_MSG_ERROR([Gapless playback requires gstreamer-plugins-base > 0.10.25.2])
39 -AM_CONDITIONAL(ENABLE_GAPLESS, test "x$ENABLE_GAPLESS" = "xyes")
42 SHAMROCK_CONFIGURE_I18N($PACKAGE)
44 diff --git a/libbanshee/Makefile.am b/libbanshee/Makefile.am
45 index 6ed369a..a05c492 100644
46 --- a/libbanshee/Makefile.am
47 +++ b/libbanshee/Makefile.am
48 @@ -6,10 +6,6 @@ INCLUDES = \
49 $(LIBBANSHEE_CFLAGS) \
53 -INCLUDES += -DENABLE_GAPLESS
56 bansheelibdir = $(pkglibdir)
57 bansheelib_LTLIBRARIES = libbanshee.la
59 diff --git a/libbanshee/banshee-player-pipeline.c b/libbanshee/banshee-player-pipeline.c
60 index 6c2af35..d4977e1 100644
61 --- a/libbanshee/banshee-player-pipeline.c
62 +++ b/libbanshee/banshee-player-pipeline.c
63 @@ -239,7 +239,6 @@ bp_pipeline_bus_callback (GstBus *bus, GstMessage *message, gpointer userdata)
67 -#ifdef ENABLE_GAPLESS
68 static void bp_about_to_finish_callback (GstElement *playbin, BansheePlayer *player)
70 g_return_if_fail (IS_BANSHEE_PLAYER (player));
71 @@ -257,7 +256,6 @@ static void bp_about_to_finish_callback (GstElement *playbin, BansheePlayer *pla
72 player->about_to_finish_cb (player);
75 -#endif //ENABLE_GAPLESS
77 static void bp_volume_changed_callback (GstElement *playbin, GParamSpec *spec, BansheePlayer *player)
79 @@ -296,12 +294,10 @@ _bp_pipeline_construct (BansheePlayer *player)
80 // source and decoder elements) based on source URI and stream content
81 player->playbin = gst_element_factory_make ("playbin", "playbin");
83 -#ifdef ENABLE_GAPLESS
84 // FIXME: Connect a proxy about-to-finish callback that will generate a next-track-starting callback.
85 // This can be removed once playbin generates its own next-track signal.
86 // bgo#584987 - this is included in >= 0.10.26
87 g_signal_connect (player->playbin, "about-to-finish", G_CALLBACK (bp_about_to_finish_callback), player);
88 -#endif //ENABLE_GAPLESS
90 g_return_val_if_fail (player->playbin != NULL, FALSE);
92 diff --git a/libbanshee/banshee-player.c b/libbanshee/banshee-player.c
93 index b8f98b8..08c4f94 100644
94 --- a/libbanshee/banshee-player.c
95 +++ b/libbanshee/banshee-player.c
96 @@ -303,16 +303,6 @@ bp_can_seek (BansheePlayer *player)
100 -bp_supports_gapless (BansheePlayer *player)
102 -#ifdef ENABLE_GAPLESS
106 -#endif //ENABLE_GAPLESS
110 bp_audiosink_has_volume (BansheePlayer *player)
112 g_return_val_if_fail (IS_BANSHEE_PLAYER (player), FALSE);
113 diff --git a/src/Backends/Banshee.GStreamer/Banshee.GStreamer/PlayerEngine.cs b/src/Backends/Banshee.GStreamer/Banshee.GStreamer/PlayerEngine.cs
114 index 278ff51..05b1905 100644
115 --- a/src/Backends/Banshee.GStreamer/Banshee.GStreamer/PlayerEngine.cs
116 +++ b/src/Backends/Banshee.GStreamer/Banshee.GStreamer/PlayerEngine.cs
117 @@ -747,16 +747,11 @@ namespace Banshee.GStreamer
118 get { return gapless_enabled; }
121 - if (bp_supports_gapless (handle)) {
122 - gapless_enabled = value;
124 - bp_set_about_to_finish_callback (handle, about_to_finish_callback);
126 - bp_set_about_to_finish_callback (handle, null);
128 + gapless_enabled = value;
130 + bp_set_about_to_finish_callback (handle, about_to_finish_callback);
132 - gapless_enabled = false;
133 - next_track_pending = false;
134 + bp_set_about_to_finish_callback (handle, null);
138 @@ -881,13 +876,11 @@ namespace Banshee.GStreamer
139 Catalog.GetString ("For tracks that have ReplayGain data, automatically scale (normalize) playback volume"),
140 delegate { ReplayGainEnabled = ReplayGainEnabledSchema.Get (); }
142 - if (bp_supports_gapless (handle)) {
143 - gapless_preference = service["general"]["misc"].Add (new SchemaPreference<bool> (GaplessEnabledSchema,
144 - Catalog.GetString ("Enable _gapless playback"),
145 - Catalog.GetString ("Eliminate the small playback gap on track change. Useful for concept albums and classical music"),
146 - delegate { GaplessEnabled = GaplessEnabledSchema.Get (); }
149 + gapless_preference = service["general"]["misc"].Add (new SchemaPreference<bool> (GaplessEnabledSchema,
150 + Catalog.GetString ("Enable _gapless playback"),
151 + Catalog.GetString ("Eliminate the small playback gap on track change. Useful for concept albums and classical music"),
152 + delegate { GaplessEnabled = GaplessEnabledSchema.Get (); }
156 private void UninstallPreferences ()
157 @@ -898,9 +891,7 @@ namespace Banshee.GStreamer
160 service["general"]["misc"].Remove (replaygain_preference);
161 - if (bp_supports_gapless (handle)) {
162 - service["general"]["misc"].Remove (gapless_preference);
164 + service["general"]["misc"].Remove (gapless_preference);
165 replaygain_preference = null;
166 gapless_preference = null;
168 @@ -969,9 +960,6 @@ namespace Banshee.GStreamer
169 BansheePlayerAboutToFinishCallback cb);
171 [DllImport ("libbanshee.dll")]
172 - private static extern bool bp_supports_gapless (HandleRef player);
174 - [DllImport ("libbanshee.dll")]
175 private static extern bool bp_open (HandleRef player, IntPtr uri, bool maybeVideo);
177 [DllImport ("libbanshee.dll")]
178 diff --git a/src/Backends/Banshee.GStreamer/Makefile.am b/src/Backends/Banshee.GStreamer/Makefile.am
179 index 118e525..321b270 100644
180 --- a/src/Backends/Banshee.GStreamer/Makefile.am
181 +++ b/src/Backends/Banshee.GStreamer/Makefile.am
182 @@ -16,7 +16,3 @@ include $(top_srcdir)/build/build.mk
184 EXTRA_DIST += Banshee.GStreamer.dll.config
185 module_SCRIPTS += Banshee.GStreamer.dll.config
188 -BUILD_DEFINES="-define:ENABLE_GAPLESS"
190 \ No newline at end of file
191 diff --git a/src/Backends/Banshee.GStreamerSharp/Makefile.am b/src/Backends/Banshee.GStreamerSharp/Makefile.am
192 index 69424d7..769b260 100644
193 --- a/src/Backends/Banshee.GStreamerSharp/Makefile.am
194 +++ b/src/Backends/Banshee.GStreamerSharp/Makefile.am
195 @@ -23,7 +23,3 @@ else
196 include $(top_srcdir)/build/build.dist.mk
197 EXTRA_DIST += Banshee.GStreamerSharp.dll.config
201 -BUILD_DEFINES="-define:ENABLE_GAPLESS"