一些基础知识:
airtunes--> airplay (called AirTunes when it was for audio only)
airplay: apple公司开发的一款wifi协议,用于apple旗下的idevice产品之间的audio video信息的传递。AirPlay sender devices include computers running iTunes, and iOS devices such as iPhones, iPods, and iPads running iOS 4.2 or greater。当用户的设备(Mac, PC, iPod touch, iPhone, iPad)与支持AirPlay技术的音箱在同一无线局域网(WIFI)内的时候,用户在Mac或PC上打开iTunes 10或更高版本后,就会在iTunes音量条旁边(iTunes 10在窗口的右下角)看到一个AirPlay按钮。点击该AirPlay按钮,然后选择需要同步到的设备,就可以选择将音乐或视频无线同步到设备进行播放。而iPod touch, iPhone和iPad用户则可以在相应的“音乐”,“视频”以及支持AirPlay功能的第三方软件界面找到AirPlay按钮,操作同Mac和PC。
AirPlay receiver devices include AirPort Express (which includes an analog and optical SPDIF audio output connector), Apple TV, and third party speakers. With the open source implementations of the AirPlay protocol any computer can now be turned into an AirPlay receiver.[
As of iOS 4.3, third-party apps may send compatible audio and video streams over AirPlay
============================
shairport: (Reverse engineering AirTunes and AirPlay)
苹果的airplay协议为了防止其他未经苹果允许的设备的接入,分别在airplay协议的发送端和接收端设置了public key和private key。public keys用来在itunes中对输出的数据流进行加密,priviate key用来在airport express或者apple TV等设备中对输入的数据(音频)流进行解密。
2004年, The RSA public key stored in iTunes was extracted by Jon Lech Johansen, enabling third-party software to stream music to an Airport Express.
2011年,The RSA private key stored in the AirPort Express was extracted by James Laird, enabling simulation of an Airport Express。Laird released ShairPort as an example of an audio-only software receiver implementation of AirPlay
This program emulates an AirPort Express for the purpose of streaming music from iTunes and compatible iPods and iPhones. It implements a server for the Apple RAOP protocol. ShairPort does not support AirPlay v2 (video and photo streaming).