mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
xbmc: update to xbmc-13-745067f
This commit is contained in:
parent
3db63ac4c6
commit
35b70e919a
@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="xbmc-theme-Confluence"
|
||||
PKG_VERSION="13-a1cab7a"
|
||||
PKG_VERSION="13-745067f"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
|
@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="xbmc"
|
||||
PKG_VERSION="13-a1cab7a"
|
||||
PKG_VERSION="13-745067f"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,100 +0,0 @@
|
||||
From ee4270426da6800d5ac21c50c1c7aaa94eec60c7 Mon Sep 17 00:00:00 2001
|
||||
From: Voyager1 <voyager@xbmc.org>
|
||||
Date: Fri, 28 Feb 2014 21:10:26 +0100
|
||||
Subject: [PATCH 1/2] [DVDInputStreamNavigator] allow fallback to root menu
|
||||
call if title menu call fails (like VLC)
|
||||
|
||||
---
|
||||
xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.cpp | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.cpp b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.cpp
|
||||
index de4f3d3..2b7de16 100644
|
||||
--- a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.cpp
|
||||
+++ b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.cpp
|
||||
@@ -187,8 +187,14 @@ bool CDVDInputStreamNavigator::Open(const char* strFile, const std::string& cont
|
||||
m_dll.dvdnav_get_next_cache_block(m_dvdnav,&buf_ptr,&event,&len);
|
||||
m_dll.dvdnav_sector_search(m_dvdnav, 0, SEEK_SET);
|
||||
|
||||
+ // first try title menu
|
||||
if(m_dll.dvdnav_menu_call(m_dvdnav, DVD_MENU_Title) != DVDNAV_STATUS_OK)
|
||||
+ {
|
||||
CLog::Log(LOGERROR,"Error on dvdnav_menu_call(Title): %s\n", m_dll.dvdnav_err_to_string(m_dvdnav));
|
||||
+ // next try root menu
|
||||
+ if(m_dll.dvdnav_menu_call(m_dvdnav, DVD_MENU_Root) != DVDNAV_STATUS_OK )
|
||||
+ CLog::Log(LOGERROR,"Error on dvdnav_menu_call(Root): %s\n", m_dll.dvdnav_err_to_string(m_dvdnav));
|
||||
+ }
|
||||
}
|
||||
|
||||
m_bEOF = false;
|
||||
--
|
||||
1.8.5.5
|
||||
|
||||
|
||||
From 65d19589e577df91bdf922081bb373dc7b517074 Mon Sep 17 00:00:00 2001
|
||||
From: Voyager1 <voyager@xbmc.org>
|
||||
Date: Fri, 28 Feb 2014 21:11:31 +0100
|
||||
Subject: [PATCH 2/2] [DVDInputStreamNavigator] allow to return from "endless"
|
||||
loop of NOPs
|
||||
|
||||
---
|
||||
.../dvdplayer/DVDInputStreams/DVDInputStreamNavigator.cpp | 12 ++++++++++++
|
||||
xbmc/cores/dvdplayer/DVDPlayer.cpp | 1 +
|
||||
xbmc/cores/omxplayer/OMXPlayer.cpp | 1 +
|
||||
3 files changed, 14 insertions(+)
|
||||
|
||||
diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.cpp b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.cpp
|
||||
index 2b7de16..015a2ae 100644
|
||||
--- a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.cpp
|
||||
+++ b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.cpp
|
||||
@@ -239,11 +239,23 @@ int CDVDInputStreamNavigator::Read(uint8_t* buf, int buf_size)
|
||||
|
||||
int iBytesRead;
|
||||
|
||||
+ int NOPcount = 0;
|
||||
while(true) {
|
||||
int navresult = ProcessBlock(buf, &iBytesRead);
|
||||
if (navresult == NAVRESULT_HOLD) return 0; // return 0 bytes read;
|
||||
else if (navresult == NAVRESULT_ERROR) return -1;
|
||||
else if (navresult == NAVRESULT_DATA) return iBytesRead;
|
||||
+ else if (navresult == NAVRESULT_NOP)
|
||||
+ {
|
||||
+ NOPcount++;
|
||||
+ if (NOPcount == 1000)
|
||||
+ {
|
||||
+ m_bEOF = true;
|
||||
+ CLog::Log(LOGERROR,"CDVDInputStreamNavigator: Stopping playback due to infinite loop, caused by badly authored DVD navigation structure. Try enabling 'Attempt to skip introduction before DVD menu'.");
|
||||
+ m_pDVDPlayer->OnDVDNavResult(NULL, DVDNAV_STOP);
|
||||
+ return -1; // fail and stop playback.
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
return iBytesRead;
|
||||
diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp
|
||||
index b056c8b..51dca5b 100644
|
||||
--- a/xbmc/cores/dvdplayer/DVDPlayer.cpp
|
||||
+++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp
|
||||
@@ -3560,6 +3560,7 @@ int CDVDPlayer::OnDVDNavResult(void* pData, int iMessage)
|
||||
{
|
||||
CLog::Log(LOGDEBUG, "DVDNAV_STOP");
|
||||
m_dvd.state = DVDSTATE_NORMAL;
|
||||
+ CGUIDialogKaiToast::QueueNotification(g_localizeStrings.Get(16026), g_localizeStrings.Get(16029));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
diff --git a/xbmc/cores/omxplayer/OMXPlayer.cpp b/xbmc/cores/omxplayer/OMXPlayer.cpp
|
||||
index a3d3928..9799a10 100644
|
||||
--- a/xbmc/cores/omxplayer/OMXPlayer.cpp
|
||||
+++ b/xbmc/cores/omxplayer/OMXPlayer.cpp
|
||||
@@ -3831,6 +3831,7 @@ int COMXPlayer::OnDVDNavResult(void* pData, int iMessage)
|
||||
{
|
||||
CLog::Log(LOGDEBUG, "DVDNAV_STOP");
|
||||
m_dvd.state = DVDSTATE_NORMAL;
|
||||
+ CGUIDialogKaiToast::QueueNotification(g_localizeStrings.Get(16026), g_localizeStrings.Get(16029));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
--
|
||||
1.8.5.5
|
||||
|
@ -1,393 +0,0 @@
|
||||
From 8d52b6d62e8872ecbc72064b36dad5e7a298f299 Mon Sep 17 00:00:00 2001
|
||||
From: Memphiz <memphis@machzwo.de>
|
||||
Date: Tue, 11 Mar 2014 20:30:19 +0100
|
||||
Subject: [PATCH 1/3] [airplay] - ensure to announce airtunes before airplay
|
||||
via zeroconf (makes it more likely that ios7 clients detect us correctly at
|
||||
the first shot)
|
||||
|
||||
---
|
||||
xbmc/network/NetworkServices.cpp | 17 ++++++++++-------
|
||||
1 file changed, 10 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/xbmc/network/NetworkServices.cpp b/xbmc/network/NetworkServices.cpp
|
||||
index f1b82d7..32ef819 100644
|
||||
--- a/xbmc/network/NetworkServices.cpp
|
||||
+++ b/xbmc/network/NetworkServices.cpp
|
||||
@@ -210,12 +210,7 @@ bool CNetworkServices::OnSettingChanging(const CSetting *setting)
|
||||
}
|
||||
#endif //HAS_ZEROCONF
|
||||
|
||||
- if (!StartAirPlayServer())
|
||||
- {
|
||||
- CGUIDialogOK::ShowAndGetInput(g_localizeStrings.Get(1273), "", g_localizeStrings.Get(33100), "");
|
||||
- return false;
|
||||
- }
|
||||
-
|
||||
+ // note - airtunesserver has to start before airplay server (ios7 client detection bug)
|
||||
#ifdef HAS_AIRTUNES
|
||||
if (!StartAirTunesServer())
|
||||
{
|
||||
@@ -223,6 +218,12 @@ bool CNetworkServices::OnSettingChanging(const CSetting *setting)
|
||||
return false;
|
||||
}
|
||||
#endif //HAS_AIRTUNES
|
||||
+
|
||||
+ if (!StartAirPlayServer())
|
||||
+ {
|
||||
+ CGUIDialogOK::ShowAndGetInput(g_localizeStrings.Get(1273), "", g_localizeStrings.Get(33100), "");
|
||||
+ return false;
|
||||
+ }
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -402,8 +403,10 @@ void CNetworkServices::Start()
|
||||
CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::Warning, g_localizeStrings.Get(33102), g_localizeStrings.Get(33100));
|
||||
if (CSettings::Get().GetBool("services.esenabled") && !StartJSONRPCServer())
|
||||
CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::Warning, g_localizeStrings.Get(33103), g_localizeStrings.Get(33100));
|
||||
- StartAirPlayServer();
|
||||
+
|
||||
+ // note - airtunesserver has to start before airplay server (ios7 client detection bug)
|
||||
StartAirTunesServer();
|
||||
+ StartAirPlayServer();
|
||||
StartRss();
|
||||
}
|
||||
|
||||
--
|
||||
1.8.5.5
|
||||
|
||||
|
||||
From 4de71aac2c41627f3466c191a0c8fa0c77b569ff Mon Sep 17 00:00:00 2001
|
||||
From: Memphiz <memphis@machzwo.de>
|
||||
Date: Tue, 11 Mar 2014 20:31:58 +0100
|
||||
Subject: [PATCH 2/3] [zeroconf] - add method to reannounce already published
|
||||
services
|
||||
|
||||
---
|
||||
xbmc/network/Zeroconf.cpp | 11 +++++++++++
|
||||
xbmc/network/Zeroconf.h | 15 ++++++++++++++-
|
||||
xbmc/network/linux/ZeroconfAvahi.cpp | 20 ++++++++++++++++++++
|
||||
xbmc/network/linux/ZeroconfAvahi.h | 1 +
|
||||
xbmc/network/mdns/ZeroconfMDNS.cpp | 36 +++++++++++++++++++++++++++++++-----
|
||||
xbmc/network/mdns/ZeroconfMDNS.h | 9 ++++++++-
|
||||
xbmc/network/osx/ZeroconfOSX.cpp | 26 ++++++++++++++++++++++++++
|
||||
xbmc/network/osx/ZeroconfOSX.h | 2 ++
|
||||
8 files changed, 113 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/xbmc/network/Zeroconf.cpp b/xbmc/network/Zeroconf.cpp
|
||||
index ac13ac4..1569ec4 100644
|
||||
--- a/xbmc/network/Zeroconf.cpp
|
||||
+++ b/xbmc/network/Zeroconf.cpp
|
||||
@@ -45,6 +45,8 @@ class CZeroconfDummy : public CZeroconf
|
||||
{
|
||||
return false;
|
||||
}
|
||||
+
|
||||
+ virtual bool doForceReAnnounceService(const std::string&){return false;}
|
||||
virtual bool doRemoveService(const std::string& fcr_ident){return false;}
|
||||
virtual void doStop(){}
|
||||
};
|
||||
@@ -93,6 +95,15 @@ bool CZeroconf::RemoveService(const std::string& fcr_identifier)
|
||||
return true;
|
||||
}
|
||||
|
||||
+bool CZeroconf::ForceReAnnounceService(const std::string& fcr_identifier)
|
||||
+{
|
||||
+ if (HasService(fcr_identifier) && m_started)
|
||||
+ {
|
||||
+ return doForceReAnnounceService(fcr_identifier);
|
||||
+ }
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
bool CZeroconf::HasService(const std::string& fcr_identifier) const
|
||||
{
|
||||
return (m_service_map.find(fcr_identifier) != m_service_map.end());
|
||||
diff --git a/xbmc/network/Zeroconf.h b/xbmc/network/Zeroconf.h
|
||||
index 441c0c1..d87e34c 100644
|
||||
--- a/xbmc/network/Zeroconf.h
|
||||
+++ b/xbmc/network/Zeroconf.h
|
||||
@@ -40,7 +40,7 @@ class CZeroconf
|
||||
public:
|
||||
|
||||
//tries to publish this service via zeroconf
|
||||
- //fcr_identifier can be used to stop this service later
|
||||
+ //fcr_identifier can be used to stop or reannounce this service later
|
||||
//fcr_type is the zeroconf service type to publish (e.g. _http._tcp for webserver)
|
||||
//fcr_name is the name of the service to publish. The hostname is currently automatically appended
|
||||
// and used for name collisions. e.g. XBMC would get published as fcr_name@Martn or, after collision fcr_name@Martn-2
|
||||
@@ -51,6 +51,14 @@ class CZeroconf
|
||||
const std::string& fcr_name,
|
||||
unsigned int f_port,
|
||||
std::vector<std::pair<std::string, std::string> > txt /*= std::vector<std::pair<std::string, std::string> >()*/);
|
||||
+
|
||||
+ //tries to rebroadcast that service on the network without removing/readding
|
||||
+ //this can be achieved by changing a fake txt record. Implementations should
|
||||
+ //implement it by doing so.
|
||||
+ //
|
||||
+ //fcr_identifier - the identifier of the already published service which should be reannounced
|
||||
+ // returns true on successfull reannonuce - false if this service isn't published yet
|
||||
+ bool ForceReAnnounceService(const std::string& fcr_identifier);
|
||||
|
||||
///removes the specified service
|
||||
///returns false if fcr_identifier does not exist
|
||||
@@ -90,6 +98,11 @@ class CZeroconf
|
||||
const std::string& fcr_name,
|
||||
unsigned int f_port,
|
||||
const std::vector<std::pair<std::string, std::string> >& txt) = 0;
|
||||
+
|
||||
+ //methods to implement for concrete implementations
|
||||
+ //update this service
|
||||
+ virtual bool doForceReAnnounceService(const std::string& fcr_identifier) = 0;
|
||||
+
|
||||
//removes the service if published
|
||||
virtual bool doRemoveService(const std::string& fcr_ident) = 0;
|
||||
|
||||
diff --git a/xbmc/network/linux/ZeroconfAvahi.cpp b/xbmc/network/linux/ZeroconfAvahi.cpp
|
||||
index 355b7ce..78d5eae 100644
|
||||
--- a/xbmc/network/linux/ZeroconfAvahi.cpp
|
||||
+++ b/xbmc/network/linux/ZeroconfAvahi.cpp
|
||||
@@ -167,6 +167,26 @@ bool CZeroconfAvahi::doPublishService(const std::string& fcr_identifier,
|
||||
return true;
|
||||
}
|
||||
|
||||
+bool CZeroconfAvahi::doForceReAnnounceService(const std::string& fcr_identifier)
|
||||
+{
|
||||
+ bool ret = false;
|
||||
+ ScopedEventLoopBlock l_block(mp_poll);
|
||||
+ tServiceMap::iterator it = m_services.find(fcr_identifier);
|
||||
+ if (it != m_services.end() && it->second->mp_group)
|
||||
+ {
|
||||
+ // to force a reannounce on avahi its enough to reverse the txtrecord list
|
||||
+ it->second->mp_txt = avahi_string_list_reverse(it->second->mp_txt);
|
||||
+
|
||||
+ // this will trigger the reannouncement
|
||||
+ if ((avahi_entry_group_update_service_txt_strlst(it->second->mp_group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, AvahiPublishFlags(0),
|
||||
+ it->second->m_name.c_str(),
|
||||
+ it->second->m_type.c_str(), NULL, it->second->mp_txt)) >= 0)
|
||||
+ ret = true;
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
bool CZeroconfAvahi::doRemoveService(const std::string& fcr_ident)
|
||||
{
|
||||
CLog::Log(LOGDEBUG, "CZeroconfAvahi::doRemoveService named: %s", fcr_ident.c_str());
|
||||
diff --git a/xbmc/network/linux/ZeroconfAvahi.h b/xbmc/network/linux/ZeroconfAvahi.h
|
||||
index 281dc21..e0b46b5 100644
|
||||
--- a/xbmc/network/linux/ZeroconfAvahi.h
|
||||
+++ b/xbmc/network/linux/ZeroconfAvahi.h
|
||||
@@ -50,6 +50,7 @@ class CZeroconfAvahi : public CZeroconf
|
||||
unsigned int f_port,
|
||||
const std::vector<std::pair<std::string, std::string> >& txt);
|
||||
|
||||
+ virtual bool doForceReAnnounceService(const std::string& fcr_identifier);
|
||||
virtual bool doRemoveService(const std::string& fcr_ident);
|
||||
|
||||
virtual void doStop();
|
||||
diff --git a/xbmc/network/mdns/ZeroconfMDNS.cpp b/xbmc/network/mdns/ZeroconfMDNS.cpp
|
||||
index b81ea11..00d02c5 100644
|
||||
--- a/xbmc/network/mdns/ZeroconfMDNS.cpp
|
||||
+++ b/xbmc/network/mdns/ZeroconfMDNS.cpp
|
||||
@@ -144,21 +144,46 @@ bool CZeroconfMDNS::doPublishService(const std::string& fcr_identifier,
|
||||
else
|
||||
{
|
||||
CSingleLock lock(m_data_guard);
|
||||
- m_services.insert(make_pair(fcr_identifier, netService));
|
||||
+ struct tServiceRef newService;
|
||||
+ newService.serviceRef = netService;
|
||||
+ newService.txtRecordRef = txtRecord;
|
||||
+ newService.updateNumber = 0;
|
||||
+ m_services.insert(make_pair(fcr_identifier, newService));
|
||||
}
|
||||
|
||||
- TXTRecordDeallocate(&txtRecord);
|
||||
-
|
||||
return err == kDNSServiceErr_NoError;
|
||||
}
|
||||
|
||||
+bool CZeroconfMDNS::doForceReAnnounceService(const std::string& fcr_identifier)
|
||||
+{
|
||||
+ bool ret = false;
|
||||
+ CSingleLock lock(m_data_guard);
|
||||
+ tServiceMap::iterator it = m_services.find(fcr_identifier);
|
||||
+ if(it != m_services.end())
|
||||
+ {
|
||||
+ // for force announcing a service with mdns we need
|
||||
+ // to change a txt record - so we diddle between
|
||||
+ // even and odd dummy records here
|
||||
+ if ( (it->second.updateNumber % 2) == 0)
|
||||
+ TXTRecordSetValue(&it->second.txtRecordRef, "xbmcdummy", strlen("evendummy"), "evendummy");
|
||||
+ else
|
||||
+ TXTRecordSetValue(&it->second.txtRecordRef, "xbmcdummy", strlen("odddummy"), "odddummy");
|
||||
+ it->second.updateNumber++;
|
||||
+
|
||||
+ if (DNSServiceUpdateRecord(it->second.serviceRef, NULL, 0, TXTRecordGetLength(&it->second.txtRecordRef), TXTRecordGetBytesPtr(&it->second.txtRecordRef), 0) == kDNSServiceErr_NoError)
|
||||
+ ret = true;
|
||||
+ }
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
bool CZeroconfMDNS::doRemoveService(const std::string& fcr_ident)
|
||||
{
|
||||
CSingleLock lock(m_data_guard);
|
||||
tServiceMap::iterator it = m_services.find(fcr_ident);
|
||||
if(it != m_services.end())
|
||||
{
|
||||
- DNSServiceRefDeallocate(it->second);
|
||||
+ DNSServiceRefDeallocate(it->second.serviceRef);
|
||||
+ TXTRecordDeallocate(&it->second.txtRecordRef);
|
||||
m_services.erase(it);
|
||||
CLog::Log(LOGDEBUG, "ZeroconfMDNS: Removed service %s", fcr_ident.c_str());
|
||||
return true;
|
||||
@@ -174,7 +199,8 @@ void CZeroconfMDNS::doStop()
|
||||
CLog::Log(LOGDEBUG, "ZeroconfMDNS: Shutdown services");
|
||||
for(tServiceMap::iterator it = m_services.begin(); it != m_services.end(); ++it)
|
||||
{
|
||||
- DNSServiceRefDeallocate(it->second);
|
||||
+ DNSServiceRefDeallocate(it->second.serviceRef);
|
||||
+ TXTRecordDeallocate(&it->second.txtRecordRef);
|
||||
CLog::Log(LOGDEBUG, "ZeroconfMDNS: Removed service %s", it->first.c_str());
|
||||
}
|
||||
m_services.clear();
|
||||
diff --git a/xbmc/network/mdns/ZeroconfMDNS.h b/xbmc/network/mdns/ZeroconfMDNS.h
|
||||
index 075c22e..0156691 100644
|
||||
--- a/xbmc/network/mdns/ZeroconfMDNS.h
|
||||
+++ b/xbmc/network/mdns/ZeroconfMDNS.h
|
||||
@@ -44,6 +44,7 @@ class CZeroconfMDNS : public CZeroconf,public CThread
|
||||
unsigned int f_port,
|
||||
const std::vector<std::pair<std::string, std::string> >& txt);
|
||||
|
||||
+ bool doForceReAnnounceService(const std::string& fcr_identifier);
|
||||
bool doRemoveService(const std::string& fcr_ident);
|
||||
|
||||
virtual void doStop();
|
||||
@@ -65,7 +66,13 @@ class CZeroconfMDNS : public CZeroconf,public CThread
|
||||
|
||||
//lock + data (accessed from runloop(main thread) + the rest)
|
||||
CCriticalSection m_data_guard;
|
||||
- typedef std::map<std::string, DNSServiceRef> tServiceMap;
|
||||
+ struct tServiceRef
|
||||
+ {
|
||||
+ DNSServiceRef serviceRef;
|
||||
+ TXTRecordRef txtRecordRef;
|
||||
+ int updateNumber;
|
||||
+ };
|
||||
+ typedef std::map<std::string, struct tServiceRef> tServiceMap;
|
||||
tServiceMap m_services;
|
||||
DNSServiceRef m_service;
|
||||
};
|
||||
diff --git a/xbmc/network/osx/ZeroconfOSX.cpp b/xbmc/network/osx/ZeroconfOSX.cpp
|
||||
index 298dea4..24ad68c 100644
|
||||
--- a/xbmc/network/osx/ZeroconfOSX.cpp
|
||||
+++ b/xbmc/network/osx/ZeroconfOSX.cpp
|
||||
@@ -125,6 +125,32 @@ bool CZeroconfOSX::doPublishService(const std::string& fcr_identifier,
|
||||
return result;
|
||||
}
|
||||
|
||||
+bool CZeroconfOSX::doForceReAnnounceService(const std::string& fcr_identifier)
|
||||
+{
|
||||
+ bool ret = false;
|
||||
+ CSingleLock lock(m_data_guard);
|
||||
+ tServiceMap::iterator it = m_services.find(fcr_identifier);
|
||||
+ if(it != m_services.end())
|
||||
+ {
|
||||
+ CFNetServiceRef service = it->second;
|
||||
+
|
||||
+ CFDataRef txtData = CFNetServiceGetTXTData(service);
|
||||
+ // convert the txtdata back and forth is enough to trigger a reannounce later
|
||||
+ CFDictionaryRef txtDict = CFNetServiceCreateDictionaryWithTXTData(NULL, txtData);
|
||||
+ CFMutableDictionaryRef txtDictMutable =CFDictionaryCreateMutableCopy(NULL, 0, txtDict);
|
||||
+ txtData = CFNetServiceCreateTXTDataWithDictionary(NULL, txtDictMutable);
|
||||
+
|
||||
+ // this triggers the reannounce
|
||||
+ ret = CFNetServiceSetTXTData(service, txtData);
|
||||
+
|
||||
+ CFRelease(txtDictMutable);
|
||||
+ CFRelease(txtDict);
|
||||
+ CFRelease(txtData);
|
||||
+ }
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+
|
||||
bool CZeroconfOSX::doRemoveService(const std::string& fcr_ident)
|
||||
{
|
||||
CSingleLock lock(m_data_guard);
|
||||
diff --git a/xbmc/network/osx/ZeroconfOSX.h b/xbmc/network/osx/ZeroconfOSX.h
|
||||
index 368c2d4..8952a96 100644
|
||||
--- a/xbmc/network/osx/ZeroconfOSX.h
|
||||
+++ b/xbmc/network/osx/ZeroconfOSX.h
|
||||
@@ -45,6 +45,8 @@ class CZeroconfOSX : public CZeroconf
|
||||
unsigned int f_port,
|
||||
const std::vector<std::pair<std::string, std::string> >& txt);
|
||||
|
||||
+ bool doForceReAnnounceService(const std::string& fcr_identifier);
|
||||
+
|
||||
bool doRemoveService(const std::string& fcr_ident);
|
||||
|
||||
virtual void doStop();
|
||||
--
|
||||
1.8.5.5
|
||||
|
||||
|
||||
From 251bacc4b45eb57758f5c28381b0546f0270cd9a Mon Sep 17 00:00:00 2001
|
||||
From: Memphiz <memphis@machzwo.de>
|
||||
Date: Tue, 11 Mar 2014 20:32:22 +0100
|
||||
Subject: [PATCH 3/3] [airplay] - reannounce airplay service every 10 secs
|
||||
(fixes ios7 clients not detecting us when their wlan was asleep or they saw
|
||||
the airplay announcement before the airtunes annoncement)
|
||||
|
||||
---
|
||||
xbmc/network/AirPlayServer.cpp | 21 +++++++++++++++++++++
|
||||
1 file changed, 21 insertions(+)
|
||||
|
||||
diff --git a/xbmc/network/AirPlayServer.cpp b/xbmc/network/AirPlayServer.cpp
|
||||
index 7db6754..4c93368 100644
|
||||
--- a/xbmc/network/AirPlayServer.cpp
|
||||
+++ b/xbmc/network/AirPlayServer.cpp
|
||||
@@ -43,6 +43,9 @@
|
||||
#include "URL.h"
|
||||
#include "cores/IPlayer.h"
|
||||
#include "interfaces/AnnouncementManager.h"
|
||||
+#ifdef HAS_ZEROCONF
|
||||
+#include "network/Zeroconf.h"
|
||||
+#endif // HAS_ZEROCONF
|
||||
|
||||
using namespace ANNOUNCEMENT;
|
||||
|
||||
@@ -277,6 +280,18 @@ void CAirPlayServer::AnnounceToClients(int state)
|
||||
CAnnouncementManager::RemoveAnnouncer(this);
|
||||
}
|
||||
|
||||
+void handleZeroconfAnnouncement()
|
||||
+{
|
||||
+#if defined(HAS_ZEROCONF)
|
||||
+ static XbmcThreads::EndTime timeout(10000);
|
||||
+ if(timeout.IsTimePast())
|
||||
+ {
|
||||
+ CZeroconf::GetInstance()->ForceReAnnounceService("servers.airplay");
|
||||
+ timeout.Set(10000);
|
||||
+ }
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
void CAirPlayServer::Process()
|
||||
{
|
||||
m_bStop = false;
|
||||
@@ -357,6 +372,12 @@ void CAirPlayServer::Process()
|
||||
}
|
||||
}
|
||||
}
|
||||
+
|
||||
+ // by reannouncing the zeroconf service
|
||||
+ // we fix issues where xbmc is detected
|
||||
+ // as audio-only target on devices with
|
||||
+ // ios7 and later
|
||||
+ handleZeroconfAnnouncement();
|
||||
}
|
||||
|
||||
Deinitialize();
|
||||
--
|
||||
1.8.5.5
|
||||
|
Loading…
x
Reference in New Issue
Block a user