[DVDnav-discuss] r1119 - in trunk/libdvdread/src: ifo_print.c ifo_print.h nav_print.c
nicodvb
subversion at mplayerhq.hu
Fri Jul 25 00:03:06 CEST 2008
Author: nicodvb
Date: Fri Jul 25 00:03:06 2008
New Revision: 1119
Log:
added dvdread_print_time() and removed the file-static print_time() in nav_print.c; based on a patch by Erik Hovland org
Modified:
trunk/libdvdread/src/ifo_print.c
trunk/libdvdread/src/ifo_print.h
trunk/libdvdread/src/nav_print.c
Modified: trunk/libdvdread/src/ifo_print.c
==============================================================================
--- trunk/libdvdread/src/ifo_print.c (original)
+++ trunk/libdvdread/src/ifo_print.c Fri Jul 25 00:03:06 2008
@@ -60,6 +60,10 @@ static void ifo_print_time(int level, dv
printf(" @ %s fps", rate);
}
+void dvdread_print_time(dvd_time_t *dtime) {
+ ifo_print_time(5, dtime);
+}
+
/* Put this in some other file / package? It's used in nav_print too.
Possibly also by the vm / navigator. */
static void ifo_print_cmd(int row, vm_cmd_t *command) {
@@ -655,7 +659,7 @@ static void ifo_print_CELL_PLAYBACK(cell
for(i=0;i<nr;i++) {
printf("Cell: %3i ", i + 1);
- ifo_print_time(5, &cell_playback[i].playback_time);
+ dvdread_print_time(&cell_playback[i].playback_time);
printf("\t");
if(cell_playback[i].block_mode || cell_playback[i].block_type) {
@@ -740,7 +744,7 @@ void ifo_print_PGC(pgc_t *pgc) {
printf("Number of Cells: %i\n", pgc->nr_of_cells);
/* Check that time is 0:0:0:0 also if nr_of_programs==0 */
printf("Playback time: ");
- ifo_print_time(5, &pgc->playback_time); printf("\n");
+ dvdread_print_time(&pgc->playback_time); printf("\n");
/* If no programs/no time then does this mean anything? */
printf("Prohibited user operations: ");
Modified: trunk/libdvdread/src/ifo_print.h
==============================================================================
--- trunk/libdvdread/src/ifo_print.h (original)
+++ trunk/libdvdread/src/ifo_print.h Fri Jul 25 00:03:06 2008
@@ -24,6 +24,7 @@
#include "ifo_types.h"
void ifo_print(dvd_reader_t *dvd, int title);
+void dvdread_print_time(dvd_time_t *dtime);
#endif /* IFO_PRINT_H_INCLUDED */
Modified: trunk/libdvdread/src/nav_print.c
==============================================================================
--- trunk/libdvdread/src/nav_print.c (original)
+++ trunk/libdvdread/src/nav_print.c Fri Jul 25 00:03:06 2008
@@ -32,33 +32,6 @@
#include "nav_print.h"
#include "dvdread_internal.h"
-static void print_time(dvd_time_t *dtime) {
- const char *rate;
- CHECK_VALUE((dtime->hour>>4) < 0xa && (dtime->hour&0xf) < 0xa);
- CHECK_VALUE((dtime->minute>>4) < 0x7 && (dtime->minute&0xf) < 0xa);
- CHECK_VALUE((dtime->second>>4) < 0x7 && (dtime->second&0xf) < 0xa);
- CHECK_VALUE((dtime->frame_u&0xf) < 0xa);
-
- printf("%02x:%02x:%02x.%02x",
- dtime->hour,
- dtime->minute,
- dtime->second,
- dtime->frame_u & 0x3f);
- switch((dtime->frame_u & 0xc0) >> 6) {
- case 1:
- rate = "25.00";
- break;
- case 3:
- rate = "29.97";
- break;
- default:
- rate = "(please send a bug report)";
- break;
- }
- printf(" @ %s fps", rate);
-}
-
-
static void navPrint_PCI_GI(pci_gi_t *pci_gi) {
int i;
@@ -70,7 +43,7 @@ static void navPrint_PCI_GI(pci_gi_t *pc
printf("vobu_e_ptm 0x%08x\n", pci_gi->vobu_e_ptm);
printf("vobu_se_e_ptm 0x%08x\n", pci_gi->vobu_se_e_ptm);
printf("e_eltm ");
- print_time(&pci_gi->e_eltm);
+ dvdread_print_time(&pci_gi->e_eltm);
printf("\n");
printf("vobu_isrc \"");
@@ -201,7 +174,7 @@ static void navPrint_DSI_GI(dsi_gi_t *ds
printf("vobu_vob_idn 0x%04x\n", dsi_gi->vobu_vob_idn);
printf("vobu_c_idn 0x%02x\n", dsi_gi->vobu_c_idn);
printf("c_eltm ");
- print_time(&dsi_gi->c_eltm);
+ dvdread_print_time(&dsi_gi->c_eltm);
printf("\n");
}
More information about the DVDnav-discuss
mailing list