record: pick buffer handling from DDT

Origin commit data
------------------
Commit: 44d07ce8e2
Author: vanhofen <vanhofen@gmx.de>
Date: 2019-01-20 (Sun, 20 Jan 2019)

Origin message was:
------------------
- record: pick buffer handling from DDT
This commit is contained in:
vanhofen
2019-01-20 23:33:59 +01:00
parent 5e2f0a1a17
commit 39aa16503b
8 changed files with 53 additions and 0 deletions

View File

@@ -176,6 +176,18 @@ void CRecordInstance::WaitRecMsg(time_t StartTime, time_t WaitTime)
usleep(100000);
}
#if HAVE_ARM_HARDWARE
void recordingFailureHelper(void *data)
{
CRecordInstance *inst = (CRecordInstance *) data;
std::string errormsg = std::string(g_Locale->getText(LOCALE_RECORDING_FAILED)) + "\n" + std::string(inst->GetFileName());
CHintBox hintBox(LOCALE_MESSAGEBOX_INFO, errormsg.c_str());
hintBox.paint();
sleep(3);
hintBox.hide();
}
#endif
//NI
#if 0
int CRecordInstance::GetStatus()
@@ -263,8 +275,15 @@ record_error_msg_t CRecordInstance::Start(CZapitChannel * channel)
apids[numpids++] = allpids.PIDs.pmtpid;
#endif
#if HAVE_ARM_HARDWARE
if(record == NULL) {
record = new cRecord(channel->getRecordDemux(), g_settings.recording_bufsize_dmx * 1024 * 1024, g_settings.recording_bufsize * 1024 * 1024);
record->setFailureCallback(&recordingFailureHelper, this);
}
#else
if(record == NULL)
record = new cRecord(channel->getRecordDemux() /*RECORD_DEMUX*/);
#endif
record->Open();