Mercurial > hg > index.fcgi > dvdnav-rip > dvdnav-rip-1pba
comparison menus.c @ 8:12c17225098e
add angle info and start parameter
author | paulo |
---|---|
date | Tue, 17 Dec 2013 00:49:36 -0800 |
parents | aa7d0e4f300e |
children |
comparison
equal
deleted
inserted
replaced
6:f441b664ccf9 | 7:0c3062fc61a1 |
---|---|
84 int start_title = atoi(argv[1]); | 84 int start_title = atoi(argv[1]); |
85 int start_part = 1; | 85 int start_part = 1; |
86 if (argc > 2) | 86 if (argc > 2) |
87 start_part = atoi(argv[2]); | 87 start_part = atoi(argv[2]); |
88 dvdnav_part_play(dvdnav, start_title, start_part); | 88 dvdnav_part_play(dvdnav, start_title, start_part); |
89 } | 89 if (argc > 3) |
90 dvdnav_angle_change(dvdnav, atoi(argv[3])); | |
91 } | |
92 | |
90 | 93 |
91 /* the read loop which regularly calls dvdnav_get_next_block | 94 /* the read loop which regularly calls dvdnav_get_next_block |
92 * and handles the returned events */ | 95 * and handles the returned events */ |
93 printf("Reading...\n"); | 96 printf("Reading...\n"); |
94 while (!finished) { | 97 while (!finished) { |
183 * change inside a cell. Therefore this event can be used to query such | 186 * change inside a cell. Therefore this event can be used to query such |
184 * information only when necessary and update the decoding/displaying | 187 * information only when necessary and update the decoding/displaying |
185 * accordingly. */ | 188 * accordingly. */ |
186 { | 189 { |
187 int32_t tt = 0, ptt = 0; | 190 int32_t tt = 0, ptt = 0; |
191 int32_t ac = 0, an = 0; | |
188 uint32_t tpos, tlen; | 192 uint32_t tpos, tlen; |
189 char input = '\0'; | 193 char input = '\0'; |
190 | 194 |
191 dvdnav_current_title_info(dvdnav, &tt, &ptt); | 195 dvdnav_current_title_info(dvdnav, &tt, &ptt); |
192 dvdnav_get_position(dvdnav, &tpos, &tlen); | 196 dvdnav_get_position(dvdnav, &tpos, &tlen); |
197 dvdnav_get_angle_info(dvdnav, &ac, &an); | |
193 printf("Cell change: Title %d, Chapter %d\n", tt, ptt); | 198 printf("Cell change: Title %d, Chapter %d\n", tt, ptt); |
199 printf("Angle: %d (Total: %d) \n", ac, an); | |
194 printf("At position %.0f%% inside the feature (%d / %d) \n", 100 * (double)tpos / (double)tlen, tpos, tlen); | 200 printf("At position %.0f%% inside the feature (%d / %d) \n", 100 * (double)tpos / (double)tlen, tpos, tlen); |
195 | 201 |
196 dump = 0; | 202 dump = 0; |
197 if (tt_dump && tt != tt_dump) | 203 if (tt_dump && tt != tt_dump) |
198 tt_dump = 0; | 204 tt_dump = 0; |