comparison menus.c @ 7:aa7d0e4f300e

display title position and length in number of blocks
author paulo
date Wed, 02 May 2012 01:08:59 -0700
parents 3fd49361fcc8
children 12c17225098e
comparison
equal deleted inserted replaced
5:60e3a0ea73cc 6:f441b664ccf9
183 * change inside a cell. Therefore this event can be used to query such 183 * change inside a cell. Therefore this event can be used to query such
184 * information only when necessary and update the decoding/displaying 184 * information only when necessary and update the decoding/displaying
185 * accordingly. */ 185 * accordingly. */
186 { 186 {
187 int32_t tt = 0, ptt = 0; 187 int32_t tt = 0, ptt = 0;
188 uint32_t pos, len; 188 uint32_t tpos, tlen;
189 char input = '\0'; 189 char input = '\0';
190 190
191 dvdnav_current_title_info(dvdnav, &tt, &ptt); 191 dvdnav_current_title_info(dvdnav, &tt, &ptt);
192 dvdnav_get_position(dvdnav, &pos, &len); 192 dvdnav_get_position(dvdnav, &tpos, &tlen);
193 printf("Cell change: Title %d, Chapter %d\n", tt, ptt); 193 printf("Cell change: Title %d, Chapter %d\n", tt, ptt);
194 printf("At position %.0f%% inside the feature\n", 100 * (double)pos / (double)len); 194 printf("At position %.0f%% inside the feature (%d / %d) \n", 100 * (double)tpos / (double)tlen, tpos, tlen);
195 195
196 dump = 0; 196 dump = 0;
197 if (tt_dump && tt != tt_dump) 197 if (tt_dump && tt != tt_dump)
198 tt_dump = 0; 198 tt_dump = 0;
199 199