git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix typo
[enigma2.git]
/
lib
/
service
/
servicedvb.cpp
diff --git
a/lib/service/servicedvb.cpp
b/lib/service/servicedvb.cpp
index 542e6359eb7c0b99cc2637f3e91fc87e975abca4..94c31b4f1ab787dfe6b89519a7f7e3157c3f631a 100644
(file)
--- a/
lib/service/servicedvb.cpp
+++ b/
lib/service/servicedvb.cpp
@@
-10,6
+10,7
@@
#include <lib/dvb/db.h>
#include <lib/dvb/decoder.h>
#include <lib/dvb/db.h>
#include <lib/dvb/decoder.h>
+#include <lib/components/file_eraser.h>
#include <lib/service/servicedvbrecord.h>
#include <lib/service/event.h>
#include <lib/dvb/metaparser.h>
#include <lib/service/servicedvbrecord.h>
#include <lib/service/event.h>
#include <lib/dvb/metaparser.h>
@@
-185,6
+186,8
@@
int eStaticServiceDVBPVRInformation::getInfo(const eServiceReference &ref, int w
{
case iServiceInformation::sDescription:
return iServiceInformation::resIsString;
{
case iServiceInformation::sDescription:
return iServiceInformation::resIsString;
+ case iServiceInformation::sServiceref:
+ return iServiceInformation::resIsString;
case iServiceInformation::sTimeCreate:
if (m_parser.m_time_create)
return m_parser.m_time_create;
case iServiceInformation::sTimeCreate:
if (m_parser.m_time_create)
return m_parser.m_time_create;
@@
-201,6
+204,8
@@
std::string eStaticServiceDVBPVRInformation::getInfoString(const eServiceReferen
{
case iServiceInformation::sDescription:
return m_parser.m_description;
{
case iServiceInformation::sDescription:
return m_parser.m_description;
+ case iServiceInformation::sServiceref:
+ return m_parser.m_ref.toString();
default:
return "";
}
default:
return "";
}
@@
-233,11
+238,18
@@
RESULT eDVBPVRServiceOfflineOperations::deleteFromDisk(int simulate)
if (getListOfFilenames(res))
return -1;
if (getListOfFilenames(res))
return -1;
+ eBackgroundFileEraser *eraser = eBackgroundFileEraser::getInstance();
+ if (!eraser)
+ eDebug("FATAL !! can't get background file eraser");
+
/* TODO: deferred removing.. */
for (std::list<std::string>::iterator i(res.begin()); i != res.end(); ++i)
{
eDebug("Removing %s...", i->c_str());
/* TODO: deferred removing.. */
for (std::list<std::string>::iterator i(res.begin()); i != res.end(); ++i)
{
eDebug("Removing %s...", i->c_str());
- ::unlink(i->c_str());
+ if (eraser)
+ eraser->erase(i->c_str());
+ else
+ ::unlink(i->c_str());
}
return 0;
}
return 0;
@@
-248,10
+260,25
@@
RESULT eDVBPVRServiceOfflineOperations::getListOfFilenames(std::list<std::string
{
res.clear();
res.push_back(m_ref.path);
{
res.clear();
res.push_back(m_ref.path);
+
+// handling for old splitted recordings (enigma 1)
+ char buf[255];
+ int slice=1;
+ while(true)
+ {
+ snprintf(buf, 255, "%s.%03d", m_ref.path.c_str(), slice++);
+ struct stat s;
+ if (stat(buf, &s) < 0)
+ break;
+ res.push_back(buf);
+ }
+
res.push_back(m_ref.path + ".meta");
res.push_back(m_ref.path + ".ap");
res.push_back(m_ref.path + ".cuts");
res.push_back(m_ref.path + ".meta");
res.push_back(m_ref.path + ".ap");
res.push_back(m_ref.path + ".cuts");
- res.push_back(m_ref.path + ".eit");
+ std::string tmp = m_ref.path;
+ tmp.erase(m_ref.path.length()-3);
+ res.push_back(tmp + ".eit");
return 0;
}
return 0;
}
@@
-633,6
+660,9
@@
void eDVBServicePlay::serviceEventTimeshift(int event)
if (m_timeshift_active)
updateDecoder();
break;
if (m_timeshift_active)
updateDecoder();
break;
+ case eDVBServicePMTHandler::eventSOF:
+ m_event((iPlayableService*)this, evSOF);
+ break;
case eDVBServicePMTHandler::eventEOF:
switchToLive();
break;
case eDVBServicePMTHandler::eventEOF:
switchToLive();
break;
@@
-1436,6
+1466,7
@@
void eDVBServicePlay::switchToTimeshift()
r.path = m_timeshift_file;
m_service_handler_timeshift.tune(r, 1, m_cue); /* use the decoder demux for everything */
r.path = m_timeshift_file;
m_service_handler_timeshift.tune(r, 1, m_cue); /* use the decoder demux for everything */
+ updateDecoder(); /* mainly to switch off PCR */
}
void eDVBServicePlay::updateDecoder()
}
void eDVBServicePlay::updateDecoder()