Add IPAD control function into shairplay

来源:互联网 发布:芝加哥人均收入知乎 编辑:程序博客网 时间:2024/06/15 02:05
So you are here most probably direct by serch engineer like google(which is my prefer tools but is blocked in China :-(.) ,if you are not interest in shairplay control, just do what you should do. 
After several days studying and searching, I can pause/play IPAD through shairplay now. shairplay is a great work which can works as an airplay device to play songs comes from airtune/ipad/iphone, sadly, you  can only control music by apple products but on pc during playing. shairplay doesn't implement workable DACP even it has supply a interface. I extend the function of shiarplay by porting some code from internet. now some basic operations have been supported by shairplay, you can pause and play under shairplay console. anyway,the output of shairplay has also port to pulseaudio, it is in its very original stage,I did this work just want to make shairplay to cowork with mpd(both of them use alsa and will conflict with each other during operating ALSA, let pulseauido to mananger them is good idea for me), considering mix of music is not user want to expect  usually, shairplay will pause mpd before start play.


the whole project has been update to csdn and you  can search keywords shairplay control to download(resource name:shairplay-control).or direct click next link:

http://download.csdn.net/detail/shuaiff/8926195

please download and have a test. (please update it if you find some problems described in this introduction.)

some explanations  to the work:

During startup , shairplay will pass the received 'dacp_id' and 'active_remote_header'  to application by calling registered function raop_rtp->callbacks.audio_remote_control_id(if exists),  these information are necessary to connect airplay control port,one for service inquiry and another for identification. before calling this function, the added function dacp_client_init(dacp_id, active_remote_header) will get controlport supply by iphone using these information firstly. once the communication has been setup, the subsequent control can be response by iphone just simple write dacp commands to that port with correct identification(remote_head).

some bugs not fixed into the package:

  in client_callback, parameter to avahi_service_browser_new should be changed from AVAHI_PROTO_INET to AVAHI_PROTO_UNSPEC, or it will always failed in ipv6-only system.

for more information,please refer:http://www.sugrsugr.com/index.php/airplay-prev-next/

0 0
原创粉丝点击