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.
This commit is contained in:
wm4
2014-12-04 21:06:18 +01:00
parent 6e7942af50
commit c3d6f4b63b
5 changed files with 27 additions and 3 deletions

View File

@@ -27,13 +27,13 @@
// Note: order matters somewhat (stream_dvdnav sends them in numeric order)
enum mp_nav_event_type {
MP_NAV_EVENT_NONE,
MP_NAV_EVENT_MENU_MODE, // menu mode on/off
MP_NAV_EVENT_HIGHLIGHT, // highlight changed
MP_NAV_EVENT_RESET, // reinitialize some things
MP_NAV_EVENT_RESET_CLUT, // reinitialize sub palette
MP_NAV_EVENT_RESET_ALL, // reinitialize all things
MP_NAV_EVENT_DRAIN, // reply with MP_NAV_CMD_DRAIN_OK
MP_NAV_EVENT_STILL_FRAME, // keep displaying current frame
MP_NAV_EVENT_HIGHLIGHT, // highlight changed
MP_NAV_EVENT_MENU_MODE, // menu mode on/off
MP_NAV_EVENT_EOF, // it's over
MP_NAV_EVENT_OVERLAY, // overlay changed
};