gpt4 book ai didi

Android cling-android Upnp SetAVTransportURI 发送 Upnp Response = 500 xbox 上的内部服务器错误

转载 作者:行者123 更新时间:2023-11-29 00:08:46 27 4
gpt4 key购买 nike

我在使用 Upnp 将视频文件发送到带有 java/android 的 xbox 时遇到了问题。

我使用 cling api通过网络发现和连接 upnp 设备。发现操作运行良好,检测到 xbox。问题是当我尝试将视频链接发送到此设备时。

这里是 xbox 对 upnp 连接服务的响应:

<root xmlns="urn:schemas-upnp-org:device-1-0"
xmlns:df="http://schemas.microsoft.com/windows/2008/09/devicefoundation"
xmlns:microsoft="urn:schemas-microsoft-com:WMPDMR-1-0"
xmlns:pnpx="http://schemas.microsoft.com/windows/pnpx/2005/11">

<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<device>`
<deviceType>urn:schemas-upnp-org:device:MediaRenderer:1</deviceType>
<friendlyName>Xbox-SystemOS</friendlyName>
<modelName>Xbox One</modelName>
<modelDescription>Digital Media Renderer</modelDescription>
<manufacturer>Microsoft Corporation</manufacturer>
<manufacturerURL>http://www.microsoft.com</manufacturerURL>
<modelURL>http://xbox.com</modelURL>
<UDN>uuid:6e5e6c24-e450-4c6b-8987-89c6be33a1f7</UDN>
<df:X_containerId>{6E5E6C24-E450-4C6B-8987-89C6BE33A1F7}</df:X_containerId>
<dlna:X_DLNACAP xmlns:dlna="urn:schemas-dlna-org:device-1-0"/>
<dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMR-1.50</dlna:X_DLNADOC>
<pnpx:X_deviceCategory>MediaDevices</pnpx:X_deviceCategory>
<pnpx:X_hardwareId>VEN_0125&DEV_0002&REV_0001 VEN_0125&DEV_0002</pnpx:X_hardwareId>
<iconList>
<icon>
<mimetype>image/jpeg</mimetype>
<width>120</width>
<height>120</height>
<depth>24</depth>
<url>/upnphost/udhisapi.dll?content=uuid:cde23e6c-d763-427d-b96b-c71a8cc5a3a5</url>
</icon>
<icon>
<mimetype>image/jpeg</mimetype>
<width>48</width>
<height>48</height>
<depth>24</depth>
<url>/upnphost/udhisapi.dll?content=uuid:a89beb23-a099-4f65-8cd5-aad6e7210db0</url>
</icon>
<icon>
<mimetype>image/png</mimetype>
<width>120</width>
<height>120</height>
<depth>24</depth>
<url>/upnphost/udhisapi.dll?content=uuid:d4eb98f9-e708-4faa-bcd4-591a9365d000</url>
</icon>
<icon>
<mimetype>image/png</mimetype>
<width>48</width>
<height>48</height>
<depth>24</depth>
<url>/upnphost/udhisapi.dll?content=uuid:ba12866a-d6c8-4a19-94e7-7a2ed8f305b3</url>
</icon>
</iconList>
<serviceList>
<service>
<serviceType>urn:schemas-upnp-org:service:RenderingControl:1</serviceType>
<serviceId>urn:upnp-org:serviceId:RenderingControl</serviceId>
<controlURL>/upnphost/udhisapi.dll?control=uuid:6e5e6c24-e450-4c6b-8987-89c6be33a1f7+urn:upnp-org:serviceId:RenderingControl</controlURL>
<eventSubURL>/upnphost/udhisapi.dll?event=uuid:6e5e6c24-e450-4c6b-8987-89c6be33a1f7+urn:upnp-org:serviceId:RenderingControl</eventSubURL>
<SCPDURL>/upnphost/udhisapi.dll?content=uuid:654eefc5-0e1b-4bfa-a72f-e02001be36e4</SCPDURL>
</service>
<service>
<serviceType>urn:schemas-upnp-org:service:AVTransport:1</serviceType>
<serviceId>urn:upnp-org:serviceId:AVTransport</serviceId>
<controlURL>/upnphost/udhisapi.dll?control=uuid:6e5e6c24-e450-4c6b-8987-89c6be33a1f7+urn:upnp-org:serviceId:AVTransport</controlURL>
<eventSubURL>/upnphost/udhisapi.dll?event=uuid:6e5e6c24-e450-4c6b-8987-89c6be33a1f7+urn:upnp-org:serviceId:AVTransport</eventSubURL>
<SCPDURL>/upnphost/udhisapi.dll?content=uuid:85466b84-2a4a-4514-b7a4-2bb7a4871da4</SCPDURL>
</service>
<service>
<serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType>
<serviceId>urn:upnp-org:serviceId:ConnectionManager</serviceId>
<controlURL>/upnphost/udhisapi.dll?control=uuid:6e5e6c24-e450-4c6b-8987-89c6be33a1f7+urn:upnp-org:serviceId:ConnectionManager</controlURL>
<eventSubURL>/upnphost/udhisapi.dll?event=uuid:6e5e6c24-e450-4c6b-8987-89c6be33a1f7+urn:upnp-org:serviceId:ConnectionManager</eventSubURL>
<SCPDURL>/upnphost/udhisapi.dll?content=uuid:1de93088-6694-4d7c-a4a5-771ae3008378</SCPDURL>
</service>
</serviceList>
</device>
</root>

api documentation 中所述,您必须首先向提供视频文件 URL 的设备发送 SetAVTransportURI 操作:

4.2. Controlling a renderer
Cling Support provides several action callbacks that simplify creating a control point for the AVTransport service. This is the client side of your player, the remote control.

This is how you set an URI for playback:

ActionCallback setAVTransportURIAction = new SetAVTransportURI(service, "http://www.duorimes.siquiere.fr/wa_files/Il_20camino.flv", "NO METADATA") {
@Override
public void failure(ActionInvocation invocation, UpnpResponse operation, String defaultMsg) {
// Something was wrong
}
};
This is how you actually start playback:

ActionCallback playAction = new Play(service) {
@Override
public void failure(ActionInvocation invocation, UpnpResponse operation, String defaultMsg) {
// Something was wrong
}
};

在我的例子中,第一个操作向我发送了一个 500 错误代码(内部服务器错误)

有人遇到过同样的问题吗?

预先感谢您的帮助。

最佳答案

对于 SetAVTransportURI,meta 必须以 DLNA 规范定义的 XML 编码。

SetAVTransportURI(service, "http://www.duorimes.siquiere.fr/wa_files/Il_20camino.flv", "NO METADATA") 中,"NO METADATA" 是非法的 XML 字符串。

尝试使用空字符串 "" 或生成您自己的元 XML 可能会有帮助。

关于Android cling-android Upnp SetAVTransportURI 发送 Upnp Response = 500 xbox 上的内部服务器错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31827342/

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