Commit ce45fc9d authored by Petri Hintukainen's avatar Petri Hintukainen

Add UDF volume identifier to DISC_INFO

parent a86238f4
- Add support for UDF image files and unmounted discs
- Add UDF volume identifier to DISC_INFO
- Fix infinite loop with some broken HDMV menus
2015-01-26: Version 0.7.0
......
......@@ -167,6 +167,9 @@ int main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
if (info->udf_volume_id) {
printf("Volume Identifier : %s\n", info->udf_volume_id);
}
printf("BluRay detected : %s\n", _yes_no(info->bluray_detected));
if (info->bluray_detected) {
printf("First Play supported: %s\n", _yes_no(info->first_play_supported));
......
......@@ -836,6 +836,8 @@ static void _fill_disc_info(BLURAY *bd, BD_ENC_INFO *enc_info)
bd->disc_info.bdplus_gen = enc_info->bdplus_gen;
bd->disc_info.bdplus_date = enc_info->bdplus_date;
bd->disc_info.udf_volume_id = disc_volume_id(bd->disc);
bd->disc_info.bluray_detected = 0;
bd->disc_info.top_menu_supported = 0;
bd->disc_info.first_play_supported = 0;
......
......@@ -118,6 +118,7 @@ typedef struct {
char bdj_org_id[9]; /* (BD-J) disc organization ID */
char bdj_disc_id[33]; /* (BD-J) disc ID */
const char *udf_volume_id; /* optional UDF volume identifier */
} BLURAY_DISC_INFO;
/*
......
......@@ -51,6 +51,8 @@ struct bd_disc {
BD_FILE_H * (*pf_file_open_bdrom)(void *, const char *);
BD_DIR_H * (*pf_dir_open_bdrom)(void *, const char *);
void (*pf_fs_close)(void *);
const char *udf_volid;
};
/*
......@@ -241,6 +243,8 @@ BD_DISC *disc_open(const char *device_path,
p->pf_file_open_bdrom = udf_file_open;
p->pf_dir_open_bdrom = udf_dir_open;
p->udf_volid = udf_volume_id(udf);
/* root not accessible with stdio */
X_FREE(p->disc_root);
}
......@@ -280,11 +284,16 @@ void disc_close(BD_DISC **pp)
*
*/
BD_PRIVATE const char *disc_root(BD_DISC *p)
const char *disc_root(BD_DISC *p)
{
return p->disc_root;
}
const char *disc_volume_id(BD_DISC *p)
{
return p ? p->udf_volid : NULL;
}
/*
* VFS
*/
......
......@@ -46,6 +46,9 @@ BD_PRIVATE void disc_close(BD_DISC **);
/* Get BD-ROM root path */
BD_PRIVATE const char *disc_root(BD_DISC *disc);
/* Get UDF volume ID */
BD_PRIVATE const char *disc_volume_id(BD_DISC *);
/* Open VFS file (relative to disc root) */
BD_PRIVATE struct bd_file_s *disc_open_file(BD_DISC *disc, const char *dir, const char *file);
BD_PRIVATE struct bd_file_s *disc_open_path(BD_DISC *disc, const char *path);
......
......@@ -218,6 +218,11 @@ void *udf_image_open(const char *img_path)
return (void*)udf;
}
const char *udf_volume_id(void *udf)
{
return udfread_get_volume_id(udf);
}
void udf_image_close(void *udf)
{
udfread_close(udf);
......
......@@ -28,6 +28,7 @@ struct bd_dir_s;
BD_PRIVATE void *udf_image_open(const char *img_path);
BD_PRIVATE void udf_image_close(void *udf);
BD_PRIVATE const char *udf_volume_id(void *udf);
BD_PRIVATE struct bd_file_s *udf_file_open(void *udf, const char *filename);
BD_PRIVATE struct bd_dir_s *udf_dir_open(void *udf, const char* dirname);
......
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