AIRPLAY FUNCTION
#1
I have a project to do a receiver app for airplay using c language. unfortunately, the function of airplay here in kodi is written in c++ and i am not good enough to understand c++. Is there a complete guide/documentation on how kodi implemented the airplay function?

Right now I have written a simple code to let avahi broadcast the _airplay._tcp service which i read from the log of kodi and by editing the sample code in client-publish-service.c of avahi examples, but my phone doens't detect it yet. I know i'm missing a lot here can someone please explain.

Thanks for your time!
Reply
#2
I used this https://nto.github.io/AirPlay.html
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#3
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">

<service-group>
<name replace-wildcards="yes">service on %h</name>

<service>
<type>_airplay._tcp</type>
<port>36667</port>
<txt-record>model=Xbmc,1</txt-record>
<txt-record>deviceid=C4:46:19:70:43:84</txt-record>
<txt-record>srcvers=101.28</txt-record>
<txt-record>features=0x20F7</txt-record>
</service>

<service>
<type>_raop._tcp</type>
<port>36666</port>
<txt-record>txtvers=1</txt-record>
<txt-record>cn=0,1,</txt-record>
<txt-record>ch=2</txt-record>
<txt-record>ek=1</txt-record>
<txt-record>et=0,1</txt-record>
<txt-record>sv=false</txt-record>
<txt-record>tp=UPD</txt-record>
<txt-record>sm=false</txt-record>
<txt-record>ss=16</txt-record>
<txt-record>sr=44100</txt-record>
<txt-record>pw=false</txt-record>
<txt-record>vn=3</txt-record>
<txt-record>da=true</txt-record>
<txt-record>md=0,1,2</txt-record>
<txt-record>am=Kodi,1</txt-record>
<txt-record>vs=130.14</txt-record>
</service>
</service-group>

I have already made a file that includes the text above and i am able to detect it using the avahi-browser -alr command but my phone is still not able to detect it. I believe that there is also a need for http commands but i dont know how to implement it in c language though(I can learn through tutorials I will find).Im hoping to get some ideas on how does kodi get the data or maybe how does the phone able to detect the kodi when airplay is on.

thank you for your response!
Reply
#4
This is over your head. Start with something easier. My 2 cents.
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#5
I know it is not easy but can you give some guides where to start first? Right now I want to publish a server and let my phone able to detect it and after doing that I will research on how this http requests are processed. Hoping for your help! Thanks Memphiz!
Reply
#6
not enough time for such a side project - sorry.
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#7
@janlei0524, can I suggest that you give a Google Cast (Chromecast) project a go instead of AirPlay? See:

http://forum.kodi.tv/showthread.php?tid=282074

http://pypi.python.org/pypi/PyChromecast

http://github.com/balloob/pychromecast

That is something that no one have done before in C or C++ so more people might be interested to help.
Reply
#8
@RockerC Right now my focus is on airplay function and still got no help but im trying to learn on my own. Hope you understand. Thanks! Big Grin
Reply

Logout Mark Read Team Forum Stats Members Help
AIRPLAY FUNCTION1