Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
453
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
d041a6cd
Commit
d041a6cd
authored
5 years ago
by
Luca Barbato
Committed by
Felix Paul Kühne
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
upnp: implement getPreferedAdapter for macOS
Signed-off-by:
Felix Paul Kühne
<
felix@feepk.net
>
parent
271b64ab
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/services_discovery/Makefile.am
+3
-0
3 additions, 0 deletions
modules/services_discovery/Makefile.am
modules/services_discovery/upnp-wrapper.hpp
+28
-0
28 additions, 0 deletions
modules/services_discovery/upnp-wrapper.hpp
with
31 additions
and
0 deletions
modules/services_discovery/Makefile.am
+
3
−
0
View file @
d041a6cd
...
...
@@ -40,6 +40,9 @@ libupnp_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(sddir)'
libupnp_plugin_la_LIBADD
=
$(
UPNP_LIBS
)
EXTRA_LTLIBRARIES
+=
libupnp_plugin.la
sd_LTLIBRARIES
+=
$(
LTLIBupnp
)
if
HAVE_OSX
libupnp_plugin_la_LDFLAGS
+=
-Wl
,-framework,CoreFoundation,-framework,SystemConfiguration
endif
libpulselist_plugin_la_SOURCES
=
services_discovery/pulse.c
libpulselist_plugin_la_CFLAGS
=
$(
AM_CFLAGS
)
$(
PULSE_CFLAGS
)
...
...
This diff is collapsed.
Click to expand it.
modules/services_discovery/upnp-wrapper.hpp
+
28
−
0
View file @
d041a6cd
...
...
@@ -334,11 +334,39 @@ done:
#ifdef UPNP_ENABLE_IPV6
#ifdef __APPLE__
#include
<TargetConditionals.h>
#endif
#if defined(TARGET_OS_MAC) && TARGET_OS_MAC
#include
<SystemConfiguration/SystemConfiguration.h>
#include
"vlc_charset.h"
inline
char
*
getPreferedAdapter
()
{
SCDynamicStoreRef
session
=
SCDynamicStoreCreate
(
NULL
,
CFSTR
(
"session"
),
NULL
,
NULL
);
CFDictionaryRef
q
=
(
CFDictionaryRef
)
SCDynamicStoreCopyValue
(
session
,
CFSTR
(
"State:/Network/Global/IPv4"
));
char
*
returnValue
=
NULL
;
if
(
q
!=
NULL
)
{
const
void
*
val
;
if
(
CFDictionaryGetValueIfPresent
(
q
,
CFSTR
(
"PrimaryInterface"
),
&
val
))
{
returnValue
=
FromCFString
((
CFStringRef
)
val
,
kCFStringEncodingUTF8
);
}
}
CFRelease
(
q
);
CFRelease
(
session
);
return
returnValue
;
}
#else
inline
char
*
getIpv4ForMulticast
()
{
return
NULL
;
}
#endif
#else
inline
char
*
getIpv4ForMulticast
()
...
...
This diff is collapsed.
Click to expand it.
soloturn
@soloturn
mentioned in issue
#22326 (closed)
·
4 years ago
mentioned in issue
#22326 (closed)
mentioned in issue #22326
Toggle commit list
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment