summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/input/vcd/vcdplayer.c44
-rw-r--r--src/input/vcd/vcdplayer.h9
-rw-r--r--src/input/vcd/xineplug_inp_vcd.c17
3 files changed, 51 insertions, 19 deletions
diff --git a/src/input/vcd/vcdplayer.c b/src/input/vcd/vcdplayer.c
index a70e94d64..51b667c60 100644
--- a/src/input/vcd/vcdplayer.c
+++ b/src/input/vcd/vcdplayer.c
@@ -1,5 +1,5 @@
/*
- $Id: vcdplayer.c,v 1.17 2005/06/14 17:27:13 rockyb Exp $
+ $Id: vcdplayer.c,v 1.18 2005/06/19 03:47:45 rockyb Exp $
Copyright (C) 2002, 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
@@ -534,23 +534,59 @@ vcdplayer_play_single_item(vcdplayer_t *p_vcdplayer, vcdinfo_itemid_t itemid)
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/vcdplayer.h b/src/input/vcd/vcdplayer.h
index 25cf22a04..99f74aca1 100644
--- a/src/input/vcd/vcdplayer.h
+++ b/src/input/vcd/vcdplayer.h
@@ -1,5 +1,5 @@
/*
- $Id: vcdplayer.h,v 1.9 2005/06/14 17:27:13 rockyb Exp $
+ $Id: vcdplayer.h,v 1.10 2005/06/19 03:47:45 rockyb Exp $
Copyright (C) 2002, 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
@@ -183,6 +183,9 @@ typedef struct vcdplayer_s {
lsn_t track_lsn; /* LSN of start track origin of track we are in. */
lsn_t track_end_lsn; /* LSN of end of current track (if entry). */
+ uint16_t max_x; /* Largest screen x coordinate */
+ uint16_t max_y; /* Largest screen y coordinate */
+
/*--------------------------------------------------------------
(S)VCD Medium information
---------------------------------------------------------------*/
@@ -305,10 +308,6 @@ vcdplayer_seek (vcdplayer_t *p_vcdplayer, off_t offset, int origin);
void
vcdplayer_send_button_update(vcdplayer_t *p_vcdplayer, int mode);
-int
-vcdinfo_get_area_selection(const vcdinfo_obj_t *p_vcdinfo,
- lid_t lid, int x, int y);
-
#endif /* _VCDPLAYER_H_ */
/*
* Local variables:
diff --git a/src/input/vcd/xineplug_inp_vcd.c b/src/input/vcd/xineplug_inp_vcd.c
index 22fd23d7a..1f2326395 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.39 2005/06/14 17:27:13 rockyb Exp $
+ $Id: xineplug_inp_vcd.c,v 1.40 2005/06/19 03:47:45 rockyb Exp $
Copyright (C) 2002, 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
@@ -1177,13 +1177,8 @@ vcd_handle_events (void)
{
int i_selection;
- /* mouse coordinates seem to be before aspect ratio is applied.
- For now we're hacking to assume 4:3 which is generally correct.
- */
- const int16_t x_scaled = p_input->x * 3 / 4;
-
- dbg_print(INPUT_DBG_EVENT, "Button to x: %d, scaled x: %d, y: %d\n",
- p_input->x, x_scaled, p_input->y);
+ dbg_print(INPUT_DBG_EVENT, "Button to x: %d, y: %d\n",
+ p_input->x, p_input->y);
#if LIBVCD_VERSION_NUM >= 23
/* xine_dvd_send_button_update(this, 1); */
@@ -1193,8 +1188,10 @@ vcd_handle_events (void)
i_selection = vcdinfo_get_area_selection(p_vcdplayer->vcd,
p_vcdplayer->i_lid,
- x_scaled,
- p_input->y);
+ p_input->x,
+ p_input->y,
+ p_vcdplayer->max_x,
+ p_vcdplayer->max_y);
dbg_print(INPUT_DBG_EVENT, "Selection is: %d\n", i_selection);
if (vcdplayer_pbc_is_on(p_vcdplayer)) {