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
ace8442c
Commit
ace8442c
authored
Dec 20, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
probe: helpers for services discovery
parent
1cfe42c9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
5 deletions
+38
-5
include/vlc_services_discovery.h
include/vlc_services_discovery.h
+20
-3
src/libvlccore.sym
src/libvlccore.sym
+1
-0
src/playlist/services_discovery.c
src/playlist/services_discovery.c
+17
-2
No files found.
include/vlc_services_discovery.h
View file @
ace8442c
...
...
@@ -24,6 +24,10 @@
#ifndef VLC_SERVICES_DISCOVERY_H_
#define VLC_SERVICES_DISCOVERY_H_
#include <vlc_input.h>
#include <vlc_events.h>
#include <vlc_probe.h>
/**
* \file
* This file functions and structures for service discovery in vlc
...
...
@@ -37,9 +41,6 @@ extern "C" {
* @{
*/
#include <vlc_input.h>
#include <vlc_events.h>
struct
services_discovery_t
{
VLC_COMMON_MEMBERS
...
...
@@ -88,6 +89,22 @@ VLC_EXPORT( vlc_event_manager_t *, services_discovery_EventManager, ( services_
VLC_EXPORT
(
void
,
services_discovery_AddItem
,
(
services_discovery_t
*
p_this
,
input_item_t
*
p_item
,
const
char
*
psz_category
)
);
VLC_EXPORT
(
void
,
services_discovery_RemoveItem
,
(
services_discovery_t
*
p_this
,
input_item_t
*
p_item
)
);
/* SD probing */
VLC_EXPORT
(
int
,
vlc_sd_probe_Add
,
(
vlc_probe_t
*
,
const
char
*
,
const
char
*
));
#define VLC_SD_PROBE_SUBMODULE \
add_submodule() \
set_capability( "services probe", 100 ) \
set_callbacks( vlc_sd_probe_Open, NULL )
#define VLC_SD_PROBE_HELPER(name, longname) \
static int vlc_sd_probe_Open (vlc_object_t *obj) \
{ \
return vlc_sd_probe_Add ((struct vlc_probe_t *)obj, name, longname); \
}
/** @} */
# ifdef __cplusplus
}
...
...
src/libvlccore.sym
View file @
ace8442c
...
...
@@ -537,6 +537,7 @@ vlc_rwlock_wrlock
vlc_savecancel
vlc_sd_Create
vlc_sd_GetNames
vlc_sd_probe_Add
vlc_sdp_Start
vlc_sd_Start
vlc_sd_Stop
...
...
src/playlist/services_discovery.c
View file @
ace8442c
...
...
@@ -33,14 +33,29 @@
#include "playlist_internal.h"
#include "../libvlc.h"
#undef vlc_sd_GetNames
typedef
struct
{
char
*
name
;
char
*
longname
;
}
vlc_sd_probe_t
;
int
vlc_sd_probe_Add
(
vlc_probe_t
*
probe
,
const
char
*
name
,
const
char
*
longname
)
{
vlc_sd_probe_t
names
=
{
strdup
(
name
),
strdup
(
longname
)
};
if
(
unlikely
(
names
.
name
==
NULL
||
names
.
longname
==
NULL
||
vlc_probe_add
(
probe
,
&
names
,
sizeof
(
names
))))
{
free
(
names
.
name
);
free
(
names
.
longname
);
return
VLC_ENOMEM
;
}
return
VLC_PROBE_CONTINUE
;
}
#undef vlc_sd_GetNames
/**
* Gets the list of available services discovery plugins.
*/
...
...
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