joerg-krause writes
I am using the WMP to stream to upmpdcli and using remote control to navigate through the playlist. While some of the commands ("Play", "Next") work, some commands ("Stop", "Prev") behave unexpected.
When emitting a "Stop" command using UPnP Spy or by using mpc stop on the command line the following happens: The current track is stopped by WMP, however playback of the next track in the queue is started.
Another issue is with the "Prev" command, as in never plays the previous track in the queue, but always restarts with the current track, no matter how often I issue the command.
This is the output of upmpdli with log level 4 for a "Stop":
libupnpp/device/device.cxx:293::UPNP_CONTROL_ACTION_REQUEST: GetProtocolInfo. Params: <?xml version="1.0"? >
<m:GetProtocolInfo xmlns:m="urn:schemas-upnp-org:service:ConnectionManager:1" ></m:GetProtocolInfo >
src/conman.cxx:97::UpMpdConMan::getProtocolInfo
libupnpp/device/device.cxx:293::UPNP_CONTROL_ACTION_REQUEST: SetAVTransportURI. Params: <?xml version="1.0"? >
<m:SetAVTransportURI xmlns:m="urn:schemas-upnp-org:service:AVTransport:1" >
<InstanceID xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="ui4" >0</InstanceID >
<CurrentURI xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="string" >http://192.168.1.129:10243/WMPNSSv4/470597434/0_ezA4MDRBQjQzLTJGMTEtNDdBMS1CODcyLTA2NjkyNDcyN0E0NH0uMC40.m4a</CurrentURI >
<CurrentURIMetaData xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="string" ><DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/"><item id="{0804AB43-2F11-47A1-B872-066924727A44}.0.4" restricted="0" parentID="4" microsoft:cpId="{3BAAB8E3-EF06-4790-9E3D-21978DDB5086}" microsoft:trackId="6" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/"><dc:title>Astronaut</dc:title><dc:creator>Anna Depenbusch</dc:creator><res size="9089654" duration="0:04:17.000" bitrate="33016" protocolInfo="http-get:*:audio/mp4:DLNA.ORG_PN=AAC_ISO_320;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=01500000000000000000000000000000" sampleFrequency="44100" bitsPerSample="16" nrAudioChannels="2" microsoft:codec="{00001610-0000-0010-8000-00AA00389B71}" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/">http://192.168.1.129:10243/WMPNSSv4/470597434/0_ezA4MDRBQjQzLTJGMTEtNDdBMS1CODcyLTA2NjkyNDcyN0E0NH0uMC40.m4a</res><res duration="0:04:17.000" bitrate="16000" protocolInfo="http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMABASE;DLNA.ORG_OP=10;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01500000000000000000000000000000" sampleFrequency="44100" nrAudioChannels="2" microsoft:codec="{00000161-0000-0010-8000-00AA00389B71}" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/">http://192.168.1.129:10243/WMPNSSv4/470597434/ezA4MDRBQjQzLTJGMTEtNDdBMS1CODcyLTA2NjkyNDcyN0E0NH0uMC40.wma?formatID=42</res><res duration="0:04:17.000" bitrate="8000" protocolInfo="http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMABASE;DLNA.ORG_OP=10;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01500000000000000000000000000000" sampleFrequency="44100" nrAudioChannels="2" microsoft:codec="{00000161-0000-0010-8000-00AA00389B71}" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/">http://192.168.1.129:10243/WMPNSSv4/470597434/ezA4MDRBQjQzLTJGMTEtNDdBMS1CODcyLTA2NjkyNDcyN0E0NH0uMC40.wma?formatID=54</res><res duration="0:04:17.000" bitrate="24000" protocolInfo="http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_OP=10;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01500000000000000000000000000000" sampleFrequency="44100" nrAudioChannels="2" microsoft:codec="{00000055-0000-0010-8000-00AA00389B71}" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/">http://192.168.1.129:10243/WMPNSSv4/470597434/ezA4MDRBQjQzLTJGMTEtNDdBMS1CODcyLTA2NjkyNDcyN0E0NH0uMC40.mp3?formatID=26</res><res duration="0:04:17.000" bitrate="6000" protocolInfo="http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMABASE;DLNA.ORG_OP=10;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01500000000000000000000000000000" sampleFrequency="44100" nrAudioChannels="1" microsoft:codec="{00000161-0000-0010-8000-00AA00389B71}" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/">http://192.168.1.129:10243/WMPNSSv4/470597434/ezA4MDRBQjQzLTJGMTEtNDdBMS1CODcyLTA2NjkyNDcyN0E0NH0uMC40.wma?formatID=50</res><res duration="0:04:17.000" bitrate="16000" protocolInfo="http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_OP=10;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01500000000000000000000000000000" sampleFrequency="44100" nrAudioChannels="1" microsoft:codec="{00000055-0000-0010-8000-00AA00389B71}" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/">http://192.168.1.129:10243/WMPNSSv4/470597434/ezA4MDRBQjQzLTJGMTEtNDdBMS1CODcyLTA2NjkyNDcyN0E0NH0uMC40.mp3?formatID=24</res><upnp:class>object.item.audioItem.musicTrack</upnp:class><upnp:genre>National Folk</upnp:genre><upnp:artist role="AlbumArtist">Anna Depenbusch</upnp:artist><upnp:artist role="Performer">Anna Depenbusch</upnp:artist><upnp:author role="Composer">Anna Depenbusch</upnp:author><upnp:album>Die Mathematik der Anna Depenbusch</upnp:album><upnp:originalTrackNumber>4</upnp:originalTrackNumber><dc:date>2011-01-02</dc:date><upnp:actor>Anna Depenbusch</upnp:actor><upnp:albumArtURI dlna:profileID="JPEG_SM" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/">http://192.168.1.129:10243/WMPNSSv4/470597434/0_ezA4MDRBQjQzLTJGMTEtNDdBMS1CODcyLTA2NjkyNDcyN0E0NH0uMC40.jpg?albumArt=true</upnp:albumArtURI><upnp:albumArtURI dlna:profileID="JPEG_TN" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/">http://192.168.1.129:10243/WMPNSSv4/470597434/ezA4MDRBQjQzLTJGMTEtNDdBMS1CODcyLTA2NjkyNDcyN0E0NH0uMC40.jpg?albumArt=true,formatID=13</upnp:albumArtURI><desc id="artist" nameSpace="urn:schemas-microsoft-com:WMPNSS-1-0/" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/"><microsoft:artistAlbumArtist>Anna Depenbusch</microsoft:artistAlbumArtist></desc><desc id="artist" nameSpace="urn:schemas-microsoft-com:WMPNSS-1-0/" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/"><microsoft:artistPerformer>Anna Depenbusch</microsoft:artistPerformer></desc><desc id="author" nameSpace="urn:schemas-microsoft-com:WMPNSS-1-0/" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/"><microsoft:authorComposer>Anna Depenbusch</microsoft:authorComposer></desc><desc id="Year" nameSpace="urn:schemas-microsoft-com:WMPNSS-1-0/" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/"><microsoft:year>2011</microsoft:year></desc><desc id="UserRating" nameSpace="urn:schemas-microsoft-com:WMPNSS-1-0/" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/"><microsoft:userEffectiveRatingInStars>3</microsoft:userEffectiveRatingInStars></desc><desc id="UserRating" nameSpace="urn:schemas-microsoft-com:WMPNSS-1-0/" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/"><microsoft:userEffectiveRating>50</microsoft:userEffectiveRating></desc><desc id="folderPath" nameSpace="urn:schemas-microsoft-com:WMPNSS-1-0/" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/"><microsoft:folderPath>Music\iTunes\iTunes Media\Music\Anna Depenbusch\Die Mathematik der Anna Depenbusch</microsoft:folderPath></desc></item></DIDL-Lite></CurrentURIMetaData >
</m:SetAVTransportURI >
src/avtransport.cxx:325::Set(next)AVTransportURI: next 0 uri http://192.168.1.129:10243/WMPNSSv4/470597434/0_ezA4MDRBQjQzLTJGMTEtNDdBMS1CODcyLTA2NjkyNDcyN0E0NH0uMC40.m4a metadata[<DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/" ><item id="{0804AB43-2F11-47A1-B872-066924727A44}.0.4" restricted="0" parentID="4" microsoft:cpId="{3BAAB8E3-EF06-4790-9E3D-21978DDB5086}" microsoft:trackId="6" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/" ><dc:title >Astronaut</dc:title ><dc:creator >Anna Depenbusch</dc:creator ><res size="9089654" duration="0:04:17.000" bitrate="33016" protocolInfo="http-get:*:audio/mp4:DLNA.ORG_PN=AAC_ISO_320;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=01500000000000000000000000000000" sampleFrequency="44100" bitsPerSample="16" nrAudioChannels="2" microsoft:codec="{00001610-0000-0010-8000-00AA00389B71}" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/" >http://192.168.1.129:10243/WMPNSSv4/470597434/0_ezA4MDRBQjQzLTJGMTEtNDdBMS1CODcyLTA2NjkyNDcyN0E0NH0uMC40.m4a</res ><res duration="0:04:17.000" bitrate="16000" protocolInfo="http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMABASE;DLNA.ORG_OP=10;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01500000000000000000000000000000" sampleFrequency="44100" nrAudioChannels="2" microsoft:codec="{00000161-0000-0010-8000-00AA00389B71}" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/" >http://192.168.1.129:10243/WMPNSSv4/470597434/ezA4MDRBQjQzLTJGMTEtNDdBMS1CODcyLTA2NjkyNDcyN0E0NH0uMC40.wma?formatID=42</res ><res duration="0:04:17.000" bitrate="8000" protocolInfo="http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMABASE;DLNA.ORG_OP=10;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01500000000000000000000000000000" sampleFrequency="44100" nrAudioChannels="2" microsoft:codec="{00000161-0000-0010-8000-00AA00389B71}" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/" >http://192.168.1.129:10243/WMPNSSv4/470597434/ezA4MDRBQjQzLTJGMTEtNDdBMS1CODcyLTA2NjkyNDcyN0E0NH0uMC40.wma?formatID=54</res ><res duration="0:04:17.000" bitrate="24000" protocolInfo="http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_OP=10;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01500000000000000000000000000000" sampleFrequency="44100" nrAudioChannels="2" microsoft:codec="{00000055-0000-0010-8000-00AA00389B71}" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/" >http://192.168.1.129:10243/WMPNSSv4/470597434/ezA4MDRBQjQzLTJGMTEtNDdBMS1CODcyLTA2NjkyNDcyN0E0NH0uMC40.mp3?formatID=26</res ><res duration="0:04:17.000" bitrate="6000" protocolInfo="http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMABASE;DLNA.ORG_OP=10;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01500000000000000000000000000000" sampleFrequency="44100" nrAudioChannels="1" microsoft:codec="{00000161-0000-0010-8000-00AA00389B71}" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/" >http://192.168.1.129:10243/WMPNSSv4/470597434/ezA4MDRBQjQzLTJGMTEtNDdBMS1CODcyLTA2NjkyNDcyN0E0NH0uMC40.wma?formatID=50</res ><res duration="0:04:17.000" bitrate="16000" protocolInfo="http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_OP=10;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01500000000000000000000000000000" sampleFrequency="44100" nrAudioChannels="1" microsoft:codec="{00000055-0000-0010-8000-00AA00389B71}" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/" >http://192.168.1.129:10243/WMPNSSv4/470597434/ezA4MDRBQjQzLTJGMTEtNDdBMS1CODcyLTA2NjkyNDcyN0E0NH0uMC40.mp3?formatID=24</res ><upnp:class >object.item.audioItem.musicTrack</upnp:class ><upnp:genre >National Folk</upnp:genre ><upnp:artist role="AlbumArtist" >Anna Depenbusch</upnp:artist ><upnp:artist role="Performer" >Anna Depenbusch</upnp:artist ><upnp:author role="Composer" >Anna Depenbusch</upnp:author ><upnp:album >Die Mathematik der Anna Depenbusch</upnp:album ><upnp:originalTrackNumber >4</upnp:originalTrackNumber ><dc:date >2011-01-02</dc:date ><upnp:actor >Anna Depenbusch</upnp:actor ><upnp:albumArtURI dlna:profileID="JPEG_SM" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" >http://192.168.1.129:10243/WMPNSSv4/470597434/0_ezA4MDRBQjQzLTJGMTEtNDdBMS1CODcyLTA2NjkyNDcyN0E0NH0uMC40.jpg?albumArt=true</upnp:albumArtURI ><upnp:albumArtURI dlna:profileID="JPEG_TN" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" >http://192.168.1.129:10243/WMPNSSv4/470597434/ezA4MDRBQjQzLTJGMTEtNDdBMS1CODcyLTA2NjkyNDcyN0E0NH0uMC40.jpg?albumArt=true,formatID=13</upnp:albumArtURI ><desc id="artist" nameSpace="urn:schemas-microsoft-com:WMPNSS-1-0/" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/" ><microsoft:artistAlbumArtist >Anna Depenbusch</microsoft:artistAlbumArtist ></desc ><desc id="artist" nameSpace="urn:schemas-microsoft-com:WMPNSS-1-0/" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/" ><microsoft:artistPerformer >Anna Depenbusch</microsoft:artistPerformer ></desc ><desc id="author" nameSpace="urn:schemas-microsoft-com:WMPNSS-1-0/" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/" ><microsoft:authorComposer >Anna Depenbusch</microsoft:authorComposer ></desc ><desc id="Year" nameSpace="urn:schemas-microsoft-com:WMPNSS-1-0/" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/" ><microsoft:year >2011</microsoft:year ></desc ><desc id="UserRating" nameSpace="urn:schemas-microsoft-com:WMPNSS-1-0/" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/" ><microsoft:userEffectiveRatingInStars >3</microsoft:userEffectiveRatingInStars ></desc ><desc id="UserRating" nameSpace="urn:schemas-microsoft-com:WMPNSS-1-0/" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/" ><microsoft:userEffectiveRating >50</microsoft:userEffectiveRating ></desc ><desc id="folderPath" nameSpace="urn:schemas-microsoft-com:WMPNSS-1-0/" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/" ><microsoft:folderPath >Music\iTunes\iTunes Media\Music\Anna Depenbusch\Die Mathematik der Anna Depenbusch</microsoft:folderPath ></desc ></item ></DIDL-Lite >]
src/mpdcli.cxx:721::MPDCli::clearQueue
src/mpdcli.cxx:669::MPDCli::insert at :0 uri http://192.168.1.129:10243/WMPNSSv4/470597434/0_ezA4MDRBQjQzLTJGMTEtNDdBMS1CODcyLTA2NjkyNDcyN0E0NH0uMC40.m4a
src/mpdcli.cxx:560::MPDCli::stop
libupnpp/device/device.cxx:293::UPNP_CONTROL_ACTION_REQUEST: GetTransportInfo. Params: <?xml version="1.0"? >
<m:GetTransportInfo xmlns:m="urn:schemas-upnp-org:service:AVTransport:1" >
<InstanceID xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="ui4" >0</InstanceID >
</m:GetTransportInfo >
src/mpdcli.cxx:799::MPDCli::getQueueData
src/mpdcli.cxx:784::MPDCli::getQueueSongs: 1 songs
src/ohplaylist.cxx:145::OHPlaylist::translateIdArray: current ids: 8
src/ohplaylist.cxx:219::OHPlaylist::makeIdArray: using mpd data for 8 uri http://192.168.1.129:10243/WMPNSSv4/470597434/0_ezA4MDRBQjQzLTJGMTEtNDdBMS1CODcyLTA2NjkyNDcyN0E0NH0uMC40.m4a
src/ohplaylist.cxx:226::OHPlaylist::makeIdArray: dropping uri http://192.168.1.129:10243/WMPNSSv4/470597434/0_ezU1RENBMjEyLTQ0RkEtNEM0OC04NzdELUFEMTJEODM3QUY4QX0uMC40.m4a
src/ohplaylist.cxx:233::OHPlaylist::makeIdArray: saving metacache
src/ohmetacache.cxx:128::dmcacheSave: got save task: 1 entries to /var/cache/upmpdcli//metacache
libupnpp/device/device.cxx:293::UPNP_CONTROL_ACTION_REQUEST: GetCurrentTransportActions. Params: <?xml version="1.0"? >
<m:GetCurrentTransportActions xmlns:m="urn:schemas-upnp-org:service:AVTransport:1" >
<InstanceID xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="ui4" >0</InstanceID >
</m:GetCurrentTransportActions >
libupnpp/device/device.cxx:293::UPNP_CONTROL_ACTION_REQUEST: GetMediaInfo. Params: <?xml version="1.0"? >
<m:GetMediaInfo xmlns:m="urn:schemas-upnp-org:service:AVTransport:1" >
<InstanceID xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="ui4" >0</InstanceID >
</m:GetMediaInfo >
src/avtransport.cxx:512::UpMpdAVTransport::getMediaInfo. State: 1
libupnpp/device/device.cxx:293::UPNP_CONTROL_ACTION_REQUEST: Play. Params: <?xml version="1.0"? >
<m:Play xmlns:m="urn:schemas-upnp-org:service:AVTransport:1" >
<InstanceID xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="ui4" >0</InstanceID >
<Speed xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="string" >1</Speed >
</m:Play >
src/avtransport.cxx:560::UpMpdAVTransport::playcontrol State: 1 what 1
src/mpdcli.cxx:529::MPDCli::play(pos=-1)
libupnpp/device/device.cxx:293::UPNP_CONTROL_ACTION_REQUEST: GetTransportInfo. Params: <?xml version="1.0"? >
<m:GetTransportInfo xmlns:m="urn:schemas-upnp-org:service:AVTransport:1" >
<InstanceID xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="ui4" >0</InstanceID >
</m:GetTransportInfo >
libupnpp/device/device.cxx:293::UPNP_CONTROL_ACTION_REQUEST: GetPositionInfo. Params: <?xml version="1.0"? >
<m:GetPositionInfo xmlns:m="urn:schemas-upnp-org:service:AVTransport:1" >
<InstanceID xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="ui4" >0</InstanceID >
</m:GetPositionInfo >
libupnpp/device/device.cxx:293::UPNP_CONTROL_ACTION_REQUEST: GetPositionInfo. Params: <?xml version="1.0"? >
<m:GetPositionInfo xmlns:m="urn:schemas-upnp-org:service:AVTransport:1" >
<InstanceID xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="ui4" >0</InstanceID >
</m:GetPositionInfo >
Can you explain to me what happens inside of upmpdcli? Many thanks!
joerg-krause writes
I just remembered a similiar issue with the WMP a while ago: https://github.com/medoc92/upmpdcli/commit/713585e02a87189f0d59d8230d8bad2f54b42f0e
The issue is that upmpdcli gets the state from MPD before the queue is cleared and [begins with play command](https://github.com/medoc92/upmpdcli/blob/713585e02a87189f0d59d8230d8bad2f54b42f0e/src/avtransport.cxx#L399-L406) when receiving a SetNextAVTransportURI.
medoc92 writes
There is no stop shown at all in the log, maybe it was truncated a bit too early ?
WMP is using AVTransport commands, not OpenHome (unsurprisingly). This means that it is not expecting any other control point to use the renderer. What may happen or not when you issue commands with mpc or UPnP spy is undefined and irrelevant.
What I’d need is a log for a complete sequence, including the Stop command, purely from WMP.
joerg-krause writes
Sorry for late reply! I will investigate this issue later, when I have some spare time.
joerg-krause writes
Sorry, I did not had the time yet. And it is not that important to me. Therefore, i close for now.