Thorsten Wißmann | 28 Jul 12:09 2015
Picon

[PATCH] MPC: command: let listall print songs only

Formerly, the output of

    mpc listall --format ''

included directory paths and not only songs. Attached you can find the
patch 0001-command-let-listall-print-songs-only.patch which limits the
output songs (as it is already described by mpc's man page).

You can apply the patch by piping it through git am. Feel free to adjust
the commit message :-)

Cheers,
Thorsten
_______________________________________________
mpd-devel mailing list
mpd-devel <at> musicpd.org
http://mailman.blarg.de/listinfo/mpd-devel
Alex | 23 Jul 13:36 2015

CurlInputPlugin : broken connection sometimes

Hi All,

I am using MPD to play some http streaming musics. Sometimes the connections will be broken because network
may become bad suddenly, and then MPD will play the next song. It's a very sick experience.

After I debug the codes, I found that there's not any code to retry to connect again where Curl return error. 
The error of Curl will be like this: "recv failure: connection reset by peer".

Any idea to add some retries to CurlInputPlugin.cxx? Sorry I am not very familiar with Curl Muti and MPD. Any helps?

Thanks so much! 

P.S. I really think that it's very very sick experience what the MPD will play the next song when network
become bad suddenly!
_______________________________________________
mpd-devel mailing list
mpd-devel <at> musicpd.org
http://mailman.blarg.de/listinfo/mpd-devel
Wieland Hoffmann | 17 Jul 19:55 2015
Picon

[PATCH] mpd.service: Set the Documentation option

This makes references to mpd(1) and mpd(5) appear in systemd status output.
---
 systemd/mpd.service.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/systemd/mpd.service.in b/systemd/mpd.service.in
index a72eb92..caf0d67 100644
--- a/systemd/mpd.service.in
+++ b/systemd/mpd.service.in
 <at>  <at>  -1,5 +1,6  <at>  <at> 
 [Unit]
 Description=Music Player Daemon
+Documentation=man:mpd(1) man:mpd.conf(5)
 After=network.target sound.target

 [Service]
--

-- 
2.4.6

_______________________________________________
mpd-devel mailing list
mpd-devel <at> musicpd.org
http://mailman.blarg.de/listinfo/mpd-devel
Andreas Mair | 28 Jun 08:40 2015
Picon

find track "1" not working as expected

Hi,

I'm trying to find out why MPDroid is so slow when it lists an
artist's albums. So I enabled debug logging in MPD and noticed that
MPDroid issues three MPD queries for each album it has to show.

For example:
client: [12] process command "find "albumartist" "Aerosmith" "album"
"Pump" "track" "1""
client: [12] command returned 0
client: [12] process command "find "albumartist" "Aerosmith" "album"
"Pump" "track" "01""
client: [12] command returned 0
client: [12] process command "search "albumartist" "Aerosmith" "album"
"Pump" "track" "1""
client: [12] command returned 0

I would expect, that the first command (track "1") should work, but
there's no result. That's also true for the second command (track
"01"). The third command returns every song of that album (because it
has 10 songs).
I've taken a look at the MPD sources and I think the problem is, that
MPD tries an exact *string* match. If I use "... find 01/10" it works,
but I think that's not ideal to work like this because one has to know
(1)  how many songs an album has and (2) if the number of total tracks
is stored and (3) if leading zeros are used.

I'd suggest that MPD uses *numeric* matches for numeric fields like
track or disc number. Or do I miss something?

(Continue reading)

Florian Schlichting | 23 Jun 00:38 2015
Picon
Picon

six Debian patches

Hi,

in response to Debian bugs, the Debian mpd package has accumulated a
number of smallish patches (mostly docmentation), which I'd like to
forward for discussion and inclusion. Please see attached.

Florian
Attachment (00-typo.patch): text/x-diff, 478 bytes
Attachment (02-protect_system.patch): text/x-diff, 441 bytes
Attachment (04-curl-proxy.patch): text/x-diff, 677 bytes
_______________________________________________
mpd-devel mailing list
mpd-devel <at> musicpd.org
http://mailman.blarg.de/listinfo/mpd-devel
Christian Halaszovich | 22 Jun 16:42 2015
Picon

[PATCH] Emit a warning if the OutputThread fails to get realtime scheduling

This only applies to linux systems. Here, sched_setscheduler() is
called to get realtime scheduling. With this patch, the return value
of this function is now checked and a warning / error message is
generated if it fails.
---
  src/output/OutputThread.cxx |  7 ++++++-
  src/thread/Util.hxx         | 19 +++++++++++++++----
  2 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/src/output/OutputThread.cxx b/src/output/OutputThread.cxx
index 9baaaf0..d2f9ea8 100644
--- a/src/output/OutputThread.cxx
+++ b/src/output/OutputThread.cxx
 <at>  <at>  -587,7 +587,12  <at>  <at>  AudioOutput::Task()
  {
  	FormatThreadName("output:%s", name);

-	SetThreadRealtime();
+	Error error;
+	if(!SetThreadRealtime(error)) {
+		LogError(error);
+		LogWarning(output_domain,
+			"OutputThread could not get realtime scheduling, continuing anyway");
+	}
  	SetThreadTimerSlackUS(100);

  	mutex.lock();
diff --git a/src/thread/Util.hxx b/src/thread/Util.hxx
index ff8dbbe..fdc767c 100644
--- a/src/thread/Util.hxx
(Continue reading)

Christian Halaszovich | 18 Jun 12:02 2015
Picon

[PATCH] Emmit a warning if the OutputThread fails to get realtime scheduling


This only applies to linux systems. Here, sched_setscheduler() is
called to get realtime scheduling. With this patch, the return value
of this function is now checked and a warning and an error message are
generated if it failed.
---
 src/output/OutputThread.cxx |  7 ++++++-
 src/thread/Util.hxx         | 19 +++++++++++++++----
 2 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/src/output/OutputThread.cxx b/src/output/OutputThread.cxx
index 9baaaf0..d2f9ea8 100644
--- a/src/output/OutputThread.cxx
+++ b/src/output/OutputThread.cxx
<at> <at> -587,7 +587,12 <at> <at> AudioOutput::Task()
 {
  FormatThreadName("output:%s", name);
 
- SetThreadRealtime();
+ Error error;
+ if(!SetThreadRealtime(error)) {
+ LogError(error);
+ LogWarning(output_domain,
+ "OutputThread could not get realtime scheduling, continuing anyway");
+ }
  SetThreadTimerSlackUS(100);
 
  mutex.lock();
diff --git a/src/thread/Util.hxx b/src/thread/Util.hxx
index ff8dbbe..fdc767c 100644
--- a/src/thread/Util.hxx
+++ b/src/thread/Util.hxx
<at> <at> -30,6 +30,8 <at> <at>
 #ifndef THREAD_UTIL_HXX
 #define THREAD_UTIL_HXX
 
+#include "util/Error.hxx"
+
 #ifdef __linux__
 #include <sched.h>
 #include <sys/syscall.h>
<at> <at> -81,9 +83,11 <at> <at> SetThreadIdlePriority()
 
 /**
  * Raise the current thread's priority to "real-time" (very high).
+ * <at> param[out] error Receives error information on failure 
+ * <at> return true on success (always true on non-linux systems)
  */
-static inline void
-SetThreadRealtime()
+static inline bool
+SetThreadRealtime(Error& error)
 {
 #ifdef __linux__
  struct sched_param sched_param;
<at> <at> -94,8 +98,15 <at> <at> SetThreadRealtime()
  policy |= SCHED_RESET_ON_FORK;
 #endif
 
- sched_setscheduler(0, policy, &sched_param);
-#endif
+ if(sched_setscheduler(0, policy, &sched_param)==0) {
+ return true;
+ } else {
+ error.FormatErrno("sched_setscheduler failed");
+ return false;
+ }
+#else
+ return true; // on non-linux systems, we pretend it worked
+#endif // __linux__
 };
 
 #endif
-- 
1.9.1

_______________________________________________
mpd-devel mailing list
mpd-devel <at> musicpd.org
http://mailman.blarg.de/listinfo/mpd-devel
Christian Halaszovich | 17 Jun 13:34 2015
Picon

[PATCH 1/2] SetThreadRealtime() now reports if getting realtime scheduling was successful. (Only meaningful on Linux systems.)

Hello mpd developers,

after using mpd for quite some time I would like to contribute a little to its development.

Under certain circumstances, on linux systems OutputThread fails to get realtime scheduling. I think it would be useful to inform the user when this happens. Therefore I'm submitting 2 patches.

Patch 1/2. Check the return value of sched_setscheduler() in SetThreadRealtime. Report to the caller, if we were successful. To this end SetThreadRealtime now returns false, if ached_setschedluer failed or true on all other cases. On non-linux systems SetThreadRealtime does not do anything and will always return true.

Patch 2/2. In OutputThread (seems to be the only caller of SetThreadRelatime) the return value is checked. If SetThreadRealtime failed, a warning is logged using LogWarning. I decide to put LogWarning here, since the caller of SetThreadRealtime should decide how to handle this.

Please let me know what you think about this.

Best,
Christian Halaszovich

---
 src/thread/Util.hxx | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/thread/Util.hxx b/src/thread/Util.hxx
index ff8dbbe..5e63e44 100644
--- a/src/thread/Util.hxx
+++ b/src/thread/Util.hxx
<at> <at> -81,10 +81,12 <at> <at> SetThreadIdlePriority()
 
 /**
  * Raise the current thread's priority to "real-time" (very high).
+ * return value: true on success
  */
-static inline void
+static inline bool
 SetThreadRealtime()
 {
+ bool success = true;
 #ifdef __linux__
  struct sched_param sched_param;
  sched_param.sched_priority = 50;
<at> <at> -94,8 +96,9 <at> <at> SetThreadRealtime()
  policy |= SCHED_RESET_ON_FORK;
 #endif
 
- sched_setscheduler(0, policy, &sched_param);
+ success = 0==sched_setscheduler(0, policy, &sched_param);
 #endif
+ return success; // on non-linux machines we will always pretend it worked
 };
 
 #endif
-- 
1.9.1

_______________________________________________
mpd-devel mailing list
mpd-devel <at> musicpd.org
http://mailman.blarg.de/listinfo/mpd-devel
Christian Halaszovich | 17 Jun 13:36 2015
Picon

[PATCH 2/2] Added a warning that will be logged if OutputThread fails to get realtime scheduling.

---
 src/output/OutputThread.cxx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/output/OutputThread.cxx b/src/output/OutputThread.cxx
index 9baaaf0..c16942d 100644
--- a/src/output/OutputThread.cxx
+++ b/src/output/OutputThread.cxx
<at> <at> -587,7 +587,9 <at> <at> AudioOutput::Task()
 {
  FormatThreadName("output:%s", name);
 
- SetThreadRealtime();
+ if(!SetThreadRealtime()) {
+ LogWarning(output_domain, "OutputThread could not get realtime scheduling, continuing anyway");
+ }
  SetThreadTimerSlackUS(100);
 
  mutex.lock();
-- 
1.9.1

_______________________________________________
mpd-devel mailing list
mpd-devel <at> musicpd.org
http://mailman.blarg.de/listinfo/mpd-devel
salorium ♥ | 12 Jun 09:29 2015
Picon

Add Elapsed time in mpc‏

Hello,
i want a git account for add elapsed time on mpc

real name : Saleur Geoffrey
email address : salorium <at> hotmail.fr
preferred user name : salorium
projects you wish to work on : mpc
SSH public key(s) (as attachment or URL, do not copy and paste) : http://salorium.com/id_rsa.pub

Elapsed time:
https://github.com/salorium/mpc

Thank you,
_______________________________________________
mpd-devel mailing list
mpd-devel <at> musicpd.org
http://mailman.blarg.de/listinfo/mpd-devel
salorium ♥ | 27 May 22:08 2015
Picon

Add Elapsed time in mpc

Hello,
i want a git account for add elapsed time on mpc
  1. real name : Saleur Geoffrey
  2. email address : salorium <at> hotmail.fr
  3. preferred user name : salorium
  4. projects you wish to work on : mpc
  5. SSH public key(s) (as attachment or URL, do not copy and paste) : http://salorium.com/id_rsa.pub
Elapsed time :
https://github.com/salorium/mpc

Thank you,

_______________________________________________
mpd-devel mailing list
mpd-devel <at> musicpd.org
http://mailman.blarg.de/listinfo/mpd-devel

Gmane