From f7fc6b1db35de2d09ee446fe704ae05d7ccac992 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) Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/edb5fa95eeaf1be0af78359619061d4f4311f7c5 Author: FlatTV Date: 2019-05-05 (Sun, 05 May 2019) --- src/driver/streamts.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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();