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
0f42f294
Commit
0f42f294
authored
Aug 20, 2007
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
control/media_list.c: Set the VLCNode tag when an item is added as a subitem.
parent
41234e88
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletion
+23
-1
src/control/media_list.c
src/control/media_list.c
+23
-1
No files found.
src/control/media_list.c
View file @
0f42f294
...
@@ -108,10 +108,32 @@ media_descriptor_subitem_added( const libvlc_event_t * p_event, void * user_data
...
@@ -108,10 +108,32 @@ media_descriptor_subitem_added( const libvlc_event_t * p_event, void * user_data
{
{
libvlc_media_list_t
*
p_mlist
=
user_data
;
libvlc_media_list_t
*
p_mlist
=
user_data
;
libvlc_media_descriptor_t
*
p_new_md
;
libvlc_media_descriptor_t
*
p_new_md
;
libvlc_media_descriptor_t
*
p_parent_md
=
p_event
->
p_obj
;
int
count
;
char
*
psz_parent_tag
=
NULL
;
char
*
psz_parent_name
,
*
psz_tag
;
p_new_md
=
p_event
->
u
.
media_descriptor_subitem_added
.
new_child
;
p_new_md
=
p_event
->
u
.
media_descriptor_subitem_added
.
new_child
;
/* For now, just add the new item to this media list */
/* Here we need something way clever */
/* We just set the */
count
=
libvlc_media_descriptor_tags_count_for_key
(
p_parent_md
,
"VLCNode"
,
NULL
);
psz_parent_name
=
libvlc_media_descriptor_get_meta
(
p_parent_md
,
libvlc_meta_Title
,
NULL
);
if
(
count
>
0
)
{
psz_parent_tag
=
libvlc_media_descriptor_tag_at_index_for_key
(
p_parent_md
,
0
,
"VLCNode"
,
NULL
);
asprintf
(
&
psz_tag
,
"%s/%s"
,
psz_parent_tag
,
psz_parent_name
);
free
(
psz_parent_tag
);
free
(
psz_parent_name
);
}
else
psz_tag
=
psz_parent_name
;
libvlc_media_descriptor_add_tag
(
p_new_md
,
"VLCNode"
,
psz_tag
,
NULL
);
libvlc_media_list_add_media_descriptor
(
p_mlist
,
p_new_md
,
NULL
);
libvlc_media_list_add_media_descriptor
(
p_mlist
,
p_new_md
,
NULL
);
}
}
...
...
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