<item level="0" text="Brightness">config.lcd.bright</item>
<item level="0" text="Contrast">config.lcd.contrast</item>
<item level="0" text="Standby">config.lcd.standby</item>
- <item level="2" text="Invert display">config.lcd.invert</item>
</setup>
<setup key="satconfig" title="Sat / Dish Setup">
<item text="Tuner Slot">config.sat.tunerslot</item>
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
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:
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;
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
}
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;
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);
}
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
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; }
};
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
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
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..."))]))
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
def JobViewCB(self, in_background):
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):
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;
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);
}
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);
}
}
-DEFINE_REF(eServiceMP3);
+DEFINE_REF(eServiceMP3);
RESULT eServiceMP3::connectEvent(const Slot2<void,iPlayableService*,int> &event, ePtr<eConnection> &connection)
{
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;
}
int eServiceMP3::getCurrentTrack()
{
+ if (m_currentAudioStream == -1)
+ g_object_get (G_OBJECT (m_gst_playbin), "current-audio", &m_currentAudioStream, NULL);
return m_currentAudioStream;
}
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);