|
a/upmpd/avtransport.cxx |
|
b/upmpd/avtransport.cxx |
|
... |
|
... |
44 |
static const string sTpTransport("urn:schemas-upnp-org:service:AVTransport:1");
|
44 |
static const string sTpTransport("urn:schemas-upnp-org:service:AVTransport:1");
|
45 |
|
45 |
|
46 |
UpMpdAVTransport::UpMpdAVTransport(UpMpd *dev)
|
46 |
UpMpdAVTransport::UpMpdAVTransport(UpMpd *dev)
|
47 |
: UpnpService(sTpTransport, sIdTransport, dev), m_dev(dev)
|
47 |
: UpnpService(sTpTransport, sIdTransport, dev), m_dev(dev)
|
48 |
{
|
48 |
{
|
49 |
m_dev->addActionMapping("SetAVTransportURI",
|
49 |
m_dev->addActionMapping(this,"SetAVTransportURI",
|
50 |
bind(&UpMpdAVTransport::setAVTransportURI,
|
50 |
bind(&UpMpdAVTransport::setAVTransportURI,
|
51 |
this,_1,_2, false));
|
51 |
this,_1,_2, false));
|
52 |
m_dev->addActionMapping("SetNextAVTransportURI",
|
52 |
m_dev->addActionMapping(this,"SetNextAVTransportURI",
|
53 |
bind(&UpMpdAVTransport::setAVTransportURI,
|
53 |
bind(&UpMpdAVTransport::setAVTransportURI,
|
54 |
this,_1, _2, true));
|
54 |
this,_1, _2, true));
|
55 |
m_dev->addActionMapping("GetPositionInfo",
|
55 |
m_dev->addActionMapping(this,"GetPositionInfo",
|
56 |
bind(&UpMpdAVTransport::getPositionInfo,
|
56 |
bind(&UpMpdAVTransport::getPositionInfo,
|
57 |
this, _1, _2));
|
57 |
this, _1, _2));
|
58 |
m_dev->addActionMapping("GetTransportInfo",
|
58 |
m_dev->addActionMapping(this,"GetTransportInfo",
|
59 |
bind(&UpMpdAVTransport::getTransportInfo,
|
59 |
bind(&UpMpdAVTransport::getTransportInfo,
|
60 |
this, _1, _2));
|
60 |
this, _1, _2));
|
61 |
m_dev->addActionMapping("GetMediaInfo",
|
61 |
m_dev->addActionMapping(this,"GetMediaInfo",
|
62 |
bind(&UpMpdAVTransport::getMediaInfo,
|
62 |
bind(&UpMpdAVTransport::getMediaInfo,
|
63 |
this, _1, _2));
|
63 |
this, _1, _2));
|
64 |
m_dev->addActionMapping("GetDeviceCapabilities",
|
64 |
m_dev->addActionMapping(this,"GetDeviceCapabilities",
|
65 |
bind(&UpMpdAVTransport::getDeviceCapabilities,
|
65 |
bind(&UpMpdAVTransport::getDeviceCapabilities,
|
66 |
this, _1, _2));
|
66 |
this, _1, _2));
|
67 |
m_dev->addActionMapping("SetPlayMode",
|
67 |
m_dev->addActionMapping(this,"SetPlayMode",
|
68 |
bind(&UpMpdAVTransport::setPlayMode, this, _1, _2));
|
68 |
bind(&UpMpdAVTransport::setPlayMode, this, _1, _2));
|
69 |
m_dev->addActionMapping("GetTransportSettings",
|
69 |
m_dev->addActionMapping(this,"GetTransportSettings",
|
70 |
bind(&UpMpdAVTransport::getTransportSettings,
|
70 |
bind(&UpMpdAVTransport::getTransportSettings,
|
71 |
this, _1, _2));
|
71 |
this, _1, _2));
|
72 |
m_dev->addActionMapping("GetCurrentTransportActions",
|
72 |
m_dev->addActionMapping(this,"GetCurrentTransportActions",
|
73 |
bind(&UpMpdAVTransport::getCurrentTransportActions,
|
73 |
bind(&UpMpdAVTransport::getCurrentTransportActions,
|
74 |
this,_1,_2));
|
74 |
this,_1,_2));
|
75 |
m_dev->addActionMapping("Stop", bind(&UpMpdAVTransport::playcontrol,
|
75 |
m_dev->addActionMapping(this,"Stop", bind(&UpMpdAVTransport::playcontrol,
|
76 |
this, _1, _2, 0));
|
76 |
this, _1, _2, 0));
|
77 |
m_dev->addActionMapping("Play", bind(&UpMpdAVTransport::playcontrol,
|
77 |
m_dev->addActionMapping(this,"Play", bind(&UpMpdAVTransport::playcontrol,
|
78 |
this, _1, _2, 1));
|
78 |
this, _1, _2, 1));
|
79 |
m_dev->addActionMapping("Pause",
|
79 |
m_dev->addActionMapping(this,"Pause",
|
80 |
bind(&UpMpdAVTransport::playcontrol,
|
80 |
bind(&UpMpdAVTransport::playcontrol,
|
81 |
this, _1, _2, 2));
|
81 |
this, _1, _2, 2));
|
82 |
m_dev->addActionMapping("Seek", bind(&UpMpdAVTransport::seek,
|
82 |
m_dev->addActionMapping(this,"Seek", bind(&UpMpdAVTransport::seek,
|
83 |
this, _1, _2));
|
83 |
this, _1, _2));
|
|
|
84 |
|
|
|
85 |
// should we get rid of those ? They don't make sense for us
|
84 |
m_dev->addActionMapping("Next", bind(&UpMpdAVTransport::seqcontrol,
|
86 |
m_dev->addActionMapping(this, "Next", bind(&UpMpdAVTransport::seqcontrol,
|
85 |
this, _1, _2, 0));
|
87 |
this, _1, _2, 0));
|
86 |
m_dev->addActionMapping("Previous",
|
88 |
m_dev->addActionMapping(this, "Previous",
|
87 |
bind(&UpMpdAVTransport::seqcontrol,
|
89 |
bind(&UpMpdAVTransport::seqcontrol,
|
88 |
this, _1, _2, 1));
|
90 |
this, _1, _2, 1));
|
|
|
91 |
|
|
|
92 |
// dev->m_mpdcli->consume(true);
|
89 |
}
|
93 |
}
|
90 |
|
94 |
|
91 |
// Translate MPD mode flags to UPnP Play mode
|
95 |
// Translate MPD mode flags to UPnP Play mode
|
92 |
static string mpdsToPlaymode(const MpdStatus& mpds)
|
96 |
static string mpdsToPlaymode(const MpdStatus& mpds)
|
93 |
{
|
97 |
{
|