Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
13
Issues
13
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GSoC2018
macOS
vlc
Commits
bc8418f5
Commit
bc8418f5
authored
Jun 04, 2016
by
Thomas Guillem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input/access: add preparsing flag
This flag will be used to notify the access module that we are preparsing.
parent
7658154c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
7 deletions
+9
-7
include/vlc_access.h
include/vlc_access.h
+1
-0
src/input/access.c
src/input/access.c
+5
-4
src/input/demux.c
src/input/demux.c
+1
-1
src/input/stream.c
src/input/stream.c
+1
-1
src/input/stream.h
src/input/stream.h
+1
-1
No files found.
include/vlc_access.h
View file @
bc8418f5
...
...
@@ -83,6 +83,7 @@ struct access_t
char
*
psz_url
;
/**< Full URL or MRL */
const
char
*
psz_location
;
/**< Location (URL with the scheme stripped) */
char
*
psz_filepath
;
/**< Local file path (if applicable) */
bool
b_preparsing
;
/**< True if this access is used to preparse */
/* pf_read/pf_block/pf_readdir is used to read data.
* XXX A access should set one and only one of them */
...
...
src/input/access.c
View file @
bc8418f5
...
...
@@ -61,7 +61,7 @@ char *get_path(const char *location)
* access_New:
*****************************************************************************/
static
access_t
*
access_New
(
vlc_object_t
*
parent
,
input_thread_t
*
input
,
const
char
*
mrl
)
bool
preparsing
,
const
char
*
mrl
)
{
char
*
redirv
[
MAX_REDIR
];
unsigned
redirc
=
0
;
...
...
@@ -80,6 +80,7 @@ static access_t *access_New(vlc_object_t *parent, input_thread_t *input,
access
->
pf_seek
=
NULL
;
access
->
pf_control
=
NULL
;
access
->
p_sys
=
NULL
;
access
->
b_preparsing
=
preparsing
;
access_InitFields
(
access
);
if
(
unlikely
(
access
->
psz_url
==
NULL
))
...
...
@@ -142,7 +143,7 @@ error:
access_t
*
vlc_access_NewMRL
(
vlc_object_t
*
parent
,
const
char
*
mrl
)
{
return
access_New
(
parent
,
NULL
,
mrl
);
return
access_New
(
parent
,
NULL
,
false
,
mrl
);
}
void
vlc_access_Delete
(
access_t
*
access
)
...
...
@@ -378,7 +379,7 @@ static void AStreamDestroy(stream_t *s)
}
stream_t
*
stream_AccessNew
(
vlc_object_t
*
parent
,
input_thread_t
*
input
,
const
char
*
url
)
bool
preparsing
,
const
char
*
url
)
{
stream_t
*
s
=
stream_CommonNew
(
parent
,
AStreamDestroy
);
if
(
unlikely
(
s
==
NULL
))
...
...
@@ -388,7 +389,7 @@ stream_t *stream_AccessNew(vlc_object_t *parent, input_thread_t *input,
if
(
unlikely
(
sys
==
NULL
))
goto
error
;
sys
->
access
=
access_New
(
VLC_OBJECT
(
s
),
input
,
url
);
sys
->
access
=
access_New
(
VLC_OBJECT
(
s
),
input
,
preparsing
,
url
);
if
(
sys
->
access
==
NULL
)
goto
error
;
...
...
src/input/demux.c
View file @
bc8418f5
...
...
@@ -285,7 +285,7 @@ demux_t *input_DemuxNew( vlc_object_t *obj, const char *access_name,
if
(
likely
(
asprintf
(
&
url
,
"%s://%s"
,
access_name
,
path
)
>=
0
)
)
{
stream
=
stream_AccessNew
(
obj
,
input
,
url
);
stream
=
stream_AccessNew
(
obj
,
input
,
preparsing
,
url
);
free
(
url
);
}
...
...
src/input/stream.c
View file @
bc8418f5
...
...
@@ -130,7 +130,7 @@ stream_t *stream_UrlNew( vlc_object_t *p_parent, const char *psz_url )
if
(
!
psz_url
)
return
NULL
;
stream_t
*
s
=
stream_AccessNew
(
p_parent
,
NULL
,
psz_url
);
stream_t
*
s
=
stream_AccessNew
(
p_parent
,
NULL
,
false
,
psz_url
);
if
(
s
==
NULL
)
msg_Err
(
p_parent
,
"no suitable access module for `%s'"
,
psz_url
);
return
s
;
...
...
src/input/stream.h
View file @
bc8418f5
...
...
@@ -35,7 +35,7 @@ void stream_CommonDelete( stream_t *s );
/**
* This function creates a stream_t with an access_t back-end.
*/
stream_t
*
stream_AccessNew
(
vlc_object_t
*
,
input_thread_t
*
,
const
char
*
);
stream_t
*
stream_AccessNew
(
vlc_object_t
*
,
input_thread_t
*
,
bool
,
const
char
*
);
/**
* This function creates a new stream_t filter.
...
...
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