Switch to unified view

a/src/ohproduct.cxx b/src/ohproduct.cxx
...
...
30
30
31
#include "libupnpp/device/device.hxx"   // for UpnpService
31
#include "libupnpp/device/device.hxx"   // for UpnpService
32
#include "libupnpp/log.hxx"             // for LOGDEB
32
#include "libupnpp/log.hxx"             // for LOGDEB
33
#include "libupnpp/soaphelp.hxx"        // for SoapOutgoing, SoapIncoming
33
#include "libupnpp/soaphelp.hxx"        // for SoapOutgoing, SoapIncoming
34
34
35
#include "upmpd.hxx"                    // for UpMpd
35
#include "upmpd.hxx"
36
#include "upmpdutils.hxx"                    // for UpMpd
36
#include "upmpdutils.hxx"
37
#include "ohplaylist.hxx"
37
#include "ohplaylist.hxx"
38
#include "ohradio.hxx"
38
#include "ohreceiver.hxx"
39
#include "ohreceiver.hxx"
39
#include "ohsndrcv.hxx"
40
#include "ohsndrcv.hxx"
40
41
41
using namespace std;
42
using namespace std;
42
using namespace std::placeholders;
43
using namespace std::placeholders;
...
...
53
    : UpnpService(sTpProduct, sIdProduct, dev), m_dev(dev),
54
    : UpnpService(sTpProduct, sIdProduct, dev), m_dev(dev),
54
      m_roomOrName(friendlyname), m_sourceIndex(0), m_standby(false)
55
      m_roomOrName(friendlyname), m_sourceIndex(0), m_standby(false)
55
{
56
{
56
    // Playlist must stay first.
57
    // Playlist must stay first.
57
    o_sources.push_back(pair<string,string>("Playlist","Playlist"));
58
    o_sources.push_back(pair<string,string>("Playlist","Playlist"));
58
    //o_sources.push_back("UpnpAv");
59
    o_sources.push_back(pair<string, string>("Radio", "Radio"));
59
    if (m_dev->m_ohrcv) {
60
    if (m_dev->m_ohrcv) {
60
        o_sources.push_back(pair<string,string>("Receiver","Receiver"));
61
        o_sources.push_back(pair<string,string>("Receiver","Receiver"));
61
        if (m_dev->m_sndrcv &&
62
        if (m_dev->m_sndrcv &&
62
            m_dev->m_ohrcv->playMethod() == OHReceiverParams::OHRP_ALSA) {
63
            m_dev->m_ohrcv->playMethod() == OHReceiverParams::OHRP_ALSA) {
63
            // It might be possible to make things work with the MPD
64
            // It might be possible to make things work with the MPD
...
...
268
            LOGDEB("OHProduct::iSetSourceIndex: stopping OHPL\n");
269
            LOGDEB("OHProduct::iSetSourceIndex: stopping OHPL\n");
269
            m_dev->m_ohpl->iStop();
270
            m_dev->m_ohpl->iStop();
270
        } else if (!curnm.compare("Receiver") && m_dev->m_ohrcv) {
271
        } else if (!curnm.compare("Receiver") && m_dev->m_ohrcv) {
271
            LOGDEB("OHProduct::iSetSourceIndex: stopping Receiver\n");
272
            LOGDEB("OHProduct::iSetSourceIndex: stopping Receiver\n");
272
            m_dev->m_ohrcv->iStop();
273
            m_dev->m_ohrcv->iStop();
274
        } else if (!curnm.compare("Radio") && m_dev->m_ohrd) {
275
            LOGDEB("OHProduct::iSetSourceIndex: stopping Radio\n");
276
            m_dev->m_ohrd->iStop();
273
        } else if (!curnm.compare("SenderReceiver") && m_dev->m_sndrcv) {
277
        } else if (!curnm.compare("SenderReceiver") && m_dev->m_sndrcv) {
274
            LOGDEB("OHProduct::iSetSourceIndex: stopping Sender/Receiver\n");
278
            LOGDEB("OHProduct::iSetSourceIndex: stopping Sender/Receiver\n");
275
            m_dev->m_sndrcv->stop();
279
            m_dev->m_sndrcv->stop();
276
        }
280
        }
277
281