summaryrefslogtreecommitdiff
path: root/nonprism/banshee/Remove-build-time-enable-gapless-playback-option.patch
blob: dec054b5a7e150e2a42ef8aa3afcb81ac4b63b30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
From: Chow Loong Jin <hyperair@debian.org>
Date: Mon, 26 Nov 2012 00:10:19 +0800
Subject: Remove build-time --enable-gapless-playback option

This was previously added to check for a new enough playbin, but since we're now
using Gstreamer 1.0, the playbin version should be new enough, and we can drop
the conditionals.
---
 configure.ac                                       |   15 ---------
 libbanshee/Makefile.am                             |    4 ---
 libbanshee/banshee-player-pipeline.c               |    4 ---
 libbanshee/banshee-player.c                        |   10 ------
 .../Banshee.GStreamer/PlayerEngine.cs              |   32 ++++++--------------
 src/Backends/Banshee.GStreamer/Makefile.am         |    4 ---
 src/Backends/Banshee.GStreamerSharp/Makefile.am    |    4 ---
 7 files changed, 10 insertions(+), 63 deletions(-)

diff --git a/configure.ac b/configure.ac
index ac949c7..5d66fb9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -171,21 +171,6 @@ BANSHEE_CHECK_SOUNDMENU
 dnl Ubuntu One Music Store (optional)
 BANSHEE_CHECK_UBUNTUONE
 
-dnl Gapless, if we have a new-enough playbin2
-ENABLE_GAPLESS="no"
-AC_ARG_ENABLE(gapless-playback,
-	AC_HELP_STRING([--enable-gapless-playback],
-		[Enable gapless playback engine (requires gst-plugins-base > 0.10.25.2)]),
-		enable_gapless=$enableval,
-		enable_gapless=auto)
-if test "x$enable_gapless" != "xno" ; then
-   	PKG_CHECK_MODULES([GST_PLUGINS_BASE], [gstreamer-plugins-base-0.10 > 0.10.25.2], ENABLE_GAPLESS=yes, ENABLE_GAPLESS=no)
-   	if test "x$enable_gapless" == "xyes" -a "x$ENABLE_GAPLESS" == "xno" ; then
-	   	AC_MSG_ERROR([Gapless playback requires gstreamer-plugins-base > 0.10.25.2])
-	fi
-fi
-AM_CONDITIONAL(ENABLE_GAPLESS, test "x$ENABLE_GAPLESS" = "xyes")   
-
 dnl i18n
 SHAMROCK_CONFIGURE_I18N($PACKAGE)
 
diff --git a/libbanshee/Makefile.am b/libbanshee/Makefile.am
index 6ed369a..a05c492 100644
--- a/libbanshee/Makefile.am
+++ b/libbanshee/Makefile.am
@@ -6,10 +6,6 @@ INCLUDES = \
 	$(LIBBANSHEE_CFLAGS) \
 	$(GST_CFLAGS) 
 
-if ENABLE_GAPLESS
-INCLUDES += -DENABLE_GAPLESS
-endif
-
 bansheelibdir = $(pkglibdir)
 bansheelib_LTLIBRARIES = libbanshee.la
 
diff --git a/libbanshee/banshee-player-pipeline.c b/libbanshee/banshee-player-pipeline.c
index 6c2af35..d4977e1 100644
--- a/libbanshee/banshee-player-pipeline.c
+++ b/libbanshee/banshee-player-pipeline.c
@@ -239,7 +239,6 @@ bp_pipeline_bus_callback (GstBus *bus, GstMessage *message, gpointer userdata)
     return TRUE;
 }
 
-#ifdef ENABLE_GAPLESS
 static void bp_about_to_finish_callback (GstElement *playbin, BansheePlayer *player)
 {
     g_return_if_fail (IS_BANSHEE_PLAYER (player));
@@ -257,7 +256,6 @@ static void bp_about_to_finish_callback (GstElement *playbin, BansheePlayer *pla
         player->about_to_finish_cb (player);
     }
 }
-#endif //ENABLE_GAPLESS
 
 static void bp_volume_changed_callback (GstElement *playbin, GParamSpec *spec, BansheePlayer *player)
 {
@@ -296,12 +294,10 @@ _bp_pipeline_construct (BansheePlayer *player)
     // source and decoder elements) based on source URI and stream content
     player->playbin = gst_element_factory_make ("playbin", "playbin");
 
-#ifdef ENABLE_GAPLESS
     // FIXME: Connect a proxy about-to-finish callback that will generate a next-track-starting callback.
     // This can be removed once playbin generates its own next-track signal.
     // bgo#584987 - this is included in >= 0.10.26
     g_signal_connect (player->playbin, "about-to-finish", G_CALLBACK (bp_about_to_finish_callback), player);
-#endif //ENABLE_GAPLESS
 
     g_return_val_if_fail (player->playbin != NULL, FALSE);
 
diff --git a/libbanshee/banshee-player.c b/libbanshee/banshee-player.c
index b8f98b8..08c4f94 100644
--- a/libbanshee/banshee-player.c
+++ b/libbanshee/banshee-player.c
@@ -303,16 +303,6 @@ bp_can_seek (BansheePlayer *player)
 }
 
 P_INVOKE gboolean
-bp_supports_gapless (BansheePlayer *player)
-{
-#ifdef ENABLE_GAPLESS
-    return TRUE;
-#else
-    return FALSE;
-#endif //ENABLE_GAPLESS
-}
-
-P_INVOKE gboolean
 bp_audiosink_has_volume (BansheePlayer *player)
 {
     g_return_val_if_fail (IS_BANSHEE_PLAYER (player), FALSE);
diff --git a/src/Backends/Banshee.GStreamer/Banshee.GStreamer/PlayerEngine.cs b/src/Backends/Banshee.GStreamer/Banshee.GStreamer/PlayerEngine.cs
index 278ff51..05b1905 100644
--- a/src/Backends/Banshee.GStreamer/Banshee.GStreamer/PlayerEngine.cs
+++ b/src/Backends/Banshee.GStreamer/Banshee.GStreamer/PlayerEngine.cs
@@ -747,16 +747,11 @@ namespace Banshee.GStreamer
             get { return gapless_enabled; }
             set
             {
-                if (bp_supports_gapless (handle)) {
-                    gapless_enabled = value;
-                    if (value) {
-                        bp_set_about_to_finish_callback (handle, about_to_finish_callback);
-                    } else {
-                        bp_set_about_to_finish_callback (handle, null);
-                    }
+                gapless_enabled = value;
+                if (value) {
+                    bp_set_about_to_finish_callback (handle, about_to_finish_callback);
                 } else {
-                    gapless_enabled = false;
-                    next_track_pending = false;
+                    bp_set_about_to_finish_callback (handle, null);
                 }
             }
         }
@@ -881,13 +876,11 @@ namespace Banshee.GStreamer
                 Catalog.GetString ("For tracks that have ReplayGain data, automatically scale (normalize) playback volume"),
                 delegate { ReplayGainEnabled = ReplayGainEnabledSchema.Get (); }
             ));
-            if (bp_supports_gapless (handle)) {
-                gapless_preference = service["general"]["misc"].Add (new SchemaPreference<bool> (GaplessEnabledSchema,
-                        Catalog.GetString ("Enable _gapless playback"),
-                        Catalog.GetString ("Eliminate the small playback gap on track change. Useful for concept albums and classical music"),
-                        delegate { GaplessEnabled = GaplessEnabledSchema.Get (); }
-                ));
-            }
+            gapless_preference = service["general"]["misc"].Add (new SchemaPreference<bool> (GaplessEnabledSchema,
+                    Catalog.GetString ("Enable _gapless playback"),
+                    Catalog.GetString ("Eliminate the small playback gap on track change. Useful for concept albums and classical music"),
+                    delegate { GaplessEnabled = GaplessEnabledSchema.Get (); }
+            ));
         }
 
         private void UninstallPreferences ()
@@ -898,9 +891,7 @@ namespace Banshee.GStreamer
             }
 
             service["general"]["misc"].Remove (replaygain_preference);
-            if (bp_supports_gapless (handle)) {
-                service["general"]["misc"].Remove (gapless_preference);
-            }
+            service["general"]["misc"].Remove (gapless_preference);
             replaygain_preference = null;
             gapless_preference = null;
         }
@@ -969,9 +960,6 @@ namespace Banshee.GStreamer
             BansheePlayerAboutToFinishCallback cb);
 
         [DllImport ("libbanshee.dll")]
-        private static extern bool bp_supports_gapless (HandleRef player);
-
-        [DllImport ("libbanshee.dll")]
         private static extern bool bp_open (HandleRef player, IntPtr uri, bool maybeVideo);
 
         [DllImport ("libbanshee.dll")]
diff --git a/src/Backends/Banshee.GStreamer/Makefile.am b/src/Backends/Banshee.GStreamer/Makefile.am
index 118e525..321b270 100644
--- a/src/Backends/Banshee.GStreamer/Makefile.am
+++ b/src/Backends/Banshee.GStreamer/Makefile.am
@@ -16,7 +16,3 @@ include $(top_srcdir)/build/build.mk
 
 EXTRA_DIST += Banshee.GStreamer.dll.config
 module_SCRIPTS += Banshee.GStreamer.dll.config
-
-if ENABLE_GAPLESS
-BUILD_DEFINES="-define:ENABLE_GAPLESS"
-endif
\ No newline at end of file
diff --git a/src/Backends/Banshee.GStreamerSharp/Makefile.am b/src/Backends/Banshee.GStreamerSharp/Makefile.am
index 69424d7..769b260 100644
--- a/src/Backends/Banshee.GStreamerSharp/Makefile.am
+++ b/src/Backends/Banshee.GStreamerSharp/Makefile.am
@@ -23,7 +23,3 @@ else
 include $(top_srcdir)/build/build.dist.mk
 EXTRA_DIST += Banshee.GStreamerSharp.dll.config
 endif
-
-if ENABLE_GAPLESS
-BUILD_DEFINES="-define:ENABLE_GAPLESS"
-endif