/** \fn EncoderLink::MatchesRecording(const ProgramInfo *rec) * \brief Returns true if rec is actually being recorded by TVRec. * * This waits for TVRec to enter a state other than kState_ChangingState * Then it checks TVRec::GetRecording() against rec. * \param rec Recording to check against TVRec::GetRecording(). * \sa IsRecording(const ProgramInfo*) */ bool EncoderLink::MatchesRecording(const ProgramInfo *rec) { bool retval = false; ProgramInfo *tvrec = NULL; if (local) { while (kState_ChangingState == GetState()) usleep(100); if (IsBusyRecording()) tvrec = tv->GetRecording(); if (tvrec) { retval = tvrec->IsSameRecording(*rec); delete tvrec; } } else { if (HasSockAndIncrRef()) { ReferenceLocker rlocker(sock); retval = sock->EncoderIsRecording(m_capturecardnum, rec); } } return retval; }