Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
cf79e2b9
Commit
cf79e2b9
authored
Nov 19, 2012
by
Konstantin Pavlov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bluray: try to find out disc mount point on OSX.
parent
15608ac3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
modules/access/bluray.c
modules/access/bluray.c
+27
-0
No files found.
modules/access/bluray.c
View file @
cf79e2b9
...
...
@@ -32,6 +32,14 @@
#include <sys/stat.h>
#endif
#ifdef __APPLE__
#define _DARWIN_C_SOURCE
#include <sys/stat.h>
#include <sys/param.h>
#include <sys/ucred.h>
#include <sys/mount.h>
#endif
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_demux.h>
/* demux_t */
...
...
@@ -209,6 +217,25 @@ static int blurayOpen( vlc_object_t *object )
}
}
#endif
/* HAVE_MNTENT_H && HAVE_SYS_STAT_H */
#ifdef __APPLE__
/* If we're passed a block device, try to convert it to the mount point. */
struct
stat
st
;
if
(
!
stat
(
p_sys
->
psz_bd_path
,
&
st
))
{
if
(
S_ISBLK
(
st
.
st_mode
))
{
struct
statfs
mbuf
[
128
];
int
fs_count
;
if
(
(
fs_count
=
getfsstat
(
NULL
,
0
,
MNT_NOWAIT
))
>
0
)
{
getfsstat
(
mbuf
,
fs_count
*
sizeof
(
mbuf
[
0
]),
MNT_NOWAIT
);
for
(
int
i
=
0
;
i
<
fs_count
;
++
i
)
{
if
(
!
strcmp
(
mbuf
[
i
].
f_mntfromname
,
p_sys
->
psz_bd_path
))
{
p_sys
->
psz_bd_path
=
strndup
(
mbuf
[
i
].
f_mntonname
,
strlen
(
mbuf
[
i
].
f_mntonname
));
}
}
}
}
}
#endif
p_sys
->
bluray
=
bd_open
(
p_sys
->
psz_bd_path
,
NULL
);
if
(
!
p_sys
->
bluray
)
{
free
(
p_sys
);
...
...
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