Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
3fc7274f
Commit
3fc7274f
authored
Feb 21, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support for opening any file descriptor with fd://
parent
a04b972d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
modules/access/file.c
modules/access/file.c
+8
-7
No files found.
modules/access/file.c
View file @
3fc7274f
...
...
@@ -88,6 +88,7 @@ vlc_module_begin ()
add_obsolete_string
(
"file-cat"
)
set_capability
(
"access"
,
50
)
add_shortcut
(
"file"
)
add_shortcut
(
"fd"
)
add_shortcut
(
"stream"
)
set_callbacks
(
Open
,
Close
)
vlc_module_end
()
...
...
@@ -121,8 +122,6 @@ static int Open( vlc_object_t *p_this )
access_t
*
p_access
=
(
access_t
*
)
p_this
;
access_sys_t
*
p_sys
;
bool
b_stdin
=
!
strcmp
(
p_access
->
psz_path
,
"-"
);
/* Update default_pts to a suitable value for file access */
var_Create
(
p_access
,
"file-caching"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
...
...
@@ -135,13 +134,17 @@ static int Open( vlc_object_t *p_this )
p_sys
->
b_pace_control
=
true
;
/* Open file */
msg_Dbg
(
p_access
,
"opening file `%s'"
,
p_access
->
psz_path
);
int
fd
=
-
1
;
if
(
b_stdin
)
if
(
!
strcasecmp
(
p_access
->
psz_access
,
"fd"
))
fd
=
dup
(
atoi
(
p_access
->
psz_path
));
else
if
(
!
strcmp
(
p_access
->
psz_path
,
"-"
))
fd
=
dup
(
0
);
else
{
msg_Dbg
(
p_access
,
"opening file `%s'"
,
p_access
->
psz_path
);
fd
=
open_file
(
p_access
,
p_access
->
psz_path
);
}
if
(
fd
==
-
1
)
goto
error
;
...
...
@@ -165,8 +168,6 @@ static int Open( vlc_object_t *p_this )
else
if
(
!
S_ISBLK
(
st
.
st_mode
))
p_access
->
pf_seek
=
NoSeek
;
#else
if
(
b_stdin
)
p_access
->
pf_seek
=
NoSeek
;
# warning File size not known!
#endif
...
...
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