Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
3f5d4a95
Commit
3f5d4a95
authored
Aug 22, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Export input_SplitMRL helper.
parent
2ba2327b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
13 deletions
+21
-13
include/vlc_input.h
include/vlc_input.h
+9
-0
src/input/input.c
src/input/input.c
+6
-7
src/input/input_internal.h
src/input/input_internal.h
+0
-2
src/input/stream.c
src/input/stream.c
+5
-4
src/libvlccore.sym
src/libvlccore.sym
+1
-0
No files found.
include/vlc_input.h
View file @
3f5d4a95
...
...
@@ -543,4 +543,13 @@ VLC_EXPORT( bool, input_AddSubtitles, ( input_thread_t *, char *, bool ) );
VLC_EXPORT
(
vlc_event_manager_t
*
,
input_get_event_manager
,
(
input_thread_t
*
)
);
/**
* This function allows to split a MRL into access, demux and path part.
*
* You should not write into access and demux string as they may not point into
* the provided buffer.
* The buffer provided by psz_dup will be modified.
*/
VLC_EXPORT
(
void
,
input_SplitMRL
,
(
const
char
**
ppsz_access
,
const
char
**
ppsz_demux
,
char
**
ppsz_path
,
char
*
psz_dup
)
);
#endif
src/input/input.c
View file @
3f5d4a95
...
...
@@ -2085,7 +2085,7 @@ static int InputSourceInit( input_thread_t *p_input,
if
(
!
p_input
)
return
VLC_EGENERIC
;
/* Split uri */
MRLSplit
(
psz_dup
,
&
psz_access
,
&
psz_demux
,
&
psz_path
);
input_SplitMRL
(
&
psz_access
,
&
psz_demux
,
&
psz_path
,
psz_dup
);
msg_Dbg
(
p_input
,
"`%s' gives access `%s' demux `%s' path `%s'"
,
psz_mrl
,
psz_access
,
psz_demux
,
psz_path
);
...
...
@@ -2292,7 +2292,7 @@ static int InputSourceInit( input_thread_t *p_input,
{
const
char
*
psz_a
,
*
psz_d
;
psz_buf
=
strdup
(
in
->
p_access
->
psz_path
);
MRLSplit
(
psz_buf
,
&
psz_a
,
&
psz_d
,
&
psz_real_path
);
input_SplitMRL
(
&
psz_a
,
&
psz_d
,
&
psz_real_path
,
psz_buf
);
}
else
{
...
...
@@ -2674,8 +2674,8 @@ static void DemuxMeta( input_thread_t *p_input, vlc_meta_t *p_meta, demux_t *p_d
* MRLSplit: parse the access, demux and url part of the
* Media Resource Locator.
*****************************************************************************/
void
MRLSplit
(
char
*
psz_dup
,
const
char
**
ppsz_access
,
const
char
**
ppsz_demux
,
char
**
ppsz_path
)
void
input_SplitMRL
(
const
char
**
ppsz_access
,
const
char
**
ppsz_demux
,
char
**
ppsz_path
,
char
*
psz_dup
)
{
char
*
psz_access
=
NULL
;
char
*
psz_demux
=
NULL
;
...
...
@@ -2707,7 +2707,7 @@ void MRLSplit( char *psz_dup, const char **ppsz_access, const char **ppsz_demux,
}
*
ppsz_access
=
psz_access
?
psz_access
:
(
char
*
)
""
;
*
ppsz_demux
=
psz_demux
?
psz_demux
:
(
char
*
)
""
;
*
ppsz_path
=
psz_path
?
psz_path
:
(
char
*
)
""
;
*
ppsz_path
=
psz_path
;
}
static
inline
bool
next
(
char
**
src
)
...
...
@@ -2871,8 +2871,7 @@ bool input_AddSubtitles( input_thread_t *p_input, char *psz_subtitle,
/*****************************************************************************
* input_get_event_manager
*****************************************************************************/
vlc_event_manager_t
*
input_get_event_manager
(
input_thread_t
*
p_input
)
vlc_event_manager_t
*
input_get_event_manager
(
input_thread_t
*
p_input
)
{
return
&
p_input
->
p
->
event_manager
;
}
src/input/input_internal.h
View file @
3f5d4a95
...
...
@@ -382,8 +382,6 @@ void input_ClockSetRate( input_clock_t *cl, int i_rate );
char
**
subtitles_Detect
(
input_thread_t
*
,
char
*
path
,
const
char
*
fname
);
int
subtitles_Filter
(
const
char
*
);
void
MRLSplit
(
char
*
,
const
char
**
,
const
char
**
,
char
**
);
static
inline
void
input_ChangeStateWithVarCallback
(
input_thread_t
*
p_input
,
int
state
,
bool
callback
)
{
const
bool
changed
=
p_input
->
i_state
!=
state
;
...
...
src/input/stream.c
View file @
3f5d4a95
...
...
@@ -254,11 +254,12 @@ stream_t *__stream_UrlNew( vlc_object_t *p_parent, const char *psz_url )
access_t
*
p_access
;
stream_t
*
p_res
;
if
(
!
psz_url
)
return
0
;
if
(
!
psz_url
)
return
NULL
;
char
psz_dup
[
strlen
(
psz_url
)
+
1
];
strcpy
(
psz_dup
,
psz_url
);
;
MRLSplit
(
psz_dup
,
&
psz_access
,
&
psz_demux
,
&
psz_path
);
char
psz_dup
[
strlen
(
psz_url
)
+
1
];
strcpy
(
psz_dup
,
psz_url
)
;
input_SplitMRL
(
&
psz_access
,
&
psz_demux
,
&
psz_path
,
psz_dup
);
/* Now try a real access */
p_access
=
access_New
(
p_parent
,
psz_access
,
psz_demux
,
psz_path
);
...
...
src/libvlccore.sym
View file @
3f5d4a95
...
...
@@ -177,6 +177,7 @@ input_item_SetURI
input_MetaTypeToLocalizedString
__input_Preparse
__input_Read
input_SplitMRL
input_StopThread
input_vaControl
__intf_Create
...
...
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