comparison stream/stream_dvdnav.c @ 21200:c7b5dd2b2291

better nav highlight handling
author ben
date Sat, 25 Nov 2006 13:03:51 +0000
parents 92977b0a5515
children 1ddb1a86e419
comparison
equal deleted inserted replaced
21199:92977b0a5515 21200:c7b5dd2b2291
44 &stream_priv_dflts, 44 &stream_priv_dflts,
45 stream_opts_fields 45 stream_opts_fields
46 }; 46 };
47 47
48 int dvd_nav_still=0; /* are we on a still picture? */ 48 int dvd_nav_still=0; /* are we on a still picture? */
49 dvdnav_highlight_event_t dvd_nav_hl; 49 static dvdnav_highlight_event_t dvd_nav_hl;
50 int dvd_nav_hl_on = 0;
51 50
52 static int seek(stream_t *s, off_t newpos); 51 static int seek(stream_t *s, off_t newpos);
53 52
54 static dvdnav_priv_t * new_dvdnav_stream(char * filename) { 53 static dvdnav_priv_t * new_dvdnav_stream(char * filename) {
55 char * title_str; 54 char * title_str;
127 hlev->sy = FFMIN (btni->y_start, btni->y_end); 126 hlev->sy = FFMIN (btni->y_start, btni->y_end);
128 hlev->ey = FFMAX (btni->y_start, btni->y_end); 127 hlev->ey = FFMAX (btni->y_start, btni->y_end);
129 128
130 hlev->palette = (btni->btn_coln == 0) ? 0 : 129 hlev->palette = (btni->btn_coln == 0) ? 0 :
131 pnavpci->hli.btn_colit.btn_coli[btni->btn_coln - 1][0]; 130 pnavpci->hli.btn_colit.btn_coli[btni->btn_coln - 1][0];
132 dvd_nav_hl_on = 1;
133 break; 131 break;
134 } 132 }
135 } 133 }
136 } else { /* hide button or no button */ 134 } else { /* hide button or no button */
137 hlev->sx = hlev->ex = 0; 135 hlev->sx = hlev->ex = 0;
138 hlev->sy = hlev->ey = 0; 136 hlev->sy = hlev->ey = 0;
139 hlev->palette = hlev->buttonN = 0; 137 hlev->palette = hlev->buttonN = 0;
140 dvd_nav_hl_on = 0;
141 } 138 }
142 } 139 }
143 140
144 static int dvdnav_stream_read(dvdnav_priv_t * priv, unsigned char *buf, int *len) { 141 static int dvdnav_stream_read(dvdnav_priv_t * priv, unsigned char *buf, int *len) {
145 int event = DVDNAV_NOP; 142 int event = DVDNAV_NOP;
492 n++; 489 n++;
493 } 490 }
494 return n; 491 return n;
495 } 492 }
496 493
494 void mp_dvdnav_get_highlight (nav_highlight_t *hl) {
495 hl->sx = dvd_nav_hl.sx;
496 hl->sy = dvd_nav_hl.sy;
497 hl->ex = dvd_nav_hl.ex;
498 hl->ey = dvd_nav_hl.ey;
499 }
497 500
498 stream_info_t stream_info_dvdnav = { 501 stream_info_t stream_info_dvdnav = {
499 "DVDNAV stream", 502 "DVDNAV stream",
500 "null", 503 "null",
501 "", 504 "",