Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
1cfe42c9
Commit
1cfe42c9
authored
Dec 20, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vlc_sd_GetNames: use probe
parent
15d640b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
11 deletions
+40
-11
src/playlist/services_discovery.c
src/playlist/services_discovery.c
+40
-11
No files found.
src/playlist/services_discovery.c
View file @
1cfe42c9
...
...
@@ -29,9 +29,49 @@
#include "vlc_playlist.h"
#include "vlc_events.h"
#include <vlc_services_discovery.h>
#include <vlc_probe.h>
#include "playlist_internal.h"
#include "../libvlc.h"
#undef vlc_sd_GetNames
typedef
struct
{
char
*
name
;
char
*
longname
;
}
vlc_sd_probe_t
;
/**
* Gets the list of available services discovery plugins.
*/
char
**
vlc_sd_GetNames
(
vlc_object_t
*
obj
,
char
***
pppsz_longnames
)
{
size_t
count
;
vlc_sd_probe_t
*
tab
=
vlc_probe
(
obj
,
"services probe"
,
&
count
);
if
(
count
==
0
)
{
free
(
tab
);
return
NULL
;
}
char
**
names
=
malloc
(
sizeof
(
char
*
)
*
(
count
+
1
));
char
**
longnames
=
malloc
(
sizeof
(
char
*
)
*
(
count
+
1
));
if
(
unlikely
(
names
==
NULL
||
longnames
==
NULL
))
abort
();
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
names
[
i
]
=
tab
[
i
].
name
;
longnames
[
i
]
=
tab
[
i
].
longname
;
}
free
(
tab
);
names
[
count
]
=
longnames
[
count
]
=
NULL
;
*
pppsz_longnames
=
longnames
;
return
names
;
}
struct
vlc_sd_internal_t
{
/* the playlist items for category and onelevel */
...
...
@@ -50,17 +90,6 @@ static void services_discovery_Destructor ( vlc_object_t *p_obj );
* That's how the playlist get's Service Discovery information
*/
#undef vlc_sd_GetNames
/**
* Gets the list of available services discovery plugins.
*/
char
**
vlc_sd_GetNames
(
vlc_object_t
*
obj
,
char
***
pppsz_longnames
)
{
return
module_GetModulesNamesForCapability
(
"services_discovery"
,
pppsz_longnames
);
}
/***********************************************************************
* Create
***********************************************************************/
...
...
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