Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (5)
mpls_dump: show mark types in text
· 18a883e3
hpi1
authored
Jul 01, 2019
18a883e3
Fix clipping floats
· 21f15d2f
hpi1
authored
Jul 02, 2019
21f15d2f
Check for NULL
· 829e0c49
hpi1
authored
Jul 02, 2019
829e0c49
Improve dir_open() logging
· e555789f
hpi1
authored
Jul 02, 2019
e555789f
Add missing const
· 8c620f15
hpi1
authored
Jul 02, 2019
8c620f15
Hide whitespace changes
Inline
Side-by-side
src/devtools/mpls_dump.c
View file @
8c620f15
...
...
@@ -68,6 +68,11 @@ const VALUE_MAP connection_type_map[] = {
{
0
,
NULL
}
};
const
VALUE_MAP
mark_type_map
[]
=
{
{
BLURAY_MARK_ENTRY
,
"Entry (chapter)"
},
{
BLURAY_MARK_LINK
,
"Link"
},
{
0
,
NULL
}
};
static
char
*
_mk_path
(
const
char
*
base
,
const
char
*
sub
)
...
...
@@ -251,7 +256,9 @@ _show_marks(MPLS_PL *pl, int level)
plm
=
&
pl
->
play_mark
[
ii
];
indent_printf
(
level
,
"PlayMark %d"
,
ii
);
indent_printf
(
level
+
1
,
"Type: %02x"
,
plm
->
mark_type
);
indent_printf
(
level
+
1
,
"Type: %s (%02x)"
,
_lookup_str
(
mark_type_map
,
plm
->
mark_type
),
plm
->
mark_type
);
if
(
plm
->
play_item_ref
<
pl
->
list_count
)
{
pi
=
&
pl
->
play_item
[
plm
->
play_item_ref
];
indent_printf
(
level
+
1
,
"PlayItem: %s"
,
pi
->
clip
[
0
].
clip_id
);
...
...
src/examples/bd_info.c
View file @
8c620f15
...
...
@@ -52,6 +52,8 @@ static const char *_hex2str(const uint8_t *data, size_t len)
size_t
i
;
str
=
(
char
*
)
realloc
(
str
,
2
*
len
+
1
);
if
(
!
str
)
return
""
;
*
str
=
0
;
for
(
i
=
0
;
i
<
len
;
i
++
)
{
...
...
src/file/dir_posix.c
View file @
8c620f15
...
...
@@ -94,7 +94,6 @@ static BD_DIR_H *_dir_open_posix(const char* dirname)
{
BD_DIR_H
*
dir
=
calloc
(
1
,
sizeof
(
BD_DIR_H
));
BD_DEBUG
(
DBG_DIR
,
"Opening POSIX dir %s... (%p)
\n
"
,
dirname
,
(
void
*
)
dir
);
if
(
!
dir
)
{
return
NULL
;
}
...
...
@@ -103,10 +102,11 @@ static BD_DIR_H *_dir_open_posix(const char* dirname)
dir
->
read
=
_dir_read_posix
;
if
((
dir
->
internal
=
opendir
(
dirname
)))
{
BD_DEBUG
(
DBG_DIR
,
"Opened POSIX dir %s (%p)
\n
"
,
dirname
,
(
void
*
)
dir
);
return
dir
;
}
BD_DEBUG
(
DBG_DIR
,
"Error opening dir
! (%p)
\n
"
,
(
void
*
)
dir
);
BD_DEBUG
(
DBG_DIR
,
"Error opening dir
%s
\n
"
,
dirname
);
X_FREE
(
dir
);
...
...
src/file/dir_win32.c
View file @
8c620f15
...
...
@@ -108,14 +108,13 @@ static BD_DIR_H *_dir_open_win32(const char* dirname)
BD_DIR_H
*
dir
=
calloc
(
1
,
sizeof
(
BD_DIR_H
));
dir_data_t
*
priv
=
NULL
;
BD_DEBUG
(
DBG_DIR
,
"Opening WIN32 dir %s... (%p)
\n
"
,
dirname
,
(
void
*
)
dir
);
if
(
!
dir
)
{
return
NULL
;
}
priv
=
_open_impl
(
dirname
);
if
(
priv
)
{
BD_DEBUG
(
DBG_DIR
,
"Opened WIN32 dir %s (%p)
\n
"
,
dirname
,
(
void
*
)
dir
);
dir
->
close
=
_dir_close_win32
;
dir
->
read
=
_dir_read_win32
;
dir
->
internal
=
priv
;
...
...
src/libbluray/bdj/java/org/videolan/media/content/control/GainControlImpl.java
View file @
8c620f15
...
...
@@ -43,7 +43,7 @@ abstract class GainControlImpl {
}
public
float
setDB
(
float
gain
)
{
this
.
level
=
Math
.
max
(
1
.0f
,
Math
.
min
(
0
.0f
,
(
float
)
Math
.
pow
(
10.0f
,
gain
/
10.0f
)));
this
.
level
=
Math
.
max
(
0
.0f
,
Math
.
min
(
1
.0f
,
(
float
)
Math
.
pow
(
10.0f
,
gain
/
10.0f
)));
this
.
gain
=
gain
;
setGain
(
this
.
mute
,
this
.
level
);
return
this
.
gain
;
...
...
@@ -54,7 +54,7 @@ abstract class GainControlImpl {
}
public
float
setLevel
(
float
level
)
{
this
.
level
=
Math
.
max
(
1
.0f
,
Math
.
min
(
0
.0f
,
level
));
this
.
level
=
Math
.
max
(
0
.0f
,
Math
.
min
(
1
.0f
,
level
));
this
.
gain
=
10.0f
*
(
float
)(
Math
.
log
(
this
.
level
)
/
Math
.
log
(
10.0f
));
setGain
(
this
.
mute
,
this
.
level
);
...
...
src/libbluray/bdj/java/org/videolan/media/content/control/PanningControlImpl.java
View file @
8c620f15
...
...
@@ -77,7 +77,7 @@ public class PanningControlImpl implements PanningControl {
private
float
clip
(
float
val
)
{
if
(
val
!=
val
)
/* NaN */
return
0.0f
;
return
Math
.
m
in
(-
1.0f
,
Math
.
m
ax
(
1.0f
,
val
));
return
Math
.
m
ax
(-
1.0f
,
Math
.
m
in
(
1.0f
,
val
));
}
private
BDHandler
player
;
...
...
src/libbluray/disc/disc.c
View file @
8c620f15
...
...
@@ -582,7 +582,7 @@ int disc_cache_bdrom_file(BD_DISC *p, const char *rel_path, const char *cache_pa
BD_FILE_H
*
disc_open_path_dec
(
BD_DISC
*
p
,
const
char
*
rel_path
)
{
size_t
size
=
strlen
(
rel_path
);
char
*
suf
=
(
size
>
5
)
?
rel_path
+
(
size
-
5
)
:
rel_path
;
const
char
*
suf
=
(
size
>
5
)
?
rel_path
+
(
size
-
5
)
:
rel_path
;
/* check if it's a stream */
if
(
strncmp
(
rel_path
,
"BDMV"
DIR_SEP
"STREAM"
,
11
))
{
// not equal
...
...