diff --git a/src/driver/record.cpp b/src/driver/record.cpp index efb8b27ec..07a25b216 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -790,8 +790,10 @@ bool CRecordManager::Record(const CTimerd::RecordingInfo * const eventinfo, cons printf("%s channel_id %llx epg: %llx, apidmode 0x%X\n", __FUNCTION__, eventinfo->channel_id, eventinfo->epgID, eventinfo->apids); +#if 0 if(!CheckRecording(eventinfo)) return false; +#endif #if 1 // FIXME test StopSectionsd = false; @@ -896,7 +898,7 @@ bool CRecordManager::StartAutoRecord() return Record(live_channel_id, TimeshiftDirectory.c_str(), true); } -bool CRecordManager::StopAutoRecord() +bool CRecordManager::StopAutoRecord(bool lock) { printf("%s: autoshift %d\n", __FUNCTION__, autoshift); @@ -905,7 +907,8 @@ bool CRecordManager::StopAutoRecord() if(!autoshift) return false; - mutex.lock(); + if (lock) + mutex.lock(); CRecordInstance * inst = NULL; for (recmap_iterator_t it = recmap.begin(); it != recmap.end(); it++) { if (it->second->Timeshift()) { @@ -916,11 +919,13 @@ bool CRecordManager::StopAutoRecord() if (inst) StopInstance(inst); - mutex.unlock(); + if (lock) + mutex.unlock(); return (inst != NULL); } +#if 0 bool CRecordManager::CheckRecording(const CTimerd::RecordingInfo * const eventinfo) { t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID(); @@ -930,6 +935,7 @@ bool CRecordManager::CheckRecording(const CTimerd::RecordingInfo * const eventin return true; } +#endif void CRecordManager::StartNextRecording() { @@ -1477,6 +1483,7 @@ bool CRecordManager::CutBackNeutrino(const t_channel_id channel_id, const int mo } else { printf("%s mode %d last_mode %d getLastMode %d\n", __FUNCTION__, mode, last_mode, CNeutrinoApp::getInstance()->getLastMode()); + StopAutoRecord(false); if (mode != last_mode && (last_mode != NeutrinoMessages::mode_standby || mode != CNeutrinoApp::getInstance()->getLastMode())) { CNeutrinoApp::getInstance()->handleMsg( NeutrinoMessages::CHANGEMODE , mode | NeutrinoMessages::norezap ); mode_changed = true; diff --git a/src/driver/record.h b/src/driver/record.h index aaf6b3ab9..451ff96fd 100644 --- a/src/driver/record.h +++ b/src/driver/record.h @@ -187,7 +187,7 @@ class CRecordManager : public CMenuTarget /*, public CChangeObserver*/ bool AskToStop(const t_channel_id channel_id, const int recid = 0); int exec(CMenuTarget* parent, const std::string & actionKey); bool StartAutoRecord(); - bool StopAutoRecord(); + bool StopAutoRecord(bool lock = true); MI_MOVIE_INFO * GetMovieInfo(const t_channel_id channel_id); const std::string GetFileName(const t_channel_id channel_id);