mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
driver/record.cpp: testing record without live change, when possible - another try
This commit is contained in:
@@ -815,7 +815,18 @@ bool CRecordManager::Record(const CTimerd::RecordingInfo * const eventinfo, cons
|
||||
#endif
|
||||
if(recmap.size() < RECORD_MAX_COUNT) {
|
||||
CZapitChannel * channel = CServiceManager::getInstance()->FindChannel(eventinfo->channel_id);
|
||||
|
||||
/* first try to get frontend for record with locked live */
|
||||
CFrontend *live_fe = CZapit::getInstance()->GetLiveFrontend();
|
||||
bool unlock = true;
|
||||
CFEManager::getInstance()->lockFrontend(live_fe);
|
||||
CFrontend * frontend = CFEManager::getInstance()->allocateFE(channel);
|
||||
if (frontend == NULL) {
|
||||
/* no frontend, try again with unlocked live */
|
||||
unlock = false;
|
||||
CFEManager::getInstance()->unlockFrontend(live_fe);
|
||||
frontend = CFEManager::getInstance()->allocateFE(channel);
|
||||
}
|
||||
|
||||
int mode = channel->getServiceType() != ST_DIGITAL_RADIO_SOUND_SERVICE ?
|
||||
NeutrinoMessages::mode_tv : NeutrinoMessages::mode_radio;
|
||||
@@ -849,6 +860,8 @@ bool CRecordManager::Record(const CTimerd::RecordingInfo * const eventinfo, cons
|
||||
printf("%s add %llx : %s to pending\n", __FUNCTION__, evt->channel_id, evt->epgTitle);
|
||||
nextmap.push_back((CTimerd::RecordingInfo *)evt);
|
||||
}
|
||||
if (unlock)
|
||||
CFEManager::getInstance()->unlockFrontend(live_fe);
|
||||
} else
|
||||
error_msg = RECORD_BUSY;
|
||||
|
||||
|
Reference in New Issue
Block a user