Commit ca35db70 authored by Accident's avatar Accident

Add inttypes.h for PRIu64.

Fixed iteration of BD titles, and dump output in libbluray_test
More verbose warnings when BD+ accesses PSR102-104.
Fix spelling of Convertion->Conversion
parent c6cfc099
......@@ -19,7 +19,7 @@ AC_TYPE_SIGNAL
# required headers
AC_HEADER_TIME
AC_CHECK_HEADERS([stdarg.h sys/types.h dirent.h errno.h libgen.h malloc.h])
AC_CHECK_HEADERS([stdlib.h mntent.h linux/cdrom.h dlfcn.h])
AC_CHECK_HEADERS([stdlib.h mntent.h linux/cdrom.h dlfcn.h inttypes.h])
# required structures
AC_STRUCT_DIRENT_D_TYPE
......
......@@ -57,7 +57,7 @@ static int _open_m2ts(BLURAY *bd)
DEBUG(DBG_BLURAY, "Clip %s empty! (%p)\n", f_name, bd);
}
DEBUG(DBG_BLURAY | DBG_CRIT, "Unable to open clip %s! (%p)\n",
DEBUG(DBG_BLURAY | DBG_CRIT, "Unable to open clip %s! (%p)\n",
f_name, bd);
X_FREE(f_name);
......@@ -247,9 +247,9 @@ int _read_block(BLURAY *bd)
if (bd->bdplus_fixup && bd->bdplus) {
int32_t numFixes;
numFixes = bd->bdplus_fixup(bd->bdplus, len, bd->int_buf);
#if 0
#if 1
if (numFixes) {
DEBUG(DBG_BLURAY,
DEBUG(DBG_BDPLUS,
"BDPLUS did %u fixups\n", numFixes);
}
#endif
......@@ -528,7 +528,7 @@ int bd_read(BLURAY *bd, unsigned char *buf, int len)
}
// Select a title for playback
// The title index is an index into the list
// The title index is an index into the list
// established by bd_get_titles()
int bd_select_title(BLURAY *bd, uint32_t title_idx)
{
......@@ -585,7 +585,7 @@ void bd_seamless_angle_change(BLURAY *bd, int angle)
uint32_t clip_pkt;
clip_pkt = (bd->clip_pos + 191) / 192;
bd->angle_change_pkt = nav_angle_change_search(bd->clip, clip_pkt,
bd->angle_change_pkt = nav_angle_change_search(bd->clip, clip_pkt,
&bd->angle_change_time);
bd->request_angle = angle;
bd->seamless_angle_change = 1;
......@@ -646,7 +646,7 @@ BD_TITLE_INFO* bd_get_title_info(BLURAY *bd, uint32_t title_idx)
}
title = nav_title_open(bd->device_path, bd->title_list->title_info[title_idx].name);
if (title == NULL) {
DEBUG(DBG_BLURAY | DBG_CRIT, "Unable to open title %s! (%p)\n",
DEBUG(DBG_BLURAY | DBG_CRIT, "Unable to open title %s! (%p)\n",
bd->title_list->title_info[title_idx].name, bd);
return NULL;
}
......
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h>
#if HAVE_MALLOC_H
......@@ -5,8 +8,12 @@
#endif
#include <stdlib.h>
#include <string.h>
#if HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#include "../bluray.h"
#include "../util/logging.h"
#define HEX_PRINT(X,Y) { int zz; for(zz = 0; zz < Y; zz++) fprintf(stderr, "%02X", X[zz]); fprintf(stderr, "\n"); }
......@@ -14,6 +21,25 @@ int main(int argc, char *argv[])
{
if (argc == 4) {
BLURAY *bd = bd_open(argv[1], argv[2]);
int count, ii;
//bd_get_titles(bd, 0);
DEBUG(DBG_BLURAY,"\nListing titles:\n");
count = bd_get_titles(bd, TITLES_RELEVANT);
for (ii = 0; ii < count; ii++)
{
BD_TITLE_INFO* ti;
ti = bd_get_title_info(bd, ii);
DEBUG(DBG_BLURAY,
"index: %d duration: %02"PRIu64":%02"PRIu64":%02"PRIu64" chapters: %d\n",
ii,
(ti->duration / 90000) / (3600),
((ti->duration / 90000) % 3600) / 60,
((ti->duration / 90000) % 60),
ti->chapter_count);
}
bd_select_title(bd, atoi(argv[3]));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment