git.cweiske.de
/
enigma2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
efd666f
)
differentiate between failures while and after tuning
author
Felix Domke
<tmbinc@elitedvb.net>
Wed, 9 Nov 2005 17:31:11 +0000
(17:31 +0000)
committer
Felix Domke
<tmbinc@elitedvb.net>
Wed, 9 Nov 2005 17:31:11 +0000
(17:31 +0000)
lib/dvb/dvb.cpp
patch
|
blob
|
history
lib/dvb/frontend.cpp
patch
|
blob
|
history
lib/dvb/idvb.h
patch
|
blob
|
history
lib/dvb/pmt.cpp
patch
|
blob
|
history
lib/dvb/pmt.h
patch
|
blob
|
history
lib/dvb/scan.cpp
patch
|
blob
|
history
lib/service/iservice.h
patch
|
blob
|
history
lib/service/servicedvb.cpp
patch
|
blob
|
history
diff --git
a/lib/dvb/dvb.cpp
b/lib/dvb/dvb.cpp
index 35e5c9935a752d931f0086a44c3e07d26c0f7020..13ae224c3d1490f26cabe046e7dfad2c7e836ec1 100644
(file)
--- a/
lib/dvb/dvb.cpp
+++ b/
lib/dvb/dvb.cpp
@@
-176,7
+176,6
@@
eDVBResourceManager::~eDVBResourceManager()
{
if (instance == this)
instance = 0;
{
if (instance == this)
instance = 0;
-
}
void eDVBResourceManager::addAdapter(iDVBAdapter *adapter)
}
void eDVBResourceManager::addAdapter(iDVBAdapter *adapter)
@@
-288,7
+287,7
@@
RESULT eDVBResourceManager::allocateChannel(const eDVBChannelID &channelid, eUse
// return errNoDemux;
RESULT res;
// return errNoDemux;
RESULT res;
- e
DVBChannel *
ch;
+ e
Ptr<eDVBChannel>
ch;
ch = new eDVBChannel(this, fe);
ePtr<iDVBFrontend> myfe;
ch = new eDVBChannel(this, fe);
ePtr<iDVBFrontend> myfe;
@@
-346,7
+345,6
@@
RESULT eDVBResourceManager::allocatePVRChannel(eUsePtr<iDVBPVRChannel> &channel)
RESULT eDVBResourceManager::addChannel(const eDVBChannelID &chid, eDVBChannel *ch)
{
RESULT eDVBResourceManager::addChannel(const eDVBChannelID &chid, eDVBChannel *ch)
{
- eDebug("add channel %p", ch);
m_active_channels.push_back(active_channel(chid, ch));
/* emit */ m_channelAdded(ch);
return 0;
m_active_channels.push_back(active_channel(chid, ch));
/* emit */ m_channelAdded(ch);
return 0;
@@
-404,7
+402,6
@@
eDVBChannel::~eDVBChannel()
void eDVBChannel::frontendStateChanged(iDVBFrontend*fe)
{
void eDVBChannel::frontendStateChanged(iDVBFrontend*fe)
{
- eDebug("fe state changed!");
int state, ourstate = 0;
/* if we are already in shutdown, don't change state. */
int state, ourstate = 0;
/* if we are already in shutdown, don't change state. */
@@
-422,10
+419,14
@@
void eDVBChannel::frontendStateChanged(iDVBFrontend*fe)
{
eDebug("OURSTATE: tuning");
ourstate = state_tuning;
{
eDebug("OURSTATE: tuning");
ourstate = state_tuning;
- } else if (state == iDVBFrontend::state
Failed
)
+ } else if (state == iDVBFrontend::state
LostLock
)
{
{
- eDebug("OURSTATE:
failed/unavailable
");
+ eDebug("OURSTATE:
lost lock
");
ourstate = state_unavailable;
ourstate = state_unavailable;
+ } else if (state == iDVBFrontend::stateFailed)
+ {
+ eDebug("OURSTATE: failed");
+ ourstate = state_failed;
} else
eFatal("state unknown");
} else
eFatal("state unknown");
@@
-475,7
+476,6
@@
RESULT eDVBChannel::setChannel(const eDVBChannelID &channelid)
eDebug("channel not found!");
return -ENOENT;
}
eDebug("channel not found!");
return -ENOENT;
}
- eDebug("allocateChannel: channel found..");
if (!m_frontend)
{
if (!m_frontend)
{
diff --git
a/lib/dvb/frontend.cpp
b/lib/dvb/frontend.cpp
index 37ce13a6e09b83c43566bde1395f3ad2ae55fe2d..b8debd81c21754a4caec1b6459a63ceeab047f4c 100644
(file)
--- a/
lib/dvb/frontend.cpp
+++ b/
lib/dvb/frontend.cpp
@@
-341,7
+341,12
@@
void eDVBFrontend::feEvent(int w)
if (m_tuning)
state = stateTuning;
else
if (m_tuning)
state = stateTuning;
else
- state = stateFailed;
+ {
+ state = stateLostLock;
+
+ if (m_state != stateLostLock)
+ eDebug("FIXME: we lost lock, so we might have to retune.");
+ }
}
if (m_state != state)
{
}
if (m_state != state)
{
@@
-363,6
+368,7
@@
void eDVBFrontend::timeout()
m_state = state;
m_stateChanged(this);
}
m_state = state;
m_stateChanged(this);
}
+ m_tuning = 0;
} else
m_tuning = 0;
}
} else
m_tuning = 0;
}
@@
-610,8
+616,6
@@
RESULT eDVBFrontend::tune(const iDVBFrontendParameters &where)
m_sec_sequence.clear();
m_sec_sequence.clear();
- eDebug("eDVBFrontend::tune. type: %d", m_type);
-
switch (m_type)
{
case feSatellite:
switch (m_type)
{
case feSatellite:
diff --git
a/lib/dvb/idvb.h
b/lib/dvb/idvb.h
index d353611d01d815b2e0aed29a575bd9f88688a382..bd528f0657a79b6496d3780d4899b560150dfe00 100644
(file)
--- a/
lib/dvb/idvb.h
+++ b/
lib/dvb/idvb.h
@@
-401,7
+401,8
@@
public:
stateIdle = 0,
stateTuning = 1,
stateFailed = 2,
stateIdle = 0,
stateTuning = 1,
stateFailed = 2,
- stateLock = 3
+ stateLock = 3,
+ stateLostLock = 4,
};
virtual RESULT getState(int &state)=0;
enum {
};
virtual RESULT getState(int &state)=0;
enum {
@@
-438,6
+439,7
@@
public:
{
state_idle, /* not yet tuned */
state_tuning, /* currently tuning (first time) */
{
state_idle, /* not yet tuned */
state_tuning, /* currently tuning (first time) */
+ state_failed, /* tuning failed. */
state_unavailable, /* currently unavailable, will be back without further interaction */
state_ok, /* ok */
state_release /* channel is being shut down. */
state_unavailable, /* currently unavailable, will be back without further interaction */
state_ok, /* ok */
state_release /* channel is being shut down. */
diff --git
a/lib/dvb/pmt.cpp
b/lib/dvb/pmt.cpp
index 538264db698b1ba54998867044e98ff20e87132d..d7186d5c70b88bcd7e23ed3adf51e8783177e325 100644
(file)
--- a/
lib/dvb/pmt.cpp
+++ b/
lib/dvb/pmt.cpp
@@
-44,6
+44,11
@@
void eDVBServicePMTHandler::channelStateChanged(iDVBChannel *channel)
if ( m_service && !m_service->cacheEmpty() )
serviceEvent(eventNewProgramInfo);
}
if ( m_service && !m_service->cacheEmpty() )
serviceEvent(eventNewProgramInfo);
}
+ } else if ((m_last_channel_state != iDVBChannel::state_failed) &&
+ (state == iDVBChannel::state_failed))
+ {
+ eDebug("tune failed.");
+ serviceEvent(eventTuneFailed);
}
}
}
}
@@
-206,6
+211,7
@@
int eDVBServicePMTHandler::tune(eServiceReferenceDVB &ref)
eDVBChannelID chid;
ref.getChannelID(chid);
res = m_resourceManager->allocateChannel(chid, m_channel);
eDVBChannelID chid;
ref.getChannelID(chid);
res = m_resourceManager->allocateChannel(chid, m_channel);
+ eDebug("allocate Channel: res %d", res);
} else
{
eDVBMetaParser parser;
} else
{
eDVBMetaParser parser;
@@
-230,6
+236,10
@@
int eDVBServicePMTHandler::tune(eServiceReferenceDVB &ref)
m_channelStateChanged_connection);
m_last_channel_state = -1;
channelStateChanged(m_channel);
m_channelStateChanged_connection);
m_last_channel_state = -1;
channelStateChanged(m_channel);
+ } else
+ {
+ serviceEvent(eventTuneFailed);
+ return res;
}
if (m_pvr_channel)
}
if (m_pvr_channel)
diff --git
a/lib/dvb/pmt.h
b/lib/dvb/pmt.h
index b917383bb71aaaa4205a9d480a0729dbbeb066c9..a60f37b26354f1082d6da19db3f44931ec2f1c15 100644
(file)
--- a/
lib/dvb/pmt.h
+++ b/
lib/dvb/pmt.h
@@
-75,6
+75,7
@@
public:
enum
{
eventNoResources, // a requested resource couldn't be allocated
enum
{
eventNoResources, // a requested resource couldn't be allocated
+ eventTuneFailed, // tune failed
eventNoPAT, // no pat could be received (timeout)
eventNoPATEntry, // no pat entry for the corresponding SID could be found
eventNoPMT, // no pmt could be received (timeout)
eventNoPAT, // no pat could be received (timeout)
eventNoPATEntry, // no pat entry for the corresponding SID could be found
eventNoPMT, // no pmt could be received (timeout)
diff --git
a/lib/dvb/scan.cpp
b/lib/dvb/scan.cpp
index 4188b643fd5cf2af26fd718a00e5363bf3da9306..2be8a66db0cc23b6ca559d9522b9c663ab052799 100644
(file)
--- a/
lib/dvb/scan.cpp
+++ b/
lib/dvb/scan.cpp
@@
-69,11
+69,12
@@
void eDVBScan::stateChange(iDVBChannel *ch)
{
startFilter();
m_channel_state = state;
{
startFilter();
m_channel_state = state;
- } else if (state == iDVBChannel::state_
unavailable
)
+ } else if (state == iDVBChannel::state_
failed
)
{
m_ch_unavailable.push_back(m_ch_current);
nextChannel();
}
{
m_ch_unavailable.push_back(m_ch_current);
nextChannel();
}
+ /* unavailable will timeout, anyway. */
}
RESULT eDVBScan::nextChannel()
}
RESULT eDVBScan::nextChannel()
diff --git
a/lib/service/iservice.h
b/lib/service/iservice.h
index 92224f8009b9323a48dd96a94f19da59880e0af7..f9a26722bf7d57125a687401651309565c95fb82 100644
(file)
--- a/
lib/service/iservice.h
+++ b/
lib/service/iservice.h
@@
-221,6
+221,7
@@
public:
evStart,
evEnd,
evStart,
evEnd,
+ evTuneFailed,
// when iServiceInformation is implemented:
evUpdatedEventInfo
};
// when iServiceInformation is implemented:
evUpdatedEventInfo
};
diff --git
a/lib/service/servicedvb.cpp
b/lib/service/servicedvb.cpp
index 1779d4dcd334a26116cc3f49ed1f819b092f8ecb..fdf93d7693aa01f2eab2b9fc14bc8828c63eb6eb 100644
(file)
--- a/
lib/service/servicedvb.cpp
+++ b/
lib/service/servicedvb.cpp
@@
-408,6
+408,12
@@
void eDVBServicePlay::serviceEvent(int event)
// eventNoEvent
break;
}
// eventNoEvent
break;
}
+ case eDVBServicePMTHandler::eventTuneFailed:
+ {
+ eDebug("DVB service failed to tune");
+ m_event((iPlayableService*)this, evTuneFailed);
+ break;
+ }
case eDVBServicePMTHandler::eventNewProgramInfo:
{
int vpid = -1, apid = -1, pcrpid = -1;
case eDVBServicePMTHandler::eventNewProgramInfo:
{
int vpid = -1, apid = -1, pcrpid = -1;
@@
-493,6
+499,7
@@
RESULT eDVBServicePlay::start()
int r;
eDebug("starting DVB service");
r = m_service_handler.tune((eServiceReferenceDVB&)m_reference);
int r;
eDebug("starting DVB service");
r = m_service_handler.tune((eServiceReferenceDVB&)m_reference);
+ eDebug("tune result: %d", r);
m_event(this, evStart);
return 0;
}
m_event(this, evStart);
return 0;
}