git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
allow absolute paths in resolveFilename
[enigma2.git]
/
lib
/
dvb
/
dvb.cpp
diff --git
a/lib/dvb/dvb.cpp
b/lib/dvb/dvb.cpp
index 3bceebb017c00d605579d02bf91863b8e2c8b302..ad5dfa641ea9d4fa35658e186be3842cd62bee34 100644
(file)
--- a/
lib/dvb/dvb.cpp
+++ b/
lib/dvb/dvb.cpp
@@
-626,11
+626,11
@@
void eDVBChannel::frontendStateChanged(iDVBFrontend*fe)
} else if (state == iDVBFrontend::stateLostLock)
{
/* on managed channels, we try to retune in order to re-acquire lock. */
} else if (state == iDVBFrontend::stateLostLock)
{
/* on managed channels, we try to retune in order to re-acquire lock. */
- if (m_
feparm
)
+ if (m_
current_frontend_parameters
)
{
eDebug("OURSTATE: lost lock, trying to retune");
ourstate = state_tuning;
{
eDebug("OURSTATE: lost lock, trying to retune");
ourstate = state_tuning;
- m_frontend->get().tune(*m_
feparm
);
+ m_frontend->get().tune(*m_
current_frontend_parameters
);
} else
/* on unmanaged channels, we don't do this. the client will do this. */
{
} else
/* on unmanaged channels, we don't do this. the client will do this. */
{
@@
-918,7
+918,7
@@
RESULT eDVBChannel::setChannel(const eDVBChannelID &channelid, ePtr<iDVBFrontend
/* if tuning fails, shutdown the channel immediately. */
int res;
res = m_frontend->get().tune(*feparm);
/* if tuning fails, shutdown the channel immediately. */
int res;
res = m_frontend->get().tune(*feparm);
- m_
feparm
= feparm;
+ m_
current_frontend_parameters
= feparm;
if (res)
{
if (res)
{
@@
-977,8
+977,13
@@
RESULT eDVBChannel::getFrontend(ePtr<iDVBFrontend> &frontend)
frontend = &m_frontend->get();
if (frontend)
return 0;
frontend = &m_frontend->get();
if (frontend)
return 0;
- else
- return -ENODEV;
+ return -ENODEV;
+}
+
+RESULT eDVBChannel::getCurrentFrontendParameters(ePtr<iDVBFrontendParameters> ¶m)
+{
+ param = m_current_frontend_parameters;
+ return 0;
}
RESULT eDVBChannel::playFile(const char *file)
}
RESULT eDVBChannel::playFile(const char *file)
@@
-1008,14
+1013,6
@@
RESULT eDVBChannel::playFile(const char *file)
return -ENODEV;
}
return -ENODEV;
}
- m_pvr_fd_src = open(file, O_RDONLY|O_LARGEFILE);
- if (m_pvr_fd_src < 0)
- {
- eDebug("can't open PVR m_pvr_fd_src file %s (%m)", file);
- close(m_pvr_fd_dst);
- return -ENOENT;
- }
-
m_state = state_ok;
m_stateChanged(this);
m_state = state_ok;
m_stateChanged(this);
@@
-1023,7
+1020,13
@@
RESULT eDVBChannel::playFile(const char *file)
m_pvr_thread->enablePVRCommit(1);
m_pvr_thread->setScatterGather(this);
m_pvr_thread->enablePVRCommit(1);
m_pvr_thread->setScatterGather(this);
- m_pvr_thread->start(m_pvr_fd_src, m_pvr_fd_dst);
+ if (m_pvr_thread->start(file, m_pvr_fd_dst))
+ {
+ delete m_pvr_thread;
+ m_pvr_thread = 0;
+ eDebug("can't open PVR file %s (%m)", file);
+ return -ENOENT;
+ }
CONNECT(m_pvr_thread->m_event, eDVBChannel::pvrEvent);
return 0;
CONNECT(m_pvr_thread->m_event, eDVBChannel::pvrEvent);
return 0;
@@
-1034,7
+1037,6
@@
void eDVBChannel::stopFile()
if (m_pvr_thread)
{
m_pvr_thread->stop();
if (m_pvr_thread)
{
m_pvr_thread->stop();
- ::close(m_pvr_fd_src);
::close(m_pvr_fd_dst);
delete m_pvr_thread;
m_pvr_thread = 0;
::close(m_pvr_fd_dst);
delete m_pvr_thread;
m_pvr_thread = 0;