aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/dvb/frontend.cpp8
-rw-r--r--lib/dvb/idvb.h2
-rw-r--r--lib/dvb/sec.cpp9
-rw-r--r--lib/dvb/sec.h4
-rw-r--r--lib/python/Screens/InfoBar.py6
-rw-r--r--lib/python/Screens/InfoBarGenerics.py12
-rw-r--r--lib/service/servicemp3.cpp31
-rw-r--r--lib/service/servicemp3.h1
8 files changed, 42 insertions, 31 deletions
diff --git a/lib/dvb/frontend.cpp b/lib/dvb/frontend.cpp
index c6bf6aa8..c0263fb4 100644
--- a/lib/dvb/frontend.cpp
+++ b/lib/dvb/frontend.cpp
@@ -604,7 +604,7 @@ int eDVBFrontend::closeFrontend(bool force)
setVoltage(iDVBFrontend::voltageOff);
m_tuneTimer->stop();
if (m_sec && !m_simulate)
- m_sec->setRotorMoving(false);
+ m_sec->setRotorMoving(m_slotid, false);
if (!::close(m_fd))
m_fd=-1;
else
@@ -1694,12 +1694,12 @@ void eDVBFrontend::tuneLoop() // called by m_tuneTimer
break;
case eSecCommand::SET_ROTOR_MOVING:
if (!m_simulate)
- m_sec->setRotorMoving(true);
+ m_sec->setRotorMoving(m_slotid, true);
++m_sec_sequence.current();
break;
case eSecCommand::SET_ROTOR_STOPPED:
if (!m_simulate)
- m_sec->setRotorMoving(false);
+ m_sec->setRotorMoving(m_slotid, false);
++m_sec_sequence.current();
break;
case eSecCommand::IF_INPUTPOWER_DELTA_GOTO:
@@ -2344,7 +2344,7 @@ RESULT eDVBFrontend::tune(const iDVBFrontendParameters &where)
goto tune_error;
}
if (!m_simulate)
- m_sec->setRotorMoving(false);
+ m_sec->setRotorMoving(m_slotid, false);
res=prepare_sat(feparm, timeout);
if (res)
goto tune_error;
diff --git a/lib/dvb/idvb.h b/lib/dvb/idvb.h
index 26ab5e53..cff4dbb9 100644
--- a/lib/dvb/idvb.h
+++ b/lib/dvb/idvb.h
@@ -490,7 +490,7 @@ class iDVBSatelliteEquipmentControl: public iObject
public:
virtual RESULT prepare(iDVBFrontend &frontend, FRONTENDPARAMETERS &parm, const eDVBFrontendParametersSatellite &sat, int frontend_id, unsigned int timeout)=0;
virtual int canTune(const eDVBFrontendParametersSatellite &feparm, iDVBFrontend *fe, int frontend_id, int *highest_score_lnb=0)=0;
- virtual void setRotorMoving(bool)=0;
+ virtual void setRotorMoving(int slotid, bool)=0;
};
struct eDVBCIRouting
diff --git a/lib/dvb/sec.cpp b/lib/dvb/sec.cpp
index c06c603a..91246889 100644
--- a/lib/dvb/sec.cpp
+++ b/lib/dvb/sec.cpp
@@ -37,7 +37,7 @@ void eDVBSatelliteEquipmentControl::setParam(int param, int value)
}
eDVBSatelliteEquipmentControl::eDVBSatelliteEquipmentControl(eSmartPtrList<eDVBRegisteredFrontend> &avail_frontends, eSmartPtrList<eDVBRegisteredFrontend> &avail_simulate_frontends)
- :m_lnbidx((sizeof(m_lnbs) / sizeof(eDVBSatelliteLNBParameters))-1), m_curSat(m_lnbs[0].m_satellites.end()), m_avail_frontends(avail_frontends), m_avail_simulate_frontends(avail_simulate_frontends), m_rotorMoving(false)
+ :m_lnbidx((sizeof(m_lnbs) / sizeof(eDVBSatelliteLNBParameters))-1), m_curSat(m_lnbs[0].m_satellites.end()), m_avail_frontends(avail_frontends), m_avail_simulate_frontends(avail_simulate_frontends), m_rotorMoving(0)
{
if (!instance)
instance = this;
@@ -1481,7 +1481,10 @@ bool eDVBSatelliteEquipmentControl::isRotorMoving()
return m_rotorMoving;
}
-void eDVBSatelliteEquipmentControl::setRotorMoving(bool b)
+void eDVBSatelliteEquipmentControl::setRotorMoving(int slot_no, bool b)
{
- m_rotorMoving=b;
+ if (b)
+ m_rotorMoving |= (1 << slot_no);
+ else
+ m_rotorMoving &= ~(1 << slot_no);
}
diff --git a/lib/dvb/sec.h b/lib/dvb/sec.h
index 5d969328..c50aee4d 100644
--- a/lib/dvb/sec.h
+++ b/lib/dvb/sec.h
@@ -298,7 +298,7 @@ private:
int m_lnbidx; // current index for set parameters
std::map<int, eDVBSatelliteSwitchParameters>::iterator m_curSat;
eSmartPtrList<eDVBRegisteredFrontend> &m_avail_frontends, &m_avail_simulate_frontends;
- bool m_rotorMoving;
+ int m_rotorMoving;
int m_not_linked_slot_mask;
bool m_canMeasureInputPower;
#endif
@@ -359,7 +359,7 @@ public:
RESULT setTunerDepends(int from, int to);
void setSlotNotLinked(int tuner_no);
- void setRotorMoving(bool); // called from the frontend's
+ void setRotorMoving(int, bool); // called from the frontend's
bool isRotorMoving();
bool canMeasureInputPower() { return m_canMeasureInputPower; }
};
diff --git a/lib/python/Screens/InfoBar.py b/lib/python/Screens/InfoBar.py
index d65eace8..59cc21d3 100644
--- a/lib/python/Screens/InfoBar.py
+++ b/lib/python/Screens/InfoBar.py
@@ -16,7 +16,7 @@ from Screens.InfoBarGenerics import InfoBarShowHide, \
InfoBarSubserviceSelection, InfoBarShowMovies, InfoBarTimeshift, \
InfoBarServiceNotifications, InfoBarPVRState, InfoBarCueSheetSupport, InfoBarSimpleEventView, \
InfoBarSummarySupport, InfoBarMoviePlayerSummarySupport, InfoBarTimeshiftState, InfoBarTeletextPlugin, InfoBarExtensions, \
- InfoBarSubtitleSupport, InfoBarPiP, InfoBarPlugins, InfoBarSleepTimer, InfoBarServiceErrorPopupSupport, InfoBarJobman
+ InfoBarSubtitleSupport, InfoBarPiP, InfoBarPlugins, InfoBarServiceErrorPopupSupport, InfoBarJobman
profile("LOAD:InitBar_Components")
from Components.ActionMap import HelpableActionMap
@@ -32,7 +32,7 @@ class InfoBar(InfoBarBase, InfoBarShowHide,
HelpableScreen, InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish,
InfoBarSubserviceSelection, InfoBarTimeshift, InfoBarSeek,
InfoBarSummarySupport, InfoBarTimeshiftState, InfoBarTeletextPlugin, InfoBarExtensions,
- InfoBarPiP, InfoBarPlugins, InfoBarSubtitleSupport, InfoBarSleepTimer, InfoBarServiceErrorPopupSupport, InfoBarJobman,
+ InfoBarPiP, InfoBarPlugins, InfoBarSubtitleSupport, InfoBarServiceErrorPopupSupport, InfoBarJobman,
Screen):
ALLOW_SUSPEND = True
@@ -56,7 +56,7 @@ class InfoBar(InfoBarBase, InfoBarShowHide,
InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish, InfoBarSubserviceSelection, \
InfoBarTimeshift, InfoBarSeek, InfoBarSummarySupport, InfoBarTimeshiftState, \
InfoBarTeletextPlugin, InfoBarExtensions, InfoBarPiP, InfoBarSubtitleSupport, InfoBarJobman, \
- InfoBarSleepTimer, InfoBarPlugins, InfoBarServiceErrorPopupSupport:
+ InfoBarPlugins, InfoBarServiceErrorPopupSupport:
x.__init__(self)
self.helpList.append((self["actions"], "InfobarActions", [("showMovies", _("view recordings..."))]))
diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py
index 2f830616..2cbfeb73 100644
--- a/lib/python/Screens/InfoBarGenerics.py
+++ b/lib/python/Screens/InfoBarGenerics.py
@@ -24,7 +24,6 @@ from Screens.TimerSelection import TimerSelection
from Screens.PictureInPicture import PictureInPicture
from Screens.SubtitleDisplay import SubtitleDisplay
from Screens.RdsDisplay import RdsInfoDisplay, RassInteractive
-from Screens.SleepTimerEdit import SleepTimerEdit
from Screens.TimeDateInput import TimeDateInput
from ServiceReference import ServiceReference
@@ -1357,17 +1356,6 @@ class InfoBarJobman:
job_manager.in_background = in_background
# depends on InfoBarExtensions
-class InfoBarSleepTimer:
- def __init__(self):
- self.addExtension((self.getSleepTimerName, self.showSleepTimerSetup, lambda: True), "1")
-
- def getSleepTimerName(self):
- return _("Sleep Timer")
-
- def showSleepTimerSetup(self):
- self.session.open(SleepTimerEdit)
-
-# depends on InfoBarExtensions
class InfoBarPiP:
def __init__(self):
try:
diff --git a/lib/service/servicemp3.cpp b/lib/service/servicemp3.cpp
index af9e1d34..e1bf23dd 100644
--- a/lib/service/servicemp3.cpp
+++ b/lib/service/servicemp3.cpp
@@ -193,7 +193,7 @@ eServiceMP3::eServiceMP3(eServiceReference ref)
m_seekTimeout = eTimer::create(eApp);
m_subtitle_sync_timer = eTimer::create(eApp);
m_stream_tags = 0;
- m_currentAudioStream = 0;
+ m_currentAudioStream = -1;
m_currentSubtitleStream = 0;
m_subtitle_widget = 0;
m_currentTrickRatio = 0;
@@ -301,7 +301,7 @@ eServiceMP3::eServiceMP3(eServiceReference ref)
eDebug("eServiceMP3::sorry, can't play: missing gst-plugin-appsink");
else
{
- g_signal_connect (subsink, "new-buffer", G_CALLBACK (gstCBsubtitleAvail), this);
+ m_subs_to_pull_handler_id = g_signal_connect (subsink, "new-buffer", G_CALLBACK (gstCBsubtitleAvail), this);
g_object_set (G_OBJECT (m_gst_playbin), "text-sink", subsink, NULL);
}
@@ -334,16 +334,28 @@ eServiceMP3::eServiceMP3(eServiceReference ref)
m_gst_playbin = 0;
}
- gst_element_set_state (m_gst_playbin, GST_STATE_PLAYING);
setBufferSize(m_buffer_size);
}
eServiceMP3::~eServiceMP3()
{
+ // disconnect subtitle callback
+ GstElement *sink;
+ g_object_get (G_OBJECT (m_gst_playbin), "text-sink", &sink, NULL);
+ if (sink)
+ {
+ g_signal_handler_disconnect (sink, m_subs_to_pull_handler_id);
+ gst_object_unref(sink);
+ }
+
delete m_subtitle_widget;
+
+ // disconnect sync handler callback
+ gst_bus_set_sync_handler(gst_pipeline_get_bus (GST_PIPELINE (m_gst_playbin)), NULL, NULL);
+
if (m_state == stRunning)
stop();
-
+
if (m_stream_tags)
gst_tag_list_free(m_stream_tags);
@@ -354,7 +366,7 @@ eServiceMP3::~eServiceMP3()
}
}
-DEFINE_REF(eServiceMP3);
+DEFINE_REF(eServiceMP3);
RESULT eServiceMP3::connectEvent(const Slot2<void,iPlayableService*,int> &event, ePtr<eConnection> &connection)
{
@@ -365,25 +377,30 @@ RESULT eServiceMP3::connectEvent(const Slot2<void,iPlayableService*,int> &event,
RESULT eServiceMP3::start()
{
ASSERT(m_state == stIdle);
-
+
m_state = stRunning;
if (m_gst_playbin)
{
eDebug("eServiceMP3::starting pipeline");
gst_element_set_state (m_gst_playbin, GST_STATE_PLAYING);
}
+
m_event(this, evStart);
+
return 0;
}
RESULT eServiceMP3::stop()
{
ASSERT(m_state != stIdle);
+
if (m_state == stStopped)
return -1;
+
eDebug("eServiceMP3::stop %s", m_ref.path.c_str());
gst_element_set_state(m_gst_playbin, GST_STATE_NULL);
m_state = stStopped;
+
return 0;
}
@@ -944,6 +961,8 @@ int eServiceMP3::getNumberOfTracks()
int eServiceMP3::getCurrentTrack()
{
+ if (m_currentAudioStream == -1)
+ g_object_get (G_OBJECT (m_gst_playbin), "current-audio", &m_currentAudioStream, NULL);
return m_currentAudioStream;
}
diff --git a/lib/service/servicemp3.h b/lib/service/servicemp3.h
index d2a8fb0b..15ed0b07 100644
--- a/lib/service/servicemp3.h
+++ b/lib/service/servicemp3.h
@@ -204,6 +204,7 @@ private:
void pullSubtitle();
int m_subs_to_pull;
eSingleLock m_subs_to_pull_lock;
+ gulong m_subs_to_pull_handler_id;
RESULT seekToImpl(pts_t to);