Created
September 15, 2018 18:50
-
-
Save theirix/98bd244e8837bfb3bdc0ac97221703fc to your computer and use it in GitHub Desktop.
cantata-dumpPlayer.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/mpd-interface/httpstream.cpp b/mpd-interface/httpstream.cpp | |
index a8b9cc0e..27cdfbe2 100644 | |
--- a/mpd-interface/httpstream.cpp | |
+++ b/mpd-interface/httpstream.cpp | |
@@ -288,4 +288,22 @@ void HttpStream::stopTimer() | |
playStateChecks=0; | |
} | |
+void HttpStream::dumpPlayer() | |
+{ | |
+#ifndef LIBVLC_FOUND | |
+ if (player) | |
+ { | |
+ DBUG << " player state" << player->state() | |
+ << " media status" << player->mediaStatus() | |
+ << " media" << player->media().canonicalUrl(); | |
+ if (player->error() != QMediaPlayer::NoError) | |
+ { | |
+ DBUG << " player error code " << player->error() | |
+ << ":" << player->errorString(); | |
+ } | |
+ } | |
+#endif | |
+} | |
+ | |
+ | |
#include "moc_httpstream.cpp" | |
diff --git a/mpd-interface/httpstream.h b/mpd-interface/httpstream.h | |
index 914b7425..c79ab178 100644 | |
--- a/mpd-interface/httpstream.h | |
+++ b/mpd-interface/httpstream.h | |
@@ -67,6 +67,8 @@ private: | |
void startTimer(); | |
void stopTimer(); | |
+ void dumpPlayer(); | |
+ | |
private: | |
bool enabled; | |
bool muted; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment