Commit daea8146 authored by hpi1's avatar hpi1

Added disc application info to BLURAY_DISC_INFO

parent 10776330
- Added disc application info to BLURAY_DISC_INFO
2013-12-21: Version 0.5.0
- Portability fixes.
- Build system updates.
......
......@@ -120,6 +120,31 @@ static void _print_meta(const META_DL *meta)
}
}
static void _print_app_info(const BLURAY_DISC_INFO *info)
{
static const char video_format_str[16][8] = {
"ignored", "480i", "576i", "480p", "1080i", "720p", "1080p", "576p"
};
static const char frame_rate_str[16][16] = {
"ignored",
"23.976 Hz",
"24 Hz",
"25 Hz",
"29.97 Hz",
"reserved",
"50 Hz",
"59.94 Hz"
};
printf("Application info:\n");
printf(" initial mode preference : %s\n", info->initial_output_mode_preference ? "3D" : "2D");
printf(" 3D content exists : %s\n", info->content_exist_3D ? "Yes" : "No");
printf(" video format : %s (0x%x)\n", video_format_str[info->video_format & 0xf], info->video_format);
printf(" frame rate : %s (0x%x)\n", frame_rate_str[info->frame_rate & 0xf], info->frame_rate);
printf(" provider data : \'%32s\'\n", info->provider_data);
}
int main(int argc, char *argv[])
{
const char *disc_root = (argc > 1) ? argv[1] : NULL;
......@@ -192,6 +217,8 @@ int main(int argc, char *argv[])
}
}
_print_app_info(info);
_print_meta(bd_get_meta(bd));
bd_close(bd);
......
......@@ -953,6 +953,13 @@ static void _fill_disc_info(BLURAY *bd)
bd->disc_info.bluray_detected = 1;
/* application info */
bd->disc_info.video_format = bd->index->app_info.video_format;
bd->disc_info.frame_rate = bd->index->app_info.frame_rate;
bd->disc_info.content_exist_3D = bd->index->app_info.content_exist_flag;
bd->disc_info.initial_output_mode_preference = bd->index->app_info.initial_output_mode_preference;
memcpy(bd->disc_info.provider_data, bd->index->app_info.user_data, sizeof(bd->disc_info.provider_data));
/* count titles */
for (ii = 0; ii < bd->index->num_titles; ii++) {
......
......@@ -505,6 +505,14 @@ typedef struct {
uint8_t bdplus_gen;
/* BD+ content code relese date */
uint32_t bdplus_date; /* (year << 16) | (month << 8) | day */
/* disc application info */
uint8_t video_format; /* bd_video_format_e */
uint8_t frame_rate; /* bd_frame_rate_e */
uint8_t content_exist_3D;
uint8_t initial_output_mode_preference; /* 0 - 2D, 1 - 3D */
uint8_t provider_data[32];
} BLURAY_DISC_INFO;
/**
......
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