diff options
Diffstat (limited to 'lib/dvb/dvb.cpp')
| -rw-r--r-- | lib/dvb/dvb.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/lib/dvb/dvb.cpp b/lib/dvb/dvb.cpp index 1807b87e..21ebecf1 100644 --- a/lib/dvb/dvb.cpp +++ b/lib/dvb/dvb.cpp @@ -1761,14 +1761,20 @@ RESULT eDVBChannel::playFile(const char *file) } eRawFile *f = new eRawFile(); + ePtr<iDataSource> source = f; + 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); + return playSource(source, file); +} + +RESULT eDVBChannel::playSource(ePtr<iDataSource> &source, const char *priv) +{ + m_tstools.setSource(source, priv); /* DON'T EVEN THINK ABOUT FIXING THIS. FIX THE ATI SOURCES FIRST, THEN DO A REAL FIX HERE! */ @@ -1804,7 +1810,7 @@ RESULT eDVBChannel::playFile(const char *file) return 0; } -void eDVBChannel::stopFile() +void eDVBChannel::stopSource() { if (m_pvr_thread) { @@ -1816,6 +1822,11 @@ void eDVBChannel::stopFile() ::close(m_pvr_fd_dst); } +void eDVBChannel::stopFile() +{ + stopSource(); +} + void eDVBChannel::setCueSheet(eCueSheet *cuesheet) { m_conn_cueSheetEvent = 0; |
