aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMemphiz <memphis@machzwo.de>2015-10-15 09:06:17 +0200
committerMemphiz <memphis@machzwo.de>2015-10-15 09:06:17 +0200
commit16cf98ddf1450b3bd4710ef085133d4d0fc004dd (patch)
treea52afa334d54d17c5f110a671a9347a84f479918
parent57e98a0e3106d3792a5a3027d175b1e884d749a9 (diff)
parent0d3a17f20abd634f1c1cdf05fbc5a7958deb41f6 (diff)
Merge pull request #8180 from Memphiz/fix_shairport_ios9
[airplay] - restore ios 9 music streaming capability
-rw-r--r--addons/resource.language.en_gb/resources/strings.po4
-rw-r--r--project/BuildDependencies/scripts/0_package.list2
-rw-r--r--system/settings/settings.xml2
-rw-r--r--tools/depends/target/libshairplay/Makefile2
-rw-r--r--xbmc/network/AirPlayServer.cpp4
-rw-r--r--xbmc/network/NetworkServices.cpp36
-rw-r--r--xbmc/settings/Settings.cpp3
-rw-r--r--xbmc/settings/Settings.h2
8 files changed, 34 insertions, 21 deletions
diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po
index 489543164e..ad425b1e64 100644
--- a/addons/resource.language.en_gb/resources/strings.po
+++ b/addons/resource.language.en_gb/resources/strings.po
@@ -4088,7 +4088,7 @@ msgstr ""
#: system/settings/settings.xml
msgctxt "#1268"
-msgid "iOS 8 compatibility mode"
+msgid "Enable AirPlay Video and Picture support"
msgstr ""
msgctxt "#1269"
@@ -17689,7 +17689,7 @@ msgstr ""
#. Description of setting "Services -> AirPlay -> iOS 8 compatibility mode" with label #1268
#: system/settings/settings.xml
msgctxt "#36549"
-msgid "Use iOS8 compatible AirPlay support. If you have trouble with older iOS devices detecting this application as a valid target try switching this off. This option requires a restart to take effect!"
+msgid "Enables support for receving videos and pictures via AirPlay. This needs to be disabled when using iOS 9 or later clients to restore music streaming via AirPlay. Videos and Pictures are only supported for iOS clients using iOS 8.x and older."
msgstr ""
#. Name of a setting
diff --git a/project/BuildDependencies/scripts/0_package.list b/project/BuildDependencies/scripts/0_package.list
index c7d41dc812..b89826dab7 100644
--- a/project/BuildDependencies/scripts/0_package.list
+++ b/project/BuildDependencies/scripts/0_package.list
@@ -35,7 +35,7 @@ libpng-1.5.13-win32.7z
librtmp-20150114-git-a107ce-win32.7z
libsdl-1.2.10-win32.7z
libsdl_image-1.2.14-win32.7z
-libshairplay-068f138-win32.7z
+libshairplay-52fd9db-win32.7z
libssh-0.5.0-1-win32.zip
libvorbis-vc100-1.3.1-win32.7z
libxml2-2.7.8_1-win32.7z
diff --git a/system/settings/settings.xml b/system/settings/settings.xml
index bc81310b7e..1764d34ee5 100644
--- a/system/settings/settings.xml
+++ b/system/settings/settings.xml
@@ -2386,7 +2386,7 @@
<hidden>true</hidden>
</control>
</setting>
- <setting id="services.airplayios8compat" type="boolean" parent="services.airplay" label="1268" help="36549">
+ <setting id="services.airplayvideosupport" type="boolean" parent="services.airplay" label="1268" help="36549">
<level>3</level>
<default>true</default>
<dependencies>
diff --git a/tools/depends/target/libshairplay/Makefile b/tools/depends/target/libshairplay/Makefile
index 0b92aae32a..3a2e1acf62 100644
--- a/tools/depends/target/libshairplay/Makefile
+++ b/tools/depends/target/libshairplay/Makefile
@@ -3,7 +3,7 @@ DEPS= ../../Makefile.include
# lib name, version
LIBNAME=shairplay
-VERSION=0f41ade
+VERSION=498bc5b
SOURCE=$(LIBNAME)-$(VERSION)
ARCHIVE=$(SOURCE).tar.bz2
diff --git a/xbmc/network/AirPlayServer.cpp b/xbmc/network/AirPlayServer.cpp
index 0620b2931f..49705155f1 100644
--- a/xbmc/network/AirPlayServer.cpp
+++ b/xbmc/network/AirPlayServer.cpp
@@ -987,7 +987,7 @@ int CAirPlayServer::CTCPClient::ProcessRequest( std::string& responseHeader,
CApplicationMessenger::GetInstance().PostMsg(TMSG_MEDIA_PLAY, -1, -1, static_cast<void*>(l));
// allow starting the player paused in ios8 mode (needed by camera roll app)
- if (CSettings::GetInstance().GetBool(CSettings::SETTING_SERVICES_AIRPLAYIOS8COMPAT) && !startPlayback)
+ if (!startPlayback)
{
CApplicationMessenger::GetInstance().SendMsg(TMSG_MEDIA_PAUSE);
g_application.m_pPlayer->SeekPercentage(position * 100.0f);
@@ -1047,7 +1047,7 @@ int CAirPlayServer::CTCPClient::ProcessRequest( std::string& responseHeader,
}
else //if we are not playing and get the stop request - we just wanna stop picture streaming
{
- CApplicationMessenger::GetInstance().SendMsg(TMSG_GUI_ACTION, -1, -1, static_cast<void*>(new CAction(ACTION_PREVIOUS_MENU)));
+ CApplicationMessenger::GetInstance().SendMsg(TMSG_GUI_ACTION, WINDOW_SLIDESHOW, -1, static_cast<void*>(new CAction(ACTION_STOP)));
}
}
ClearPhotoAssetCache();
diff --git a/xbmc/network/NetworkServices.cpp b/xbmc/network/NetworkServices.cpp
index 9cb9845e0a..9c82b3d015 100644
--- a/xbmc/network/NetworkServices.cpp
+++ b/xbmc/network/NetworkServices.cpp
@@ -263,6 +263,22 @@ bool CNetworkServices::OnSettingChanging(const CSetting *setting)
return false;
}
}
+ else if (settingId == CSettings::SETTING_SERVICES_AIRPLAYVIDEOSUPPORT)
+ {
+ if (((CSettingBool*)setting)->GetValue())
+ {
+ if (!StartAirPlayServer())
+ {
+ CGUIDialogOK::ShowAndGetInput(CVariant{1273}, CVariant{33100});
+ return false;
+ }
+ }
+ else
+ {
+ if (!StopAirPlayServer(true))
+ return false;
+ }
+ }
else if (settingId == CSettings::SETTING_SERVICES_AIRPLAYPASSWORD ||
settingId == CSettings::SETTING_SERVICES_USEAIRPLAYPASSWORD)
{
@@ -554,6 +570,9 @@ bool CNetworkServices::StopWebserver()
bool CNetworkServices::StartAirPlayServer()
{
+ if (!CSettings::GetInstance().GetBool(CSettings::SETTING_SERVICES_AIRPLAYVIDEOSUPPORT))
+ return true;
+
#ifdef HAS_AIRPLAY
if (!g_application.getNetwork().IsAvailable() || !CSettings::GetInstance().GetBool(CSettings::SETTING_SERVICES_AIRPLAY))
return false;
@@ -575,18 +594,11 @@ bool CNetworkServices::StartAirPlayServer()
txt.push_back(std::make_pair("model", "Xbmc,1"));
txt.push_back(std::make_pair("srcvers", AIRPLAY_SERVER_VERSION_STR));
- if (CSettings::GetInstance().GetBool(CSettings::SETTING_SERVICES_AIRPLAYIOS8COMPAT))
- {
- // for ios8 clients we need to announce mirroring support
- // else we won't get video urls anymore.
- // We also announce photo caching support (as it seems faster and
- // we have implemented it anyways).
- txt.push_back(std::make_pair("features", "0x20F7"));
- }
- else
- {
- txt.push_back(std::make_pair("features", "0x77"));
- }
+ // for ios8 clients we need to announce mirroring support
+ // else we won't get video urls anymore.
+ // We also announce photo caching support (as it seems faster and
+ // we have implemented it anyways).
+ txt.push_back(std::make_pair("features", "0x20F7"));
CZeroconf::GetInstance()->PublishService("servers.airplay", "_airplay._tcp", CSysInfo::GetDeviceName(), g_advancedSettings.m_airPlayPort, txt);
#endif // HAS_ZEROCONF
diff --git a/xbmc/settings/Settings.cpp b/xbmc/settings/Settings.cpp
index 879c82d8b7..84049602ae 100644
--- a/xbmc/settings/Settings.cpp
+++ b/xbmc/settings/Settings.cpp
@@ -334,7 +334,7 @@ const std::string CSettings::SETTING_SERVICES_AIRPLAY = "services.airplay";
const std::string CSettings::SETTING_SERVICES_AIRPLAYVOLUMECONTROL = "services.airplayvolumecontrol";
const std::string CSettings::SETTING_SERVICES_USEAIRPLAYPASSWORD = "services.useairplaypassword";
const std::string CSettings::SETTING_SERVICES_AIRPLAYPASSWORD = "services.airplaypassword";
-const std::string CSettings::SETTING_SERVICES_AIRPLAYIOS8COMPAT = "services.airplayios8compat";
+const std::string CSettings::SETTING_SERVICES_AIRPLAYVIDEOSUPPORT = "services.airplayvideosupport";
const std::string CSettings::SETTING_SMB_WINSSERVER = "smb.winsserver";
const std::string CSettings::SETTING_SMB_WORKGROUP = "smb.workgroup";
const std::string CSettings::SETTING_VIDEOSCREEN_MONITOR = "videoscreen.monitor";
@@ -1137,6 +1137,7 @@ void CSettings::InitializeISettingCallbacks()
settingSet.insert(CSettings::SETTING_SERVICES_ZEROCONF);
settingSet.insert(CSettings::SETTING_SERVICES_AIRPLAY);
settingSet.insert(CSettings::SETTING_SERVICES_AIRPLAYVOLUMECONTROL);
+ settingSet.insert(CSettings::SETTING_SERVICES_AIRPLAYVIDEOSUPPORT);
settingSet.insert(CSettings::SETTING_SERVICES_USEAIRPLAYPASSWORD);
settingSet.insert(CSettings::SETTING_SERVICES_AIRPLAYPASSWORD);
settingSet.insert(CSettings::SETTING_SERVICES_UPNPSERVER);
diff --git a/xbmc/settings/Settings.h b/xbmc/settings/Settings.h
index c529a7cf01..c1f09e0eae 100644
--- a/xbmc/settings/Settings.h
+++ b/xbmc/settings/Settings.h
@@ -291,7 +291,7 @@ public:
static const std::string SETTING_SERVICES_AIRPLAYVOLUMECONTROL;
static const std::string SETTING_SERVICES_USEAIRPLAYPASSWORD;
static const std::string SETTING_SERVICES_AIRPLAYPASSWORD;
- static const std::string SETTING_SERVICES_AIRPLAYIOS8COMPAT;
+ static const std::string SETTING_SERVICES_AIRPLAYVIDEOSUPPORT;
static const std::string SETTING_SMB_WINSSERVER;
static const std::string SETTING_SMB_WORKGROUP;
static const std::string SETTING_VIDEOSCREEN_MONITOR;