diff options
author | Siggi Langauf <siggi@users.sourceforge.net> | 2003-02-20 18:09:09 +0000 |
---|---|---|
committer | Siggi Langauf <siggi@users.sourceforge.net> | 2003-02-20 18:09:09 +0000 |
commit | 3533250839d26dc102c89f04eb93ec7c0320f6f8 (patch) | |
tree | 4fd75f8d110c0bd173999ce2e2783707e38c8e10 | |
parent | 9b91ff4ac55b5d99a88528eb0a3e1ef462c5aa55 (diff) | |
download | xine-lib-3533250839d26dc102c89f04eb93ec7c0320f6f8.tar.gz xine-lib-3533250839d26dc102c89f04eb93ec7c0320f6f8.tar.bz2 |
Michael's num_buttons patch
(menu detection by number of SPU buttons)
CVS patchset: 4220
CVS date: 2003/02/20 18:09:09
-rw-r--r-- | include/xine.h.in | 3 | ||||
-rw-r--r-- | src/libspudec/spu.c | 26 |
2 files changed, 27 insertions, 2 deletions
diff --git a/include/xine.h.in b/include/xine.h.in index 232d47429..00c95e5c7 100644 --- a/include/xine.h.in +++ b/include/xine.h.in @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine.h.in,v 1.60 2003/02/12 22:22:31 miguelfreitas Exp $ + * $Id: xine.h.in,v 1.61 2003/02/20 18:09:09 siggi Exp $ * * public xine-lib (libxine) interface and documentation * @@ -1151,6 +1151,7 @@ void xine_config_reset (xine_t *self); #define XINE_EVENT_QUIT 7 /* last event sent when stream is disposed */ #define XINE_EVENT_PROGRESS 8 /* index creation/network connections */ #define XINE_EVENT_MRL_REFERENCE 9 /* demuxer->frontend: MRL reference(s) for the real stream */ +#define XINE_EVENT_UI_NUM_BUTTONS 10 /* number of buttons for interactive menus */ /* input events coming from frontend */ #define XINE_EVENT_INPUT_MOUSE_BUTTON 101 diff --git a/src/libspudec/spu.c b/src/libspudec/spu.c index af9677133..92a02228b 100644 --- a/src/libspudec/spu.c +++ b/src/libspudec/spu.c @@ -35,7 +35,7 @@ * along with this program; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: spu.c,v 1.59 2003/02/12 17:29:30 heikos Exp $ + * $Id: spu.c,v 1.60 2003/02/20 18:09:10 siggi Exp $ * */ @@ -171,12 +171,36 @@ void spudec_decode_nav(spudec_decoder_t *this, buf_element_t *buf) { } } xine_fast_memcpy(&this->pci, &pci, sizeof(pci_t)); + if (this->button_filter) { + /* we possibly had buttons before, so we update the UI info */ + xine_event_t event; + xine_ui_data_t data; + + event.type = XINE_EVENT_UI_NUM_BUTTONS; + event.data = &data; + event.data_length = sizeof(data); + data.num_buttons = 0; + + xine_event_send(this->stream, &event); + } this->button_filter=0; break; case 1: /* All New Highlight information for this VOBU */ xine_fast_memcpy(&this->pci, &pci, sizeof(pci_t)); + if (!this->button_filter) { + /* we possibly entered a menu, so we update the UI button info */ + xine_event_t event; + xine_ui_data_t data; + + event.type = XINE_EVENT_UI_NUM_BUTTONS; + event.data = &data; + event.data_length = sizeof(data); + data.num_buttons = pci.hli.hl_gi.btn_ns; + + xine_event_send(this->stream, &event); + } this->button_filter=1; /******************************* * We should do something about fosl_btnn, but |