Mercurial > hg > index.fcgi > dvdnav-rip > dvdnav-rip-1pba
changeset 8:12c17225098e tip
add angle info and start parameter
author | paulo |
---|---|
date | Tue, 17 Dec 2013 00:49:36 -0800 |
parents | aa7d0e4f300e |
children | |
files | menus.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line diff
1.1 --- a/menus.c Wed May 02 01:08:59 2012 -0700 1.2 +++ b/menus.c Tue Dec 17 00:49:36 2013 -0800 1.3 @@ -86,7 +86,10 @@ 1.4 if (argc > 2) 1.5 start_part = atoi(argv[2]); 1.6 dvdnav_part_play(dvdnav, start_title, start_part); 1.7 + if (argc > 3) 1.8 + dvdnav_angle_change(dvdnav, atoi(argv[3])); 1.9 } 1.10 + 1.11 1.12 /* the read loop which regularly calls dvdnav_get_next_block 1.13 * and handles the returned events */ 1.14 @@ -185,12 +188,15 @@ 1.15 * accordingly. */ 1.16 { 1.17 int32_t tt = 0, ptt = 0; 1.18 + int32_t ac = 0, an = 0; 1.19 uint32_t tpos, tlen; 1.20 char input = '\0'; 1.21 1.22 dvdnav_current_title_info(dvdnav, &tt, &ptt); 1.23 dvdnav_get_position(dvdnav, &tpos, &tlen); 1.24 + dvdnav_get_angle_info(dvdnav, &ac, &an); 1.25 printf("Cell change: Title %d, Chapter %d\n", tt, ptt); 1.26 + printf("Angle: %d (Total: %d) \n", ac, an); 1.27 printf("At position %.0f%% inside the feature (%d / %d) \n", 100 * (double)tpos / (double)tlen, tpos, tlen); 1.28 1.29 dump = 0;