mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
pzapit: add -lockrc/-unlockrc options; port from martii
I've pulled it from Duckbox-Developers/neutrino-mp-cst-next and modified it to work
This commit is contained in:
@@ -278,21 +278,36 @@ CRCInput::~CRCInput()
|
||||
* stopInput - stop reading rcin for plugins
|
||||
*
|
||||
**************************************************************************/
|
||||
void CRCInput::stopInput()
|
||||
void CRCInput::stopInput(const bool ext)
|
||||
{
|
||||
if (isLocked())
|
||||
return;
|
||||
|
||||
input_stopped = true;
|
||||
close();
|
||||
if (ext)
|
||||
postMsg(NeutrinoMessages::LOCK_RC_EXTERN, 0);
|
||||
}
|
||||
|
||||
bool CRCInput::isLocked(void)
|
||||
{
|
||||
return input_stopped;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* restartInput - restart reading rcin after calling plugins
|
||||
*
|
||||
**************************************************************************/
|
||||
void CRCInput::restartInput()
|
||||
void CRCInput::restartInput(const bool ext)
|
||||
{
|
||||
if (!isLocked())
|
||||
return;
|
||||
|
||||
close();
|
||||
open();
|
||||
input_stopped = false;
|
||||
if (ext)
|
||||
postMsg(NeutrinoMessages::UNLOCK_RC_EXTERN, 0);
|
||||
}
|
||||
#if 0
|
||||
//never used
|
||||
|
@@ -278,8 +278,9 @@ class CRCInput
|
||||
{
|
||||
return fd_rc[0];
|
||||
}
|
||||
void stopInput();
|
||||
void restartInput();
|
||||
void stopInput(const bool ext = false);
|
||||
void restartInput(const bool ext = false);
|
||||
bool isLocked(void);
|
||||
|
||||
uint64_t repeat_block;
|
||||
uint64_t repeat_block_generic;
|
||||
|
Reference in New Issue
Block a user