mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
driver/record.cpp: testing record without live change, when possible
This commit is contained in:
@@ -820,7 +820,7 @@ bool CRecordManager::Record(const CTimerd::RecordingInfo * const eventinfo, cons
|
|||||||
int mode = channel->getServiceType() != ST_DIGITAL_RADIO_SOUND_SERVICE ?
|
int mode = channel->getServiceType() != ST_DIGITAL_RADIO_SOUND_SERVICE ?
|
||||||
NeutrinoMessages::mode_tv : NeutrinoMessages::mode_radio;
|
NeutrinoMessages::mode_tv : NeutrinoMessages::mode_radio;
|
||||||
|
|
||||||
if(frontend && CutBackNeutrino(eventinfo->channel_id, mode)) {
|
if(frontend && CutBackNeutrino(eventinfo->channel_id, mode, frontend)) {
|
||||||
std::string newdir;
|
std::string newdir;
|
||||||
if(dir && strlen(dir))
|
if(dir && strlen(dir))
|
||||||
newdir = std::string(dir);
|
newdir = std::string(dir);
|
||||||
@@ -1430,7 +1430,7 @@ bool CRecordManager::RunStopScript(void)
|
|||||||
* if zap ok
|
* if zap ok
|
||||||
* set record mode
|
* set record mode
|
||||||
*/
|
*/
|
||||||
bool CRecordManager::CutBackNeutrino(const t_channel_id channel_id, const int mode)
|
bool CRecordManager::CutBackNeutrino(const t_channel_id channel_id, const int mode, CFrontend *frontend)
|
||||||
{
|
{
|
||||||
bool ret = true;
|
bool ret = true;
|
||||||
printf("%s channel_id %llx mode %d\n", __FUNCTION__, channel_id, mode);
|
printf("%s channel_id %llx mode %d\n", __FUNCTION__, channel_id, mode);
|
||||||
@@ -1441,9 +1441,11 @@ bool CRecordManager::CutBackNeutrino(const t_channel_id channel_id, const int mo
|
|||||||
g_Zapit->setStandby(false); // this zap to live_channel_id
|
g_Zapit->setStandby(false); // this zap to live_channel_id
|
||||||
|
|
||||||
t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID();
|
t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID();
|
||||||
|
CFrontend *live_fe = CZapit::getInstance()->GetLiveFrontend();
|
||||||
|
|
||||||
bool mode_changed = false;
|
bool mode_changed = false;
|
||||||
if(live_channel_id != channel_id) {
|
if(live_channel_id != channel_id) {
|
||||||
|
#if 0
|
||||||
bool found = false;
|
bool found = false;
|
||||||
if(SAME_TRANSPONDER(live_channel_id, channel_id)) {
|
if(SAME_TRANSPONDER(live_channel_id, channel_id)) {
|
||||||
found = true;
|
found = true;
|
||||||
@@ -1455,6 +1457,10 @@ bool CRecordManager::CutBackNeutrino(const t_channel_id channel_id, const int mo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
/* FIXME if we here, allocateFE was successful, full zapTo_serviceID
|
||||||
|
* needed, if record frontend same as live, and its on different TP */
|
||||||
|
bool found = (live_fe != frontend) || SAME_TRANSPONDER(live_channel_id, channel_id);
|
||||||
if(found) {
|
if(found) {
|
||||||
ret = g_Zapit->zapTo_record(channel_id) > 0;
|
ret = g_Zapit->zapTo_record(channel_id) > 0;
|
||||||
printf("%s found same tp, zapTo_record channel_id %llx result %d\n", __FUNCTION__, channel_id, ret);
|
printf("%s found same tp, zapTo_record channel_id %llx result %d\n", __FUNCTION__, channel_id, ret);
|
||||||
|
@@ -154,7 +154,7 @@ class CRecordManager : public CMenuTarget, public CChangeObserver
|
|||||||
OpenThreads::Mutex mutex;
|
OpenThreads::Mutex mutex;
|
||||||
static OpenThreads::Mutex sm;
|
static OpenThreads::Mutex sm;
|
||||||
|
|
||||||
bool CutBackNeutrino(const t_channel_id channel_id, const int mode);
|
bool CutBackNeutrino(const t_channel_id channel_id, const int mode, CFrontend *frontend);
|
||||||
void RestoreNeutrino(void);
|
void RestoreNeutrino(void);
|
||||||
bool CheckRecording(const CTimerd::RecordingInfo * const eventinfo);
|
bool CheckRecording(const CTimerd::RecordingInfo * const eventinfo);
|
||||||
void StartNextRecording();
|
void StartNextRecording();
|
||||||
|
Reference in New Issue
Block a user