diff options
| author | ghost <andreas.monzner@multimedia-labs.de> | 2010-11-10 17:15:15 +0100 |
|---|---|---|
| committer | ghost <andreas.monzner@multimedia-labs.de> | 2010-11-10 17:15:15 +0100 |
| commit | 6fdb2d2094c50a2bc324f4094473c2107d2ea943 (patch) | |
| tree | d20010fa6cef2a622af5a2442ba660591f75afcc /lib/dvb/dvb.cpp | |
| parent | 96844b5bd92b331390597061efe140172979c34d (diff) | |
| download | enigma2-6fdb2d2094c50a2bc324f4094473c2107d2ea943.tar.gz enigma2-6fdb2d2094c50a2bc324f4094473c2107d2ea943.zip | |
add new playSource / stopSource interface to iDVBChannel and eDVBChannel
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; |
