Reputation: 3625
I can use the following to show an mp4 on a DLNA Server (I know the meta info is wrong but see below).
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<u:SetAVTransportURI xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">
<InstanceID>0</InstanceID>
<CurrentURI><![CDATA[http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4]]></CurrentURI>
<CurrentURIMetaData>
<DIDL-Lite xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/"
xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/">
<item id="sample" parentID="0" restricted="0">
<dc:title>Title of Image</dc:title>
<res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_FLAGS=01700000000000000000000000000000;DLNA.ORG_CI=0;DLNA.ORG_OP=01">
http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4
</res>
</item>
</DIDL-Lite>
</CurrentURIMetaData>
</u:SetAVTransportURI>
</s:Body>
</s:Envelope>
I then use a curl command for setting AvTransport and then Play and that will play the video on the DLNA Server. If I ONLY change the url to a jpeg image, this does not work. No errors are returned, the screen blips and the image is not displayed. I have verified the image URL works and can be displayed on the DLNA server using a Cling java app but I want to get away from using Cling as it is no longer maintained and I don't need a full DLNA implementation for my app.
Upvotes: 0
Views: 634
Reputation: 3625
I have solved the issue. The <CurrentURIMetaData>
tag has to replace <
with <
and >
with >
Upvotes: 0