joerg-krause writes
I have an issue with the Windows Media Player. The scenario is the following:
I’m clearing the current MPD playlist, adding an radio station URL and start playing all via libmdpclient. Afterwards I start playing to an mp3 audio file from a Windows Media Player to upmpdcli. The audio file starts to play with good audio output, stops after a short time, starts playing again, but this time only noise is produced.
What happens here is weird.
The Windows Media Player sends an SetAVTransportURI
with an URI pointing to an mp3 stream and a bunch of different URIs pointing to different audio format streams, like LPCM or WMA, in the CurrentURIMetaData
.
upmpdcli inserts the URI into the MPD queue and issues a play command correctly. MPD loads the mad decoder and starts playing the mp3 audio file, for at most one second before the Media Player issues a new SetAVTransportURI
with an URI from the CurrentURIMetaData
. This time the URI is a LPCM decoded stream. However, MPD still tries to decode the stream with mad which produces audio noise.
The audio garbage is perhaps an issue with MPD or a missing LPCM decoder. But there is at least an issue with upmpdcli handling the MPD state: https://github.com/medoc92/upmpdcli/blob/master/src/avtransport.cxx#L400.
Stopping MPD right after play make the Media Player not happy. I guess the player does not like the results of the GetPositionInfo
or GetTransportInfo
so it issues another SetAVTransportURI
.
I was able to make the Media Player happy be removing the code which restores the MPD state. I’ve read the comment about upmpd_do_restore_play_state_after_add
, but I’m not sure what would be a proper solution here.
Below you find the log from upmpdcli:
src/mpdcli.cxx:796::MPDCli::getQueueSongs: 1 songs
src/ohplaylist.cxx:146::OHPlaylist::translateIdArray: current ids: 19
src/ohplaylist.cxx:220::OHPlaylist::makeIdArray: using mpd data for 19 uri http://mp3channels.webradio.antenne.de:80/rockantenne
src/ohplaylist.cxx:227::OHPlaylist::makeIdArray: dropping uri http://192.168.1.119:10243/WMPNSSv4/251939366/0_ezkwMDVGODE2LUUxMzQtNEFENi05ODZGLUI4QUMxQUFCQjJFM30uMC40.mp3
src/ohplaylist.cxx:234::OHPlaylist::makeIdArray: saving metacache
src/ohmetacache.cxx:128::dmcacheSave: got save task: 1 entries to /var/cache/upmpdcli//metacache
src/mpdcli.cxx:811::MPDCli::getQueueData
src/mpdcli.cxx:796::MPDCli::getQueueSongs: 1 songs
src/ohplaylist.cxx:146::OHPlaylist::translateIdArray: current ids: 19
src/mpdcli.cxx:811::MPDCli::getQueueData
src/mpdcli.cxx:796::MPDCli::getQueueSongs: 1 songs
src/ohplaylist.cxx:146::OHPlaylist::translateIdArray: current ids: 19
libupnpp/device/device.cxx:350::UPNP_EVENT_SUBSCRIPTION_REQUEST: urn:upnp-org:serviceId:AVTransport
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: 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.100:10246/MDEServer/53E296A7-3F0B-4C6C-A2F8-0A4F7AA2FB62/1000.mp3</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/" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/"><item id="1000" restricted="1" parentID="0" microsoft:cpId="{EFB4DB67-C704-4A4E-9A85-95D9F0AD22AC}" microsoft:trackId="1"><dc:title>Wonderful Tonight</dc:title><dc:creator>Eric Clapton</dc:creator><res size="3610529" duration="0:03:45.360" bitrate="16000" protocolInfo="http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=01700000000000000000000000000000" sampleFrequency="48000" bitsPerSample="16" nrAudioChannels="2" microsoft:codec="{00000055-0000-0010-8000-00AA00389B71}">http://192.168.1.100:10246/MDEServer/53E296A7-3F0B-4C6C-A2F8-0A4F7AA2FB62/1000.mp3</res><res duration="0:03:45.360" bitrate="16000" protocolInfo="http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_OP=10;DLNA.ORG_FLAGS=01700000000000000000000000000000" sampleFrequency="48000" bitsPerSample="16" nrAudioChannels="2" microsoft:codec="{00000055-0000-0010-8000-00AA00389B71}">http://192.168.1.100:10246/MDEServer/53E296A7-3F0B-4C6C-A2F8-0A4F7AA2FB62/1000.mp3?formatID=00000008-A9AF-4584-84E2-55BFEF0A7D7E</res><res duration="0:03:45.360" bitrate="192000" protocolInfo="http-get:*:audio/L16;rate=48000;channels=2:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=10;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01700000000000000000000000000000" sampleFrequency="48000" bitsPerSample="16" nrAudioChannels="2" microsoft:codec="{00000001-0000-0010-8000-00AA00389B71}">http://192.168.1.100:10246/MDEServer/53E296A7-3F0B-4C6C-A2F8-0A4F7AA2FB62/1000.mp3?formatID=00000029-A9AF-4584-84E2-55BFEF0A7D7E</res><res duration="0:03:45.360" bitrate="176400" protocolInfo="http-get:*:audio/L16;rate=44100;channels=2:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=10;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01700000000000000000000000000000" sampleFrequency="44100" bitsPerSample="16" nrAudioChannels="2" microsoft:codec="{00000001-0000-0010-8000-00AA00389B71}">http://192.168.1.100:10246/MDEServer/53E296A7-3F0B-4C6C-A2F8-0A4F7AA2FB62/1000.mp3?formatID=00000027-A9AF-4584-84E2-55BFEF0A7D7E</res><res duration="0:03:45.360" bitrate="88200" protocolInfo="http-get:*:audio/L16;rate=44100;channels=1:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=10;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01700000000000000000000000000000" sampleFrequency="44100" bitsPerSample="16" nrAudioChannels="1" microsoft:codec="{00000001-0000-0010-8000-00AA00389B71}">http://192.168.1.100:10246/MDEServer/53E296A7-3F0B-4C6C-A2F8-0A4F7AA2FB62/1000.mp3?formatID=00000025-A9AF-4584-84E2-55BFEF0A7D7E</res><res duration="0:03:45.360" bitrate="24000" protocolInfo="http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMABASE;DLNA.ORG_OP=10;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01700000000000000000000000000000" sampleFrequency="48000" nrAudioChannels="2" microsoft:codec="{00000161-0000-0010-8000-00AA00389B71}">http://192.168.1.100:10246/MDEServer/53E296A7-3F0B-4C6C-A2F8-0A4F7AA2FB62/1000.wma?formatID=00000070-A9AF-4584-84E2-55BFEF0A7D7E</res><upnp:class>object.item.audioItem.musicTrack</upnp:class><upnp:genre>Rock</upnp:genre><dc:publisher>Polydor</dc:publisher><upnp:artist role="Performer">Eric Clapton</upnp:artist><upnp:author role="Composer">Eric Clapton</upnp:author><upnp:author role="Composer">Michael Kamen</upnp:author><upnp:album>Time Pieces: The Best of Eric Clapton</upnp:album><upnp:originalTrackNumber>4</upnp:originalTrackNumber><dc:date>1982-01-02</dc:date><upnp:actor role="Composer">Eric Clapton</upnp:actor><upnp:actor role="Composer">Michael Kamen</upnp:actor><upnp:albumArtURI>http://192.168.1.100:10246/MDEServer/53E296A7-3F0B-4C6C-A2F8-0A4F7AA2FB62/1000.jpg?albumArt=0</upnp:albumArtURI><upnp:albumArtURI dlna:profileID="JPEG_TN">http://192.168.1.100:10246/MDEServer/53E296A7-3F0B-4C6C-A2F8-0A4F7AA2FB62/1000.jpg?albumArt=0,formatID=00000020-A9AF-4584-84E2-55BFEF0A7D7E,width=158,height=160</upnp:albumArtURI><desc id="artist" nameSpace="urn:schemas-microsoft-com:WMPNSS-1-0/" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/"><microsoft:artistPerformer>Eric Clapton</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>Eric Clapton</microsoft:authorComposer></desc><desc id="author" nameSpace="urn:schemas-microsoft-com:WMPNSS-1-0/" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/"><microsoft:authorComposer>Michael Kamen</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>1982</microsoft:year></desc><desc id="fileInfo" nameSpace="urn:schemas-microsoft-com:WMPNSS-1-0/" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/"><microsoft:fileIdentifier>AMGa_id=R 4026;AMGp_id=P 64692;AMGt_id=T 1065031</microsoft:fileIdentifier></desc></item></DIDL-Lite></CurrentURIMetaData >
</m:SetAVTransportURI >
src/mpdcli.cxx:733::MPDCli::clearQueue
src/avtransport.cxx:344::SetAVTransportURI: curpos: -1 is_song 0 qlen 0
src/mpdcli.cxx:681::MPDCli::insert at :0 uri http://192.168.1.100:10246/MDEServer/53E296A7-3F0B-4C6C-A2F8-0A4F7AA2FB62/1000.mp3
src/mpdcli.cxx:537::MPDCli::play(pos=0)
src/avtransport.cxx:404::MPD Status: 1
src/mpdcli.cxx:572::MPDCli::stop
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 >
src/mpdcli.cxx:811::MPDCli::getQueueData
src/mpdcli.cxx:796::MPDCli::getQueueSongs: 1 songs
src/ohplaylist.cxx:146::OHPlaylist::translateIdArray: current ids: 20
src/ohplaylist.cxx:220::OHPlaylist::makeIdArray: using mpd data for 20 uri http://192.168.1.100:10246/MDEServer/53E296A7-3F0B-4C6C-A2F8-0A4F7AA2FB62/1000.mp3
src/ohplaylist.cxx:227::OHPlaylist::makeIdArray: dropping uri http://mp3channels.webradio.antenne.de:80/rockantenne
src/ohplaylist.cxx:234::OHPlaylist::makeIdArray: saving metacache
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/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: 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:569::UpMpdAVTransport::playcontrol State: 1 what 1
src/mpdcli.cxx:537::MPDCli::play(pos=-1)
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 >
libupnpp/device/device.cxx:350::UPNP_EVENT_SUBSCRIPTION_REQUEST: urn:upnp-org:serviceId:RenderingControl
src/conman.cxx:97::UpMpdConMan::getProtocolInfo
src/mpdcli.cxx:811::MPDCli::getQueueData
src/mpdcli.cxx:796::MPDCli::getQueueSongs: 1 songs
src/ohplaylist.cxx:146::OHPlaylist::translateIdArray: current ids: 20
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: 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: Stop. Params: <?xml version="1.0"? >
<m:Stop xmlns:m="urn:schemas-upnp-org:service:AVTransport:1" >
<InstanceID xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="ui4" >0</InstanceID >
</m:Stop >
src/avtransport.cxx:569::UpMpdAVTransport::playcontrol State: 2 what 0
src/mpdcli.cxx:572::MPDCli::stop
libupnpp/device/device.cxx:293::UPNP_CONTROL_ACTION_REQUEST: GetVolume. Params: <?xml version="1.0"? >
<m:GetVolume xmlns:m="urn:schemas-upnp-org:service:RenderingControl:1" >
<InstanceID xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="ui4" >0</InstanceID >
<Channel xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="string" >Master</Channel >
</m:GetVolume >
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: GetMute. Params: <?xml version="1.0"? >
<m:GetMute xmlns:m="urn:schemas-upnp-org:service:RenderingControl:1" >
<InstanceID xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="ui4" >0</InstanceID >
<Channel xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="string" >Master</Channel >
</m:GetMute >
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: 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.100:10246/MDEServer/53E296A7-3F0B-4C6C-A2F8-0A4F7AA2FB62/1000.mp3?formatID=00000029-A9AF-4584-84E2-55BFEF0A7D7E</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/" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/"><item id="1000" restricted="1" parentID="0" microsoft:cpId="{EFB4DB67-C704-4A4E-9A85-95D9F0AD22AC}" microsoft:trackId="1"><dc:title>Wonderful Tonight</dc:title><dc:creator>Eric Clapton</dc:creator><res duration="0:03:45.360" bitrate="192000" protocolInfo="http-get:*:audio/L16;rate=48000;channels=2:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=10;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01700000000000000000000000000000" sampleFrequency="48000" bitsPerSample="16" nrAudioChannels="2" microsoft:codec="{00000001-0000-0010-8000-00AA00389B71}">http://192.168.1.100:10246/MDEServer/53E296A7-3F0B-4C6C-A2F8-0A4F7AA2FB62/1000.mp3?formatID=00000029-A9AF-4584-84E2-55BFEF0A7D7E</res><res duration="0:03:45.360" bitrate="176400" protocolInfo="http-get:*:audio/L16;rate=44100;channels=2:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=10;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01700000000000000000000000000000" sampleFrequency="44100" bitsPerSample="16" nrAudioChannels="2" microsoft:codec="{00000001-0000-0010-8000-00AA00389B71}">http://192.168.1.100:10246/MDEServer/53E296A7-3F0B-4C6C-A2F8-0A4F7AA2FB62/1000.mp3?formatID=00000027-A9AF-4584-84E2-55BFEF0A7D7E</res><res duration="0:03:45.360" bitrate="88200" protocolInfo="http-get:*:audio/L16;rate=44100;channels=1:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=10;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01700000000000000000000000000000" sampleFrequency="44100" bitsPerSample="16" nrAudioChannels="1" microsoft:codec="{00000001-0000-0010-8000-00AA00389B71}">http://192.168.1.100:10246/MDEServer/53E296A7-3F0B-4C6C-A2F8-0A4F7AA2FB62/1000.mp3?formatID=00000025-A9AF-4584-84E2-55BFEF0A7D7E</res><res duration="0:03:45.360" bitrate="24000" protocolInfo="http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMABASE;DLNA.ORG_OP=10;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01700000000000000000000000000000" sampleFrequency="48000" nrAudioChannels="2" microsoft:codec="{00000161-0000-0010-8000-00AA00389B71}">http://192.168.1.100:10246/MDEServer/53E296A7-3F0B-4C6C-A2F8-0A4F7AA2FB62/1000.wma?formatID=00000070-A9AF-4584-84E2-55BFEF0A7D7E</res><upnp:class>object.item.audioItem.musicTrack</upnp:class><upnp:genre>Rock</upnp:genre><dc:publisher>Polydor</dc:publisher><upnp:artist role="Performer">Eric Clapton</upnp:artist><upnp:author role="Composer">Eric Clapton</upnp:author><upnp:author role="Composer">Michael Kamen</upnp:author><upnp:album>Time Pieces: The Best of Eric Clapton</upnp:album><upnp:originalTrackNumber>4</upnp:originalTrackNumber><dc:date>1982-01-02</dc:date><upnp:actor role="Composer">Eric Clapton</upnp:actor><upnp:actor role="Composer">Michael Kamen</upnp:actor><upnp:albumArtURI>http://192.168.1.100:10246/MDEServer/53E296A7-3F0B-4C6C-A2F8-0A4F7AA2FB62/1000.jpg?albumArt=0</upnp:albumArtURI><upnp:albumArtURI dlna:profileID="JPEG_TN">http://192.168.1.100:10246/MDEServer/53E296A7-3F0B-4C6C-A2F8-0A4F7AA2FB62/1000.jpg?albumArt=0,formatID=00000020-A9AF-4584-84E2-55BFEF0A7D7E,width=158,height=160</upnp:albumArtURI><desc id="artist" nameSpace="urn:schemas-microsoft-com:WMPNSS-1-0/" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/"><microsoft:artistPerformer>Eric Clapton</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>Eric Clapton</microsoft:authorComposer></desc><desc id="author" nameSpace="urn:schemas-microsoft-com:WMPNSS-1-0/" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/"><microsoft:authorComposer>Michael Kamen</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>1982</microsoft:year></desc><desc id="fileInfo" nameSpace="urn:schemas-microsoft-com:WMPNSS-1-0/" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0/"><microsoft:fileIdentifier>AMGa_id=R 4026;AMGp_id=P 64692;AMGt_id=T 1065031</microsoft:fileIdentifier></desc></item></DIDL-Lite></CurrentURIMetaData >
</m:SetAVTransportURI >
src/mpdcli.cxx:733::MPDCli::clearQueue
src/avtransport.cxx:344::SetAVTransportURI: curpos: -1 is_song 0 qlen 0
src/mpdcli.cxx:681::MPDCli::insert at :0 uri http://192.168.1.100:10246/MDEServer/53E296A7-3F0B-4C6C-A2F8-0A4F7AA2FB62/1000.mp3?formatID=00000029-A9AF-4584-84E2-55BFEF0A7D7E
src/mpdcli.cxx:537::MPDCli::play(pos=0)
src/avtransport.cxx:404::MPD Status: 1
src/mpdcli.cxx:572::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:811::MPDCli::getQueueData
src/mpdcli.cxx:796::MPDCli::getQueueSongs: 1 songs
src/ohplaylist.cxx:146::OHPlaylist::translateIdArray: current ids: 21
src/ohplaylist.cxx:220::OHPlaylist::makeIdArray: using mpd data for 21 uri http://192.168.1.100:10246/MDEServer/53E296A7-3F0B-4C6C-A2F8-0A4F7AA2FB62/1000.mp3?formatID=00000029-A9AF-4584-84E2-55BFEF0A7D7E
src/ohplaylist.cxx:227::OHPlaylist::makeIdArray: dropping uri http://192.168.1.100:10246/MDEServer/53E296A7-3F0B-4C6C-A2F8-0A4F7AA2FB62/1000.mp3
src/ohplaylist.cxx:234::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: 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:569::UpMpdAVTransport::playcontrol State: 1 what 1
src/mpdcli.cxx:537::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 >
joerg-krause writes
I have an idea how to fix this issue: The MPD state is fetched after the clearQueue()
command: https://github.com/medoc92/upmpdcli/blob/master/src/avtransport.cxx#L332-L335, which returns always STOP
for !setnext
.
upmpdcli should get the MPD state before clearing the MPD queue.
joerg-krause writes
Note that MPD cannot handle a raw PCM stream via HTTP. I’m using a custom procolinfo.txt which had PCM mime-types enabled, e.g. audio/L16. After removing those mime-types from my protocolinfo.txt WMP does not send any PCM encoded URIs in the filed CurrentURIMetaData
anymore.
joerg-krause writes
Note that MPD adds support for audio\L16
in commit https://github.com/MaxKellermann/MPD/commit/5a22a0c27d4b1858cfed9f47d3f3516d11cea6c5.
medoc92 writes
J�rg Krause writes:
> Note that MPD adds support for audio\L16 in commit MaxKellermann/MPD@5a22a0c.
Thanks for the heads up, this should mean that we can uncomment the protocolinfo lines if the mpd instance includes the mpd patch. Did you try it ?
medoc92 writes
Ok, had a look at this. The MPD patch is buggy (L16 is network byte order, MPD takes it as little-endian). Another issue is that the transcoding server I tried this with (AssetUPnP) does not set the rate and channels parameters in the MIME type (just audio/L16, not audio/L16;rate=44100;channels=2). I can fix the byte order issue and make MPD default to 44100/2, but I doubt that the latter will make it into the official source, as it’s not conform to the rfc (says no default for rate, and 1 default channel).
joerg-krause writes
@medoc92 No, I have not tried yet.
If AssetUPnP does not send the parameters in the MIME type maybe we can convince the maintainers to add compatibility to this RFC…