From cbbf68e2f4dfa4db7f8d8e3d09db628ba6506d77 Mon Sep 17 00:00:00 2001 From: FlatTV Date: Sun, 5 May 2019 17:05:37 +0200 Subject: [PATCH] streamts.cpp: pick ARM streaming from DDT (thx DboxOldie) --- src/driver/streamts.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/driver/streamts.cpp b/src/driver/streamts.cpp index acd4f0e69..b98646315 100644 --- a/src/driver/streamts.cpp +++ b/src/driver/streamts.cpp @@ -203,12 +203,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()); @@ -359,7 +372,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();