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
763e765d
Commit
763e765d
authored
May 04, 2015
by
Thomas Guillem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
access: pf_control is not mandatory for directory accesses
parent
7385062d
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
7 additions
and
117 deletions
+7
-117
include/vlc_access.h
include/vlc_access.h
+2
-1
modules/access/directory.c
modules/access/directory.c
+0
-30
modules/access/dsm/access.c
modules/access/dsm/access.c
+0
-27
modules/access/sftp.c
modules/access/sftp.c
+0
-28
modules/services_discovery/upnp.cpp
modules/services_discovery/upnp.cpp
+0
-31
src/input/access.c
src/input/access.c
+5
-0
No files found.
include/vlc_access.h
View file @
763e765d
...
...
@@ -117,7 +117,8 @@ struct access_t
static
inline
int
access_vaControl
(
access_t
*
p_access
,
int
i_query
,
va_list
args
)
{
if
(
!
p_access
)
return
VLC_EGENERIC
;
return
p_access
->
pf_control
(
p_access
,
i_query
,
args
);
return
p_access
->
pf_control
?
p_access
->
pf_control
(
p_access
,
i_query
,
args
)
:
VLC_EGENERIC
;
}
static
inline
int
access_Control
(
access_t
*
p_access
,
int
i_query
,
...
)
...
...
modules/access/directory.c
View file @
763e765d
...
...
@@ -327,7 +327,6 @@ int DirInit (access_t *p_access, DIR *handle)
p_sys
->
ignored_exts
=
var_InheritString
(
p_access
,
"ignore-filetypes"
);
p_access
->
pf_readdir
=
DirRead
;
p_access
->
pf_control
=
DirControl
;
return
VLC_SUCCESS
;
...
...
@@ -417,32 +416,3 @@ int DirRead (access_t *p_access, input_item_node_t *p_current_node)
return
VLC_SUCCESS
;
}
/*****************************************************************************
* Control:
*****************************************************************************/
int
DirControl
(
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
:
*
va_arg
(
args
,
bool
*
)
=
false
;
break
;
case
ACCESS_CAN_PAUSE
:
case
ACCESS_CAN_CONTROL_PACE
:
*
va_arg
(
args
,
bool
*
)
=
true
;
break
;
case
ACCESS_GET_PTS_DELAY
:
*
va_arg
(
args
,
int64_t
*
)
=
DEFAULT_PTS_DELAY
*
1000
;
break
;
default:
return
VLC_EGENERIC
;
}
return
VLC_SUCCESS
;
}
modules/access/dsm/access.c
View file @
763e765d
...
...
@@ -692,32 +692,6 @@ static int BrowseDirectory( access_t *p_access, input_item_node_t *p_node )
return
i_ret
;
}
static
int
BrowserControl
(
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
:
*
va_arg
(
args
,
bool
*
)
=
false
;
break
;
case
ACCESS_CAN_PAUSE
:
case
ACCESS_CAN_CONTROL_PACE
:
*
va_arg
(
args
,
bool
*
)
=
true
;
break
;
case
ACCESS_GET_PTS_DELAY
:
*
va_arg
(
args
,
int64_t
*
)
=
DEFAULT_PTS_DELAY
*
1000
;
break
;
default:
return
VLC_EGENERIC
;
}
return
VLC_SUCCESS
;
}
static
int
BrowserInit
(
access_t
*
p_access
)
{
access_sys_t
*
p_sys
=
p_access
->
p_sys
;
...
...
@@ -726,7 +700,6 @@ static int BrowserInit( access_t *p_access )
p_access
->
pf_readdir
=
BrowseShare
;
else
p_access
->
pf_readdir
=
BrowseDirectory
;
p_access
->
pf_control
=
BrowserControl
;
return
VLC_SUCCESS
;
}
modules/access/sftp.c
View file @
763e765d
...
...
@@ -272,7 +272,6 @@ static int Open( vlc_object_t* p_this )
p_sys
->
file
=
libssh2_sftp_opendir
(
p_sys
->
sftp_session
,
url
.
psz_path
);
p_access
->
pf_readdir
=
DirRead
;
p_access
->
pf_control
=
DirControl
;
if
(
p_sys
->
file
)
{
...
...
@@ -506,30 +505,3 @@ static int DirRead (access_t *p_access, input_item_node_t *p_current_node)
free
(
psz_file
);
return
VLC_SUCCESS
;
}
static
int
DirControl
(
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
:
*
va_arg
(
args
,
bool
*
)
=
false
;
break
;
case
ACCESS_CAN_PAUSE
:
case
ACCESS_CAN_CONTROL_PACE
:
*
va_arg
(
args
,
bool
*
)
=
true
;
break
;
case
ACCESS_GET_PTS_DELAY
:
*
va_arg
(
args
,
int64_t
*
)
=
DEFAULT_PTS_DELAY
*
1000
;
break
;
default:
return
VLC_EGENERIC
;
}
return
VLC_SUCCESS
;
}
modules/services_discovery/upnp.cpp
View file @
763e765d
...
...
@@ -806,36 +806,6 @@ static int ReadDirectory( access_t *p_access, input_item_node_t* p_node )
return
VLC_SUCCESS
;
}
static
int
Control
(
access_t
*
,
int
i_query
,
va_list
args
)
{
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_SIZE
:
{
*
va_arg
(
args
,
uint64_t
*
)
=
0
;
break
;
}
case
ACCESS_GET_PTS_DELAY
:
*
va_arg
(
args
,
int64_t
*
)
=
0
;
break
;
case
ACCESS_SET_PAUSE_STATE
:
/* Nothing to do */
break
;
default:
return
VLC_EGENERIC
;
}
return
VLC_SUCCESS
;
}
static
int
Open
(
vlc_object_t
*
p_this
)
{
access_t
*
p_access
=
(
access_t
*
)
p_this
;
...
...
@@ -852,7 +822,6 @@ static int Open( vlc_object_t *p_this )
}
p_access
->
pf_readdir
=
ReadDirectory
;
ACCESS_SET_CALLBACKS
(
NULL
,
NULL
,
Control
,
NULL
);
return
VLC_SUCCESS
;
}
...
...
src/input/access.c
View file @
763e765d
...
...
@@ -25,6 +25,8 @@
# include "config.h"
#endif
#include <assert.h>
#include "access.h"
#include <libvlc.h>
#include <vlc_url.h>
...
...
@@ -89,6 +91,9 @@ access_t *access_New( vlc_object_t *p_obj, input_thread_t *p_parent_input,
if
(
p_access
->
p_module
==
NULL
)
goto
error
;
/* if access has pf_readdir, pf_control is not mandatory */
assert
(
p_access
->
pf_control
||
p_access
->
pf_readdir
);
return
p_access
;
error:
...
...
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