aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorghost <andreas.monzner@multimedia-labs.de>2010-11-09 23:31:05 +0100
committerghost <andreas.monzner@multimedia-labs.de>2010-11-09 23:31:05 +0100
commit2f085dd58effc19da8e5fec68bb5d73b0b64eb3f (patch)
treec60f1ab53dbc1f357fdd0bd9cd058b65ce3201ad
parent6855a6ae6701f8d29540551fcff971316b5d49f1 (diff)
downloadenigma2-2f085dd58effc19da8e5fec68bb5d73b0b64eb3f.tar.gz
enigma2-2f085dd58effc19da8e5fec68bb5d73b0b64eb3f.zip
dvb.cpp: migrate to iDataSource, use shared iDataSource for tstools and filepush thread
-rw-r--r--lib/dvb/dvb.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/dvb/dvb.cpp b/lib/dvb/dvb.cpp
index 51629452..1807b87e 100644
--- a/lib/dvb/dvb.cpp
+++ b/lib/dvb/dvb.cpp
@@ -1760,7 +1760,15 @@ RESULT eDVBChannel::playFile(const char *file)
m_pvr_thread = 0;
}
- m_tstools.openFile(file);
+ eRawFile *f = new eRawFile();
+ if (f->open(file) < 0)
+ {
+ eDebug("can't open PVR file %s (%m)", file);
+ return -ENOENT;
+ }
+
+ ePtr<iDataSource> source = f;
+ m_tstools.setSource(source, file);
/* DON'T EVEN THINK ABOUT FIXING THIS. FIX THE ATI SOURCES FIRST,
THEN DO A REAL FIX HERE! */
@@ -1787,15 +1795,7 @@ RESULT eDVBChannel::playFile(const char *file)
m_event(this, evtPreStart);
- if (m_pvr_thread->start(file, m_pvr_fd_dst))
- {
- delete m_pvr_thread;
- m_pvr_thread = 0;
- ::close(m_pvr_fd_dst);
- m_pvr_fd_dst = -1;
- eDebug("can't open PVR file %s (%m)", file);
- return -ENOENT;
- }
+ m_pvr_thread->start(source, m_pvr_fd_dst);
CONNECT(m_pvr_thread->m_event, eDVBChannel::pvrEvent);
m_state = state_ok;