mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
- record: pick buffer handling from DDT
neutrino will crash here Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -174,6 +174,19 @@ 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
|
||||
|
||||
|
||||
int CRecordInstance::GetStatus()
|
||||
{
|
||||
if (record)
|
||||
@@ -181,6 +194,7 @@ int CRecordInstance::GetStatus()
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
record_error_msg_t CRecordInstance::Start(CZapitChannel * channel)
|
||||
{
|
||||
time_t msg_start_time = time(0);
|
||||
@@ -258,8 +272,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();
|
||||
|
||||
|
Reference in New Issue
Block a user