Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] [PATCH] DXR3 Plugin v.0.2.0 External Player Mode



Hi,

i installed the latest DXR3 Plugin yesterday, im using it as a primary
device without a DVB card.

I noticed a but in the DXR3 Plugin when calling the MPlayer Plugin and
then stopping the MPlayer Plugin. VDR then crashes.

Im not a programmer, but i was able to fix this. Here is what i have done:

In dxr3abstractiondevice.c line 650 and 652:

Before my patch:

void cDxr3AbsDevice::ExternalReopenDevices(void) {
    Lock();

    if (bExternalReleased) {
        m_fdControl = open(dxr3DeviceName( "" ).c_str(), O_WRONLY |
O_SYNC); assert(m_fdAudio >= 0);
        m_fdVideo = open(dxr3DeviceName( "_mv" ).c_str(), O_WRONLY |
O_SYNC); assert(m_fdVideo >= 0);
        m_fdAudio = open(dxr3DeviceName( "_ma" ).c_str(), O_WRONLY |
O_SYNC); assert(m_fdAudio >= 0);
        m_fdSpu = open(dxr3DeviceName( "_sp" ).c_str(), O_WRONLY |
O_SYNC); assert(m_fdSpu >= 0);

        if (m_fdControl < 0 || m_fdVideo < 0 || m_fdAudio < 0 || m_fdSpu
<0) {
            ExternalReleaseDevices();
        } else {
            m_pClock = new cDxr3SysClock(m_fdControl, m_fdVideo, m_fdSpu);
            SetChannelCount(1);
            bExternalReleased = false;
        }
        ReconfigureDevice();
        m_extSpuInterface.Clear();
    }

    Unlock();
}

AFTER my patch:

void cDxr3AbsDevice::ExternalReopenDevices(void) {
    Lock();

    if (bExternalReleased) {
        m_fdControl = open(dxr3DeviceName( "" ).c_str(), O_WRONLY |
O_SYNC); // FIX assert(m_fdAudio >= 0);
        m_fdVideo = open(dxr3DeviceName( "_mv" ).c_str(), O_WRONLY |
O_SYNC); assert(m_fdVideo >= 0);
        m_fdAudio = open(dxr3DeviceName( "_ma" ).c_str(), O_WRONLY |
O_SYNC); // FIX assert(m_fdAudio >= 0);
        m_fdSpu = open(dxr3DeviceName( "_sp" ).c_str(), O_WRONLY |
O_SYNC); assert(m_fdSpu >= 0);

        if (m_fdControl < 0 || m_fdVideo < 0 || m_fdAudio < 0 || m_fdSpu
<0) {
            ExternalReleaseDevices();
        } else {
            m_pClock = new cDxr3SysClock(m_fdControl, m_fdVideo, m_fdSpu);
            SetChannelCount(1);
            bExternalReleased = false;
        }
        ReconfigureDevice();
        m_extSpuInterface.Clear();
    }

    Unlock();
}

Maybe this helps anyone, who has the same problem. Maybe Kai can look into
this and find out the reason, why this happens.

Greetings,
-------------
Andre Neumann




-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index