summaryrefslogtreecommitdiff
path: root/src/input/vcd/xineplug_inp_vcd.c
diff options
context:
space:
mode:
authorRocky Bernstein <rockyb@users.sourceforge.net>2004-03-31 10:13:00 +0000
committerRocky Bernstein <rockyb@users.sourceforge.net>2004-03-31 10:13:00 +0000
commit1f3430acd6c2bc225886873613896d3b7b3268b9 (patch)
tree34e84f9a2b6b06c6f7775094887c65e06549c800 /src/input/vcd/xineplug_inp_vcd.c
parent8651b1e6267bc34c0dfb27088d893e44cfe8a6d3 (diff)
downloadxine-lib-1f3430acd6c2bc225886873613896d3b7b3268b9.tar.gz
xine-lib-1f3430acd6c2bc225886873613896d3b7b3268b9.tar.bz2
multi-default selections work modulo some bugs. But it requires a newer
vcdimager (0.7.21 that is only CVS right now). Use the newer vcdinfo routines if available. CVS patchset: 6323 CVS date: 2004/03/31 10:13:00
Diffstat (limited to 'src/input/vcd/xineplug_inp_vcd.c')
-rw-r--r--src/input/vcd/xineplug_inp_vcd.c46
1 files changed, 39 insertions, 7 deletions
diff --git a/src/input/vcd/xineplug_inp_vcd.c b/src/input/vcd/xineplug_inp_vcd.c
index 8394537e5..ab4984fd9 100644
--- a/src/input/vcd/xineplug_inp_vcd.c
+++ b/src/input/vcd/xineplug_inp_vcd.c
@@ -1,5 +1,5 @@
/*
- $Id: xineplug_inp_vcd.c,v 1.13 2004/03/24 04:25:06 rockyb Exp $
+ $Id: xineplug_inp_vcd.c,v 1.14 2004/03/31 10:13:00 rockyb Exp $
Copyright (C) 2002, 2003, 2004 Rocky Bernstein <rocky@panix.com>
@@ -1012,27 +1012,53 @@ vcd_handle_events (void)
switch (event->type) {
case XINE_EVENT_INPUT_MENU1:
if (this->return_entry == VCDINFO_INVALID_ENTRY) {
- LOG_MSG("%s\n", _("selection has no return entry"));
+ LOG_MSG("%s\n", _("selection has no RETURN entry"));
return false;
}
itemid.num = this->return_entry;
- dbg_print(INPUT_DBG_PBC, "RETURN to %d\n", itemid.num);
+ dbg_print((INPUT_DBG_PBC|INPUT_DBG_EVENT),
+ "RETURN to %d\n", itemid.num);
/* Don't loop around -- doesn't make sense to loop a return*/
num = 0;
break;
case XINE_EVENT_INPUT_MENU2:
+#if defined(LIBVCD_VERSION)
+ if (vcdplayer_pbc_is_on(this)) {
+ lid_t lid=vcdinfo_get_multi_default_lid(this->vcd, this->cur_lid,
+ this->cur_lsn);
+ if (VCDINFO_INVALID_LID != lid) {
+ itemid.num = lid;
+ dbg_print((INPUT_DBG_PBC|INPUT_DBG_EVENT),
+ "DEFAULT to %d\n", itemid.num);
+ } else {
+ dbg_print((INPUT_DBG_PBC|INPUT_DBG_EVENT),
+ "no DEFAULT for LID %d\n",
+ this->cur_lid);
+ }
+
+ /* Don't loop around -- doesn't make sense to loop a return*/
+ num = 0;
+ } else {
+ /* PBC is not on. "default" selection beginning of current
+ selection . Alternative: */
+ LOG_MSG("%s\n", _("DeFAULT selected but PBC is not on."));
+ ;
+ }
+#else
if (this->default_entry == VCDINFO_INVALID_ENTRY) {
- LOG_MSG("%s\n", _("selection has no default entry"));
+ LOG_MSG("%s\n", _("selection has no DEFAULT entry"));
return false;
}
itemid.num = this->default_entry;
- dbg_print(INPUT_DBG_PBC, "DEFAULT to %d\n", itemid.num);
+ dbg_print((INPUT_DBG_PBC|INPUT_DBG_EVENT),
+ "DEFAULT to %d\n", itemid.num);
/* Don't loop around -- doesn't make sense to loop a return*/
num = 0;
+#endif /* LIBVCD_VERSION */
break;
case XINE_EVENT_INPUT_NEXT:
if (this->next_entry == VCDINFO_INVALID_ENTRY) {
- LOG_MSG("%s\n", _("selection has no next entry"));
+ LOG_MSG("%s\n", _("selection has no NEXT entry"));
return false;
}
itemid.num = this->next_entry;
@@ -1040,7 +1066,7 @@ vcd_handle_events (void)
break;
case XINE_EVENT_INPUT_PREVIOUS:
if (this->prev_entry == VCDINFO_INVALID_ENTRY) {
- LOG_MSG("%s\n", _("selection has no previous entry"));
+ LOG_MSG("%s\n", _("selection has no PREVIOUS entry"));
return false;
}
itemid.num = this->prev_entry;
@@ -1065,7 +1091,13 @@ vcd_handle_events (void)
number_addend = 0;
if (vcdplayer_pbc_is_on(this)) {
+#if defined(LIBVCD_VERSION)
+ /* version 0.7.21 or greater */
+ lid_t next_num=vcdinfo_selection_get_lid(this->vcd, this->cur_lid,
+ itemid.num);
+#else
lid_t next_num=vcdplayer_selection2lid(this, itemid.num);
+#endif /* LIBVCD_VERSION */
if (VCDINFO_INVALID_LID != next_num) {
itemid.num = next_num;
_x_demux_flush_engine(my_vcd.stream);