From c3d6f4b63b37994a14099e0e88e8ae87121cb7bf Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 4 Dec 2014 21:06:18 +0100 Subject: dvd, bd: don't unnecessarily block on demuxer/stream all the time This was completely breaking any low-level caching. Change it so that at least demuxer caching will work. Do this by using the metadata cache mechanism to funnel through the menu commands. For some incomprehensible reason, I had to reorder the events (which affects their delivery priority), or they would be ignored. Probably some crap about the event state being cleared before it could be delivered. I don't give a shit. All this code sucks. It would probably be better to let discnav.c access the menu event "queue" directly, and to synchronize access with a mutex, instead of going through all the caching layers, making things complicated and slow. --- demux/demux_disc.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'demux/demux_disc.c') diff --git a/demux/demux_disc.c b/demux/demux_disc.c index e92198f0af..751b81281f 100644 --- a/demux/demux_disc.c +++ b/demux/demux_disc.c @@ -349,6 +349,9 @@ static int d_control(demuxer_t *demuxer, int cmd, void *arg) case DEMUXER_CTRL_SWITCHED_TRACKS: reselect_streams(demuxer); return DEMUXER_CTRL_OK; + case DEMUXER_CTRL_GET_NAV_EVENT: + return stream_control(demuxer->stream, STREAM_CTRL_GET_NAV_EVENT, arg) + == STREAM_OK ? DEMUXER_CTRL_OK : DEMUXER_CTRL_DONTKNOW; } return demux_control(p->slave, cmd, arg); } -- cgit v1.2.3