summaryrefslogtreecommitdiffstats
path: root/mpvcore
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-09-10 17:21:59 +0200
committerwm4 <wm4@nowhere>2013-09-10 17:21:59 +0200
commitfc18c1ba6e91a6a303fad2dd079cdf594fbf8c5f (patch)
treed4fd51100cf24a8c66d76cd7bde686862595aac0 /mpvcore
parent6a850b02647c062f3ae48aaa180bf7ea1fe30576 (diff)
downloadmpv-fc18c1ba6e91a6a303fad2dd079cdf594fbf8c5f.tar.bz2
mpv-fc18c1ba6e91a6a303fad2dd079cdf594fbf8c5f.tar.xz
mplayer: print libquvi results in verbose mode
Helpful for debugging.
Diffstat (limited to 'mpvcore')
-rw-r--r--mpvcore/mplayer.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/mpvcore/mplayer.c b/mpvcore/mplayer.c
index 3590168d22..5470f9c6ba 100644
--- a/mpvcore/mplayer.c
+++ b/mpvcore/mplayer.c
@@ -4164,6 +4164,36 @@ static struct mp_resolve_result *resolve_url(const char *filename,
#endif
}
+static void print_resolve_contents(struct mp_log *log,
+ struct mp_resolve_result *res)
+{
+ mp_msg_log(log, MSGL_V, "Resolve:\n");
+ mp_msg_log(log, MSGL_V, " title: %s\n", res->title);
+ mp_msg_log(log, MSGL_V, " url: %s\n", res->url);
+ for (int n = 0; n < res->num_srcs; n++) {
+ mp_msg_log(log, MSGL_V, " source %d:\n", n);
+ if (res->srcs[n]->url)
+ mp_msg_log(log, MSGL_V, " url: %s\n", res->srcs[n]->url);
+ if (res->srcs[n]->encid)
+ mp_msg_log(log, MSGL_V, " encid: %s\n", res->srcs[n]->encid);
+ }
+ for (int n = 0; n < res->num_subs; n++) {
+ mp_msg_log(log, MSGL_V, " subtitle %d:\n", n);
+ if (res->subs[n]->url)
+ mp_msg_log(log, MSGL_V, " url: %s\n", res->subs[n]->url);
+ if (res->subs[n]->lang)
+ mp_msg_log(log, MSGL_V, " lang: %s\n", res->subs[n]->lang);
+ if (res->subs[n]->data) {
+ mp_msg_log(log, MSGL_V, " data: %d bytes\n",
+ strlen(res->subs[n]->data));
+ }
+ }
+ if (res->playlist) {
+ mp_msg_log(log, MSGL_V, " playlist with %d entries\n",
+ playlist_entry_count(res->playlist));
+ }
+}
+
// Waiting for the slave master to send us a new file to play.
static void idle_loop(struct MPContext *mpctx)
{
@@ -4305,6 +4335,7 @@ static void play_current_file(struct MPContext *mpctx)
char *stream_filename = mpctx->filename;
mpctx->resolve_result = resolve_url(stream_filename, opts);
if (mpctx->resolve_result) {
+ print_resolve_contents(mpctx->log, mpctx->resolve_result);
if (mpctx->resolve_result->playlist) {
transfer_playlist(mpctx, mpctx->resolve_result->playlist);
goto terminate_playback;