From 4d07fce04175bf353e8de538571d3afa2c7b3e00 Mon Sep 17 00:00:00 2001 From: Ricardo Constantino Date: Wed, 29 Mar 2017 02:16:11 +0100 Subject: stream/stream_dvdnav: show list of titles on verbose Same as stream_bluray, but only if no title is selected already. --- stream/stream_dvdnav.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'stream/stream_dvdnav.c') diff --git a/stream/stream_dvdnav.c b/stream/stream_dvdnav.c index e4516fc295..fc7ddfdc58 100644 --- a/stream/stream_dvdnav.c +++ b/stream/stream_dvdnav.c @@ -473,6 +473,7 @@ static int open_s_internal(stream_t *stream) int best_title = -1; int32_t num_titles; if (dvdnav_get_number_of_titles(dvdnav, &num_titles) == DVDNAV_STATUS_OK) { + MP_VERBOSE(stream, "List of available titles:\n"); for (int n = 1; n <= num_titles; n++) { uint64_t *parts = NULL, duration = 0; dvdnav_describe_title_chapters(dvdnav, n, &parts, &duration); @@ -481,6 +482,12 @@ static int open_s_internal(stream_t *stream) best_length = duration; best_title = n; } + if (duration > 90000) { // arbitrarily ignore <1s titles + char *time = mp_format_time(duration / 90000, false); + MP_VERBOSE(stream, "title: %3d duration: %s\n", + n - 1, time); + talloc_free(time); + } free(parts); } } -- cgit v1.2.3