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
71daa94b
Commit
71daa94b
authored
Jun 03, 2015
by
Thomas Guillem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
access: add a default pf_control for directory accesses
parent
91f08755
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
35 additions
and
0 deletions
+35
-0
include/vlc_access.h
include/vlc_access.h
+5
-0
modules/access/directory.c
modules/access/directory.c
+1
-0
modules/access/dsm/access.c
modules/access/dsm/access.c
+1
-0
modules/access/ftp.c
modules/access/ftp.c
+1
-0
modules/access/sftp.c
modules/access/sftp.c
+1
-0
modules/access/smb.c
modules/access/smb.c
+1
-0
modules/services_discovery/upnp.cpp
modules/services_discovery/upnp.cpp
+1
-0
src/input/access.c
src/input/access.c
+23
-0
src/libvlccore.sym
src/libvlccore.sym
+1
-0
No files found.
include/vlc_access.h
View file @
71daa94b
...
...
@@ -162,6 +162,11 @@ static inline void access_InitFields( access_t *p_a )
*/
VLC_API
input_thread_t
*
access_GetParentInput
(
access_t
*
p_access
)
VLC_USED
;
/**
* Default pf_control callback for directory accesses.
*/
VLC_API
int
access_vaDirectoryControlHelper
(
access_t
*
p_access
,
int
i_query
,
va_list
args
);
#define ACCESS_SET_CALLBACKS( read, block, control, seek ) \
do { \
p_access->pf_read = (read); \
...
...
modules/access/directory.c
View file @
71daa94b
...
...
@@ -93,6 +93,7 @@ int DirOpen (vlc_object_t *p_this)
p_access
->
p_sys
->
p_dir
=
p_dir
;
p_access
->
p_sys
->
psz_base_uri
=
psz_base_uri
;
p_access
->
pf_readdir
=
DirRead
;
p_access
->
pf_control
=
access_vaDirectoryControlHelper
;
return
VLC_SUCCESS
;
}
...
...
modules/access/dsm/access.c
View file @
71daa94b
...
...
@@ -705,6 +705,7 @@ static int BrowserInit( access_t *p_access )
p_access
->
pf_readdir
=
BrowseDirectory
;
p_access
->
info
.
b_dir_can_loop
=
true
;
}
p_access
->
pf_control
=
access_vaDirectoryControlHelper
;
return
VLC_SUCCESS
;
}
modules/access/ftp.c
View file @
71daa94b
...
...
@@ -668,6 +668,7 @@ static int InOpen( vlc_object_t *p_this )
if
(
b_directory
)
{
p_access
->
pf_readdir
=
DirRead
;
p_access
->
pf_control
=
access_vaDirectoryControlHelper
;
p_access
->
info
.
b_dir_can_loop
=
true
;
}
else
ACCESS_SET_CALLBACKS
(
Read
,
NULL
,
Control
,
Seek
);
\
...
...
modules/access/sftp.c
View file @
71daa94b
...
...
@@ -296,6 +296,7 @@ static int Open( vlc_object_t* p_this )
p_sys
->
file
=
libssh2_sftp_opendir
(
p_sys
->
sftp_session
,
psz_path
);
p_access
->
pf_readdir
=
DirRead
;
p_access
->
pf_control
=
access_vaDirectoryControlHelper
;
p_access
->
info
.
b_dir_can_loop
=
true
;
if
(
p_sys
->
file
)
...
...
modules/access/smb.c
View file @
71daa94b
...
...
@@ -253,6 +253,7 @@ static int Open( vlc_object_t *p_this )
return
VLC_EGENERIC
;
#else
p_access
->
pf_readdir
=
DirRead
;
p_access
->
pf_control
=
access_vaDirectoryControlHelper
;
p_access
->
info
.
b_dir_can_loop
=
true
;
i_smb
=
smbc_opendir
(
psz_uri
);
i_size
=
0
;
...
...
modules/services_discovery/upnp.cpp
View file @
71daa94b
...
...
@@ -839,6 +839,7 @@ static int Open( vlc_object_t *p_this )
}
p_access
->
pf_readdir
=
ReadDirectory
;
p_access
->
pf_control
=
access_vaDirectoryControlHelper
;
p_access
->
info
.
b_dir_sorted
=
true
;
p_access
->
info
.
b_dir_can_loop
=
true
;
...
...
src/input/access.c
View file @
71daa94b
...
...
@@ -128,3 +128,26 @@ input_thread_t * access_GetParentInput( access_t *p_access )
return
p_access
->
p_input
?
vlc_object_hold
((
vlc_object_t
*
)
p_access
->
p_input
)
:
NULL
;
}
/*****************************************************************************
* access_vaDirectoryControlHelper:
*****************************************************************************/
int
access_vaDirectoryControlHelper
(
access_t
*
p_access
,
int
i_query
,
va_list
args
)
{
VLC_UNUSED
(
p_access
);
switch
(
i_query
)
{
case
ACCESS_CAN_SEEK
:
case
ACCESS_CAN_FASTSEEK
:
case
ACCESS_CAN_PAUSE
:
case
ACCESS_CAN_CONTROL_PACE
:
*
va_arg
(
args
,
bool
*
)
=
false
;
break
;
case
ACCESS_GET_PTS_DELAY
:
*
va_arg
(
args
,
int64_t
*
)
=
0
;
break
;
default:
return
VLC_EGENERIC
;
}
return
VLC_SUCCESS
;
}
src/libvlccore.sym
View file @
71daa94b
access_GetParentInput
access_vaDirectoryControlHelper
AddMD5
aout_BitsPerSample
aout_ChannelExtract
...
...
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