Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libbluray
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VideoLAN
libbluray
Commits
cc8dd612
Commit
cc8dd612
authored
Apr 13, 2010
by
hpi1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added index_dump: parse and print contents of index.bdmv
parent
74a98791
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
117 additions
and
1 deletion
+117
-1
src/examples/Makefile.am
src/examples/Makefile.am
+6
-1
src/examples/index_dump.c
src/examples/index_dump.c
+111
-0
No files found.
src/examples/Makefile.am
View file @
cc8dd612
...
...
@@ -2,7 +2,7 @@
# Set this for all builds, or use $bin_CPPFLAGS for individual
AM_CPPFLAGS
=
-I
$(top_builddir)
/src
bin_PROGRAMS
=
bdplus_test bdsplice mpls_dump clpi_dump libbluray_test
bin_PROGRAMS
=
bdplus_test bdsplice mpls_dump clpi_dump
index_dump
libbluray_test
bdplus_test_SOURCE
=
bdplus_test.c
...
...
@@ -26,6 +26,11 @@ clpi_dump_SOURCES = \
clpi_dump_LDADD
=
$(BDNAV_LIB)
index_dump_SOURCES
=
\
index_dump.c
index_dump_LDADD
=
$(BDNAV_LIB)
libbluray_test_SOURCES
=
\
libbluray_test.c
...
...
src/examples/index_dump.c
0 → 100644
View file @
cc8dd612
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include "../src/libbdnav/index_parse.h"
static
void
_indx_print_app_info
(
INDX_APP_INFO
*
app_info
)
{
const
char
video_format_str
[
16
][
8
]
=
{
"ignored"
,
"480i"
,
"576i"
,
"480p"
,
"1080i"
,
"720p"
,
"1080p"
,
"576p"
};
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
(
" initial mode : %s
\n
"
,
app_info
->
initial_output_mode_preference
?
"3D"
:
"2D"
);
printf
(
" content exists: %s
\n
"
,
app_info
->
content_exist_flag
?
"Yes"
:
"No"
);
printf
(
" video format : %s (0x%x)
\n
"
,
video_format_str
[
app_info
->
video_format
],
app_info
->
video_format
);
printf
(
" frame rate : %s (0x%x)
\n
"
,
frame_rate_str
[
app_info
->
frame_rate
],
app_info
->
frame_rate
);
printf
(
" provider data : %32s
\n
"
,
app_info
->
user_data
);
}
static
void
_indx_print_hdmv_obj
(
INDX_HDMV_OBJ
*
hdmv
)
{
const
char
*
const
playback_types
[]
=
{
"Movie"
,
"Interactive"
,
"???"
,
"???"
};
printf
(
" object type : HDMV
\n
"
);
printf
(
" playback type : %s
\n
"
,
playback_types
[
hdmv
->
playback_type
]);
printf
(
" id_ref : %u
\n
"
,
hdmv
->
id_ref
);
}
static
void
_indx_print_bdj_obj
(
INDX_BDJ_OBJ
*
bdj
)
{
const
char
*
const
playback_types
[]
=
{
"???"
,
"???"
,
"Movie"
,
"Interactive"
};
printf
(
" object type : BD-J
\n
"
);
printf
(
" playback type : %s
\n
"
,
playback_types
[
bdj
->
playback_type
]);
printf
(
" name : %s
\n
"
,
bdj
->
name
);
}
static
void
_indx_print_play_item
(
INDX_PLAY_ITEM
*
title
)
{
if
(
title
->
object_type
==
1
)
{
_indx_print_hdmv_obj
(
&
title
->
hdmv
);
}
else
{
_indx_print_bdj_obj
(
&
title
->
bdj
);
}
}
static
void
_indx_print_title
(
INDX_TITLE
*
title
)
{
if
(
title
->
object_type
==
1
)
{
_indx_print_hdmv_obj
(
&
title
->
hdmv
);
}
else
{
_indx_print_bdj_obj
(
&
title
->
bdj
);
}
printf
(
" access type : %d
\n
"
,
title
->
access_type
);
}
static
void
_indx_print
(
INDX_ROOT
*
index
)
{
uint32_t
i
;
printf
(
"Application info:
\n
"
);
_indx_print_app_info
(
&
index
->
app_info
);
printf
(
"
\n
First playback:
\n
"
);
_indx_print_play_item
(
&
index
->
first_play
);
printf
(
"
\n
Top menu:
\n
"
);
_indx_print_play_item
(
&
index
->
top_menu
);
printf
(
"
\n
Titles: %d
\n
"
,
index
->
num_titles
);
for
(
i
=
0
;
i
<
index
->
num_titles
;
i
++
)
{
printf
(
"%02d"
,
i
);
_indx_print_title
(
&
index
->
titles
[
i
]);
}
}
int
main
(
int
argc
,
const
char
*
argv
[])
{
char
file
[
1024
];
INDX_ROOT
*
index
;
if
(
argc
!=
2
)
{
fprintf
(
stderr
,
"usage: %s <disc_root>
\n
"
,
argv
[
0
]);
return
1
;
}
sprintf
(
file
,
"%s/BDMV/index.bdmv"
,
argv
[
1
]);
index
=
indx_parse
(
file
);
if
(
index
)
{
_indx_print
(
index
);
indx_free
(
index
);
}
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment