我正在尝试实现AVRCP协议的一些功能。这里是文档:
http://git.kernel.org/cgit/bluetooth/bluez.git/tree/doc/media-api.txt
我不明白的是如何检索播放器的对象路径:
Object path [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/playerX
我不确定它是从某些DBus方法返回还是我必须使用蓝牙地址和本地设备手动构建它。
答案 0 :(得分:1)
我不确定它是从某些DBus方法返回还是我必须返回 使用蓝牙地址和本地设备手动构建它。
前者。您(我假设的应用程序)不需要构建此对象路径,路径将通过某些DBus方法返回。
这里的对象意思是:
对象路径[变量前缀] / {hci0,hci1,...} / dev_XX_XX_XX_XX_XX_XX / playerX
[variable prefix] was null basically.
{hci0,hci1,...} was which of your Bluetooth chip, basically it should be hci0.
/dev_XX_XX_XX_XX_XX_XX remote device mac address.
/playerX which player of your target.
您不需要过多关注对象路径的材料,它实际上只是一个字符串(根据特定格式由堆栈组合)
您可以参考:
属性
boolean Connected [readonly] object Player [readonly, optional] Addressed Player object path.