Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
d92fffbd
Commit
d92fffbd
authored
Feb 21, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add flags when adding an input item option
parent
de534450
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
26 deletions
+26
-26
include/vlc_input.h
include/vlc_input.h
+10
-2
src/control/media_descriptor.c
src/control/media_descriptor.c
+2
-1
src/input/item.c
src/input/item.c
+13
-21
src/libvlc.sym
src/libvlc.sym
+1
-2
No files found.
include/vlc_input.h
View file @
d92fffbd
...
...
@@ -142,8 +142,16 @@ static inline void input_ItemAddSubItem( input_item_t *p_parent,
vlc_event_send
(
&
p_parent
->
event_manager
,
&
event
);
}
VLC_EXPORT
(
void
,
input_ItemAddOption
,(
input_item_t
*
,
const
char
*
)
);
VLC_EXPORT
(
void
,
input_ItemAddOptionNoDup
,(
input_item_t
*
,
const
char
*
)
);
#define VLC_INPUT_OPTION_UNIQUE 0x1
#define VLC_INPUT_OPTION_TRUSTED 0x2
VLC_EXPORT
(
void
,
input_ItemAddOpt
,
(
input_item_t
*
,
const
char
*
str
,
unsigned
flags
)
);
static
inline
void
input_ItemAddOption
(
input_item_t
*
item
,
const
char
*
str
)
{
input_ItemAddOpt
(
item
,
str
,
VLC_INPUT_OPTION_TRUSTED
);
}
static
inline
void
input_ItemClean
(
input_item_t
*
p_i
)
{
...
...
src/control/media_descriptor.c
View file @
d92fffbd
...
...
@@ -342,7 +342,8 @@ void libvlc_media_descriptor_add_option(
libvlc_exception_t
*
p_e
)
{
(
void
)
p_e
;
input_ItemAddOptionNoDup
(
p_md
->
p_input_item
,
ppsz_option
);
input_ItemAddOpt
(
p_md
->
p_input_item
,
ppsz_option
,
VLC_INPUT_OPTION_UNIQUE
|
VLC_INPUT_OPTION_TRUSTED
);
}
/**************************************************************************
...
...
src/input/item.c
View file @
d92fffbd
...
...
@@ -115,33 +115,25 @@ static void input_ItemDestroy ( gc_object_t *p_this )
free
(
p_input
);
}
void
input_ItemAddOpt
ion
(
input_item_t
*
p_input
,
const
char
*
psz_option
)
void
input_ItemAddOpt
(
input_item_t
*
p_input
,
const
char
*
psz_option
,
unsigned
flags
)
{
if
(
!
psz_option
)
return
;
vlc_mutex_lock
(
&
p_input
->
lock
);
INSERT_ELEM
(
p_input
->
ppsz_options
,
p_input
->
i_options
,
p_input
->
i_options
,
strdup
(
psz_option
)
);
vlc_mutex_unlock
(
&
p_input
->
lock
);
}
if
(
psz_option
==
NULL
)
return
;
void
input_ItemAddOptionNoDup
(
input_item_t
*
p_input
,
const
char
*
psz_option
)
{
int
i
;
if
(
!
psz_option
)
return
;
vlc_mutex_lock
(
&
p_input
->
lock
);
for
(
i
=
0
;
i
<
p_input
->
i_options
;
i
++
)
if
(
flags
&
VLC_INPUT_OPTION_UNIQUE
)
{
if
(
!
strcmp
(
p_input
->
ppsz_options
[
i
],
psz_option
)
)
{
vlc_mutex_unlock
(
&
p_input
->
lock
);
return
;
}
for
(
int
i
=
0
;
i
<
p_input
->
i_options
;
i
++
)
if
(
!
strcmp
(
p_input
->
ppsz_options
[
i
],
psz_option
)
)
goto
out
;
}
TAB_APPEND
(
p_input
->
i_options
,
p_input
->
ppsz_options
,
strdup
(
psz_option
));
vlc_mutex_unlock
(
&
p_input
->
lock
);
}
INSERT_ELEM
(
p_input
->
ppsz_options
,
p_input
->
i_options
,
p_input
->
i_options
,
strdup
(
psz_option
)
);
out:
vlc_mutex_unlock
(
&
p_input
->
lock
);
}
int
input_ItemAddInfo
(
input_item_t
*
p_i
,
const
char
*
psz_cat
,
...
...
src/libvlc.sym
View file @
d92fffbd
...
...
@@ -130,8 +130,7 @@ input_DecoderNew
input_DestroyThread
input_GetItem
input_ItemAddInfo
input_ItemAddOption
input_ItemAddOptionNoDup
input_ItemAddOpt
input_ItemGetById
input_ItemGetInfo
__input_ItemNewExt
...
...
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