diff --git a/src/driver/streamts.cpp b/src/driver/streamts.cpp index bdd6a6541..19608c9b9 100644 --- a/src/driver/streamts.cpp +++ b/src/driver/streamts.cpp @@ -206,12 +206,25 @@ void CStreamInstance::run() CCamManager::getInstance()->Start(channel_id, CCamManager::STREAM); +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE + CFrontend *live_fe = CZapit::getInstance()->GetLiveFrontend(); + if(live_fe) + CFEManager::getInstance()->unlockFrontend(live_fe); + if(frontend) + CFEManager::getInstance()->lockFrontend(frontend); + //CZapit::getInstance()->SetRecordMode(true); +#endif while (running) { ssize_t r = dmx->Read(buf, IN_SIZE, 100); if (r > 0) Send(r); } +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE + if(frontend) + CFEManager::getInstance()->unlockFrontend(frontend); + //CZapit::getInstance()->SetRecordMode(false); +#endif CCamManager::getInstance()->Stop(channel_id, CCamManager::STREAM); printf("CStreamInstance::run: exiting %" PRIx64 " (%d fds)\n", channel_id, (int)fds.size()); @@ -362,7 +375,11 @@ CFrontend * CStreamManager::FindFrontend(CZapitChannel * channel) for (std::set::iterator ft = frontends.begin(); ft != frontends.end(); ++ft) CFEManager::getInstance()->unlockFrontend(*ft); +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE + if (unlock && !frontend) +#else if (unlock) +#endif CFEManager::getInstance()->unlockFrontend(live_fe); CFEManager::getInstance()->Unlock();