gpt4 book ai didi

java - 依附AVTransport : UPnP specification violation

转载 作者:太空宇宙 更新时间:2023-11-04 13:29:38 24 4
gpt4 key购买 nike

所以实际上我正在尝试将 MP3 文件发送到我的电视。但由于电视只是给你一个内部服务器错误,我创建了一个 MediaRenderer,就像在 Cling 示例中一样。通过监视它,我收到了一条奇怪的错误消息。但首先是我的代码:

    ActionCallback setAVTransportURIAction = new SetAVTransportURI(service,uri,metadata) {
@Override
public void failure(ActionInvocation invocation, UpnpResponse operation, String defaultMsg) {
System.out.println(defaultMsg);
}
};

uri 是本地 http 服务器的字符串:http://127.0.0.1/file.mp3我使用 DIDL 解析器创建的元数据

DIDLContent didl = new DIDLContent();       
ProtocolInfo info = new ProtocolInfo("http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=01500000000000000000000000000000");
MusicTrack track =new MusicTrack("0","0",title,creator,album, artist, new Res(info, size, uri));
didl.addItem(track);
DIDLParser parser = new DIDLParser();
String metadata="";
try {
metadata = parser.generate(didl);
} catch (Exception e) {
e.printStackTrace();
}

就像手册中的示例一样,我通过 upnpservice 发送它:

upnpService.getControlPoint().execute(setAVTransportURIAction);

我知道电视没有获取文件,因为我路由到本地主机。但是我用于调试的“假”MediaRenderer 吐出了以下消息:

[cling-10        ] WARNING - 18:31:08,478 - A10ServiceDescriptorBinderImpl#generateActionArgument: UPnP specification violation: Not producing <retval> element to be compatible with WMP12: (ActionArgument, OUT) Actions http://127.0.0.1/file.mp3
[cling-35 ] INFO - 18:31:09,447 - DA10DeviceDescriptorBinderImpl#hydrateDevice: Invalid X_DLNADOC value, ignoring value: SST-1.0
[cling-10 ] INFO - 18:31:11,701 - DA10DeviceDescriptorBinderImpl#hydrateDevice: Invalid X_DLNADOC value, ignoring value: SST-1.0
[cling-35 ] INFO - 18:31:11,702 - DA10DeviceDescriptorBinderImpl#hydrateDevice: Invalid X_DLNADOC value, ignoring value: SST-1.0

假的 MediaRenderer 客户端不在 Cling 的支持示例中,我没有进行太多更改

出了什么问题?

最佳答案

看看实际的实现,我可以看到:

if (actionArgument.isReturnValue()) {
// TODO: UPNP VIOLATION: WMP12 will discard RenderingControl service if it contains <retval> tags
log.warning("UPnP specification violation: Not producing <retval> element to be compatible with WMP12: " + actionArgument);
// appendNewElement(descriptor, actionArgumentElement, ELEMENT.retval);
}

操作参数似乎不是“返回值”。我遇到了同样的问题,所以当我进一步弄清楚这意味着什么时......将在此答案中发布更多内容!

关于java - 依附AVTransport : UPnP specification violation,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32315929/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com