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
0e10f5fa
Commit
0e10f5fa
authored
Oct 10, 2007
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
services_discovery/hal.c: Get rid of the playlist code.
parent
d3b42e43
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
27 deletions
+2
-27
modules/services_discovery/hal.c
modules/services_discovery/hal.c
+2
-27
No files found.
modules/services_discovery/hal.c
View file @
0e10f5fa
...
...
@@ -244,44 +244,19 @@ static void AddDvd( services_discovery_t *p_sd, char *psz_device )
static
void
DelItem
(
services_discovery_t
*
p_sd
,
char
*
psz_udi
)
{
services_discovery_sys_t
*
p_sys
=
p_sd
->
p_sys
;
playlist_item_t
*
p_pl_item
;
playlist_t
*
p_playlist
=
pl_Yield
(
p_sd
);
if
(
!
p_playlist
)
{
msg_Err
(
p_sd
,
"playlist not found"
);
return
;
}
int
i
;
for
(
i
=
0
;
i
<
p_sys
->
i_devices_number
;
i
++
)
{
/* looks for a matching udi */
if
(
strcmp
(
psz_udi
,
p_sys
->
pp_devices
[
i
]
->
psz_udi
)
==
0
)
{
/* delete the corresponding item */
p_pl_item
=
playlist_ItemGetByInputId
(
p_playlist
,
p_sys
->
pp_devices
[
i
]
->
p_item
->
i_id
,
p_sd
->
p_cat
);
if
(
p_pl_item
)
{
while
(
p_pl_item
->
i_children
>
0
)
{
/* delete all childs */
playlist_DeleteFromInput
(
p_playlist
,
p_pl_item
->
pp_children
[
0
]
->
p_input
->
i_id
,
VLC_FALSE
);
}
/* HACK: if i_children == 0 the item won't be deleted
* That means that it _had_ children but they were deleted */
if
(
p_pl_item
->
i_children
==
0
)
p_pl_item
->
i_children
=
-
1
;
}
{
/* delete the corresponding item */
services_discovery_RemoveItem
(
p_sd
,
p_sys
->
pp_devices
[
i
]
->
p_item
);
if
(
p_sys
->
pp_devices
[
i
]
->
psz_udi
)
free
(
p_sys
->
pp_devices
[
i
]
->
psz_udi
);
TAB_REMOVE
(
p_sys
->
i_devices_number
,
p_sys
->
pp_devices
,
p_sys
->
pp_devices
[
i
]
);
}
}
pl_Release
(
p_playlist
);
}
#endif
...
...
@@ -299,7 +274,7 @@ static void AddCdda( services_discovery_t *p_sd, char *psz_device )
#endif
if
(
asprintf
(
&
psz_uri
,
"cdda://%s"
,
psz_blockdevice
)
==
-
1
)
return
;
/* Create the
playlist
item here */
/* Create the item here */
p_input
=
input_ItemNew
(
p_sd
,
psz_uri
,
"Audio CD"
);
free
(
psz_uri
);
if
(
!
p_input
)
...
...
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