Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
6f436e21
Commit
6f436e21
authored
Mar 11, 2010
by
jpd
Browse files
input_item: new input_item_Copy()
parent
190459cf
Changes
3
Hide whitespace changes
Inline
Side-by-side
include/vlc_input_item.h
View file @
6f436e21
...
...
@@ -263,6 +263,12 @@ VLC_EXPORT( input_item_t *, input_item_NewExt, (vlc_object_t *, const char *psz_
*/
#define input_item_New( a,b,c ) input_item_NewExt( a, b, c, 0, NULL, 0, -1 )
/**
* This function creates a new input_item_t as a copy of another.
*/
VLC_EXPORT
(
input_item_t
*
,
input_item_Copy
,
(
vlc_object_t
*
,
input_item_t
*
)
);
/******************
* Input stats
******************/
...
...
src/input/item.c
View file @
6f436e21
...
...
@@ -876,6 +876,31 @@ input_item_t *input_item_NewWithType( vlc_object_t *p_obj, const char *psz_uri,
return
p_input
;
}
input_item_t
*
input_item_Copy
(
vlc_object_t
*
p_obj
,
input_item_t
*
p_input
)
{
vlc_mutex_lock
(
&
p_input
->
lock
);
input_item_t
*
p_new_input
=
input_item_NewWithType
(
p_obj
,
p_input
->
psz_uri
,
p_input
->
psz_name
,
0
,
NULL
,
0
,
p_input
->
i_duration
,
p_input
->
i_type
);
if
(
p_new_input
)
{
for
(
int
i
=
0
;
i
<
p_input
->
i_options
;
i
++
)
{
input_item_AddOption
(
p_new_input
,
p_input
->
ppsz_options
[
i
],
p_input
->
optflagv
[
i
]
);
}
}
vlc_mutex_unlock
(
&
p_input
->
lock
);
return
p_new_input
;
}
struct
item_type_entry
{
const
char
psz_scheme
[
7
];
...
...
src/libvlccore.sym
View file @
6f436e21
...
...
@@ -189,6 +189,7 @@ input_DetachResource
input_GetItem
input_item_AddInfo
input_item_AddOption
input_item_Copy
input_item_CopyOptions
input_item_DelInfo
input_item_GetDuration
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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