summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/input/vcd/vcdplayer.c48
-rw-r--r--src/input/vcd/xineplug_inp_vcd.c44
2 files changed, 30 insertions, 62 deletions
diff --git a/src/input/vcd/vcdplayer.c b/src/input/vcd/vcdplayer.c
index 51b667c60..27f726e3c 100644
--- a/src/input/vcd/vcdplayer.c
+++ b/src/input/vcd/vcdplayer.c
@@ -1,5 +1,5 @@
/*
- $Id: vcdplayer.c,v 1.18 2005/06/19 03:47:45 rockyb Exp $
+ $Id: vcdplayer.c,v 1.19 2005/06/20 02:17:41 rockyb Exp $
Copyright (C) 2002, 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
@@ -531,62 +531,30 @@ vcdplayer_play_single_item(vcdplayer_t *p_vcdplayer, vcdinfo_itemid_t itemid)
if (itemid.num >= i_segs) return;
_vcdplayer_set_segment(p_vcdplayer, itemid.num);
+
+ vcdinfo_get_seg_resolution(p_vcdinfo, itemid.num,
+ &(p_vcdplayer->max_x),
+ &(p_vcdplayer->max_y));
switch (segtype) {
case VCDINFO_FILES_VIDEO_NTSC_STILL:
- p_vcdplayer->max_x = 704;
- p_vcdplayer->max_y = 480;
- /* Note that we are reading a still frame but haven't
- got to the end. */
- p_vcdplayer->i_still = STILL_READING;
- break;
case VCDINFO_FILES_VIDEO_NTSC_STILL2:
- p_vcdplayer->max_x = 352;
- p_vcdplayer->max_y = 240;
- /* Note that we are reading a still frame but haven't
- got to the end. */
- p_vcdplayer->i_still = STILL_READING;
- break;
case VCDINFO_FILES_VIDEO_PAL_STILL:
- p_vcdplayer->max_x = 704;
- p_vcdplayer->max_y = 576;
- /* Note that we are reading a still frame but haven't
- got to the end. */
- p_vcdplayer->i_still = STILL_READING;
- break;
case VCDINFO_FILES_VIDEO_PAL_STILL2:
- p_vcdplayer->max_x = 352;
- p_vcdplayer->max_y = 288;
/* Note that we are reading a still frame but haven't
- got to the end. */
+ got to the end.
+ */
p_vcdplayer->i_still = STILL_READING;
break;
default:
/* */
switch (p_vcdplayer->vcd_format) {
case VCD_TYPE_VCD:
- p_vcdplayer->max_x = 352;
- p_vcdplayer->max_y = 240;
- /* aspect ratio for VCD's is known to be 4:3 for any
- type of VCD's */
- p_vcdplayer->set_aspect_ratio(1);
- break;
case VCD_TYPE_VCD11:
case VCD_TYPE_VCD2:
- p_vcdplayer->max_x = 352;
- switch(segtype) {
- case VCDINFO_FILES_VIDEO_NTSC_MOTION:
- p_vcdplayer->max_y = 240;
- break;
- case VCDINFO_FILES_VIDEO_PAL_MOTION:
- p_vcdplayer->max_y = 288;
- default:
- p_vcdplayer->max_y = 289;
- }
-
- p_vcdplayer->set_aspect_ratio(1);
/* aspect ratio for VCD's is known to be 4:3 for any
type of VCD's */
+ p_vcdplayer->set_aspect_ratio(1);
break;
default: ;
}
diff --git a/src/input/vcd/xineplug_inp_vcd.c b/src/input/vcd/xineplug_inp_vcd.c
index 1f2326395..73df9da44 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.40 2005/06/19 03:47:45 rockyb Exp $
+ $Id: xineplug_inp_vcd.c,v 1.41 2005/06/20 02:17:41 rockyb Exp $
Copyright (C) 2002, 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
@@ -1216,29 +1216,29 @@ vcd_handle_events (void)
if (my_vcd.stream)
{
xine_input_data_t *p_input = p_event->data;
- /* if (p_input->button == 1) */
- {
- dbg_print(INPUT_DBG_EVENT, "Move to x: %d, y: %d\n",
- p_input->x, p_input->y);
-
- if ( dvdnav_mouse_select(p_vcdplayer, p_input->x, p_input->y) )
- {
-
- int32_t button = 1; /* FIXME: get the proper button. */
-
- /* dvdnav_get_current_highlight(this->dvdnav, &button); */
-
- if (my_vcd.i_mouse_button != button) {
- my_vcd.i_mouse_button = button;
- send_mouse_enter_leave_event(&my_vcd, true);
- }
-
- } else if (my_vcd.b_mouse_in) {
+#if LIBVCD_VERSION_NUM >= 23
+ int32_t i_selection = vcdinfo_get_area_selection(p_vcdplayer->vcd,
+ p_vcdplayer->i_lid,
+ p_input->x,
+ p_input->y,
+ p_vcdplayer->max_x,
+ p_vcdplayer->max_y);
+ dbg_print(INPUT_DBG_EVENT, "Move to x: %d, y: %d\n",
+ p_input->x, p_input->y);
+
+ if (my_vcd.i_mouse_button != i_selection) {
+ dbg_print(INPUT_DBG_EVENT, "Old selection: %d, selection: %d\n",
+ my_vcd.i_mouse_button, i_selection);
+ my_vcd.i_mouse_button = i_selection;
+ if (i_selection < 0)
send_mouse_enter_leave_event(&my_vcd, false);
-
- }
- /* xine_dvd_send_button_update(this, 1); */
+ else
+ send_mouse_enter_leave_event(&my_vcd, true);
}
+#else
+ dbg_print(INPUT_DBG_EVENT, "Move to x: %d, y: %d\n",
+ p_input->x, p_input->y);
+#endif
}
break;
case XINE_EVENT_INPUT_UP: