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
f640890d
Commit
f640890d
authored
Mar 30, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input: move var_OptionParse() code to item.c
parent
7491a5ff
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
6 deletions
+14
-6
include/vlc_input_item.h
include/vlc_input_item.h
+2
-0
src/input/input.c
src/input/input.c
+1
-6
src/input/item.c
src/input/item.c
+11
-0
No files found.
include/vlc_input_item.h
View file @
f640890d
...
@@ -188,6 +188,8 @@ enum input_item_option_e
...
@@ -188,6 +188,8 @@ enum input_item_option_e
*/
*/
VLC_API
int
input_item_AddOption
(
input_item_t
*
,
const
char
*
,
unsigned
i_flags
);
VLC_API
int
input_item_AddOption
(
input_item_t
*
,
const
char
*
,
unsigned
i_flags
);
void
input_item_ApplyOptions
(
vlc_object_t
*
,
input_item_t
*
);
/* */
/* */
VLC_API
bool
input_item_HasErrorWhenReading
(
input_item_t
*
);
VLC_API
bool
input_item_HasErrorWhenReading
(
input_item_t
*
);
VLC_API
void
input_item_SetMeta
(
input_item_t
*
,
vlc_meta_type_t
meta_type
,
const
char
*
psz_val
);
VLC_API
void
input_item_SetMeta
(
input_item_t
*
,
vlc_meta_type_t
meta_type
,
const
char
*
psz_val
);
...
...
src/input/input.c
View file @
f640890d
...
@@ -318,12 +318,7 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
...
@@ -318,12 +318,7 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
}
}
/* Parse input options */
/* Parse input options */
vlc_mutex_lock
(
&
p_item
->
lock
);
input_item_ApplyOptions
(
VLC_OBJECT
(
p_input
),
p_item
);
assert
(
(
int
)
p_item
->
optflagc
==
p_item
->
i_options
);
for
(
i
=
0
;
i
<
p_item
->
i_options
;
i
++
)
var_OptionParse
(
VLC_OBJECT
(
p_input
),
p_item
->
ppsz_options
[
i
],
!!
(
p_item
->
optflagv
[
i
]
&
VLC_INPUT_OPTION_TRUSTED
)
);
vlc_mutex_unlock
(
&
p_item
->
lock
);
p_input
->
b_preparsing
=
b_quick
;
p_input
->
b_preparsing
=
b_quick
;
p_input
->
psz_header
=
psz_header
?
strdup
(
psz_header
)
:
NULL
;
p_input
->
psz_header
=
psz_header
?
strdup
(
psz_header
)
:
NULL
;
...
...
src/input/item.c
View file @
f640890d
...
@@ -518,6 +518,17 @@ out:
...
@@ -518,6 +518,17 @@ out:
return
err
;
return
err
;
}
}
void
input_item_ApplyOptions
(
vlc_object_t
*
obj
,
input_item_t
*
item
)
{
vlc_mutex_lock
(
&
item
->
lock
);
assert
(
item
->
optflagc
==
(
unsigned
)
item
->
i_options
);
for
(
unsigned
i
=
0
;
i
<
(
unsigned
)
item
->
i_options
;
i
++
)
var_OptionParse
(
obj
,
item
->
ppsz_options
[
i
],
!!
(
item
->
optflagv
[
i
]
&
VLC_INPUT_OPTION_TRUSTED
));
vlc_mutex_unlock
(
&
item
->
lock
);
}
static
info_category_t
*
InputItemFindCat
(
input_item_t
*
p_item
,
static
info_category_t
*
InputItemFindCat
(
input_item_t
*
p_item
,
int
*
pi_index
,
const
char
*
psz_cat
)
int
*
pi_index
,
const
char
*
psz_cat
)
{
{
...
...
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